Top "Flags" questions

Flags are atomic data structures used to identify state in a program.

Intent to start activity - but don't bring to front

Description: Activity A is visible (or in the background) Intent I is received by a broadcast with valuable extras and …

android android-intent flags
Android: WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON question

Im using the following code to keep the screen on: this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_…

android flags
Android - How to stop animation between activity changes

I have multiple different Activity in my app and I don't want any transition animation when changing between Activities. Below …

android animation android-intent flags
Activity.finishAffinity() vs Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK

In Android, if you want to clear your current Activity stack and launch a new Activity (for example, logging out …

android android-intent android-activity logout flags
How to disable a log.Logger

I have some heavily instrumented code that makes use of the log package. Now it's come time to turn off …

logging go flags
Enum.HasFlag, why no Enum.SetFlag?

I have to build an extension method for each flag type I declare, like so: public static EventMessageScope SetFlag(this …

c# enums flags
Anyone know a good workaround for the lack of an enum generic constraint?

What I want to do is something like this: I have enums with combined flagged values. public static class EnumExtension { …

c# .net enums flags
Removing Strikethrough from TextView

I'm using this line below in order to set a strikethrough on my TextView: tv.setPaintFlags(tv.getPaintFlags() | Paint.STRIKE_…

android android-listview textview flags strikethrough
What are the gcc predefined macros for the compiler's version number?

I have run into a bug with gcc v3.4.4 and which to put an #ifdef in my code to work …

gcc g++ version flags preprocessor
Why do enum permissions often have 0, 1, 2, 4 values?

Why are people always using enum values like 0, 1, 2, 4, 8 and not 0, 1, 2, 3, 4? Has this something to do with bit operations, etc.? I …

c# permissions enums flags