Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8542879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:10:19+00:00 2026-06-11T12:10:19+00:00

I have often looked at API say the android api where you can add

  • 0

I have often looked at API say the android api where you can add a pipe between arguments to combine them. Say *CENTER_VERTICAL|CENTER_HORIZONTAL*. How is this done ? Can anyone show me an example where i can pass multiple arguments to a function chained as above ? How do i read them ?

Kind Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:10:20+00:00Added an answer on June 11, 2026 at 12:10 pm

    The vertical bar is actually a bitwise OR, so the method only works when the arguments are “flags” or bit fields.

    e.g.

    private static final int FLAG1 = 0x01;
    private static final int FLAG2 = 0x02;
    
    callFunc(FLAG1|FLAG2); // (passes 0x03)
    

    If the args are just “any old int”, it probably wont do what you think:

    e.g.

    callFunc(0x03|0x01); // passes 0x03 - so the 0x01 does nothing.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have often encountered an error such as cannot convert from 'method group' to
I have often PATHs for files which do not exist in my codes. I
I have often seen the spinning gears OpenGL example ( I think originally done
I have often seen an init() within the constructor of AS3 classes, sometimes even
I have often heard people talking about hashing and hash maps and hash tables.
I have often heard complaints against Java for not having unsigned data types. See
I often have a situation in my Java code when I need to set
I often have to deal with XML documents that contain namespaced elements, but doesn't
I quite often have rows of code like the following: UPDATE my_table SET name
I have found that I often have to implement some sort of a scheduler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.