My question may be basic, but I am wondering how the pipe operator works in the following contexts in Android :
We can set multiple input types in layout:
android:inputType = "textAutoCorrect|textAutoComplete"
We can set multiple flags to an intent as follows:
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION|Intent.FLAG_ACTIVITY_CLEAR_TOP);
Also we can set some properties as follows:
tvHide.setPaintFlags(tvHide.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
There are multiple instances where we can see such examples in Android.
So my question is, does the |
operator act like the bitwise OR operator or does it just concat the results or something else?
If it acts like the bitwise OR operator, then how does it make the expected result correct? Can anybody enlighten me on this?