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