I hereby claim:
- I am dphans on github.
- I am dphans (https://keybase.io/dphans) on keybase.
- I have a public key ASDEy5TidGRxHLeBpHFnS5D8Sk5SSsp4GEHBdDSjDoLOlgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // check device state is in dark mode | |
| val isDarkMode = [email protected] | |
| .and(Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES | |
| // retrieve current themes background color | |
| val typedValue = TypedValue() | |
| [email protected](android.R.attr.colorBackground, typedValue, true) | |
| // allow activity can update system system bars | |
| [email protected](WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) |
| val isNightMode = [email protected] | |
| .and(Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES |
| /// Swift version: 4 | |
| /// Last updated: Jul 21, 2020 | |
| // define somewhere... (utilities, constants,...) | |
| enum TargetDevice { | |
| case nativeMac | |
| case iPad | |
| case iPhone | |
| case iWatch | |