-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update notification priority: no sound on modern devices when notification icon appears (in case it's not fixed for end user - application should bre re-installed) Update games pattern image to be even more awesome Make application theme to be applied based on user's choice when application starts. Made disable buttons looks disable again!
- Loading branch information
1 parent
5e31937
commit 8bd76fd
Showing
11 changed files
with
59 additions
and
51 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/blogspot/developersu/ns_usbloader/ApplicationTheme.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.blogspot.developersu.ns_usbloader; | ||
|
||
import androidx.appcompat.app.AppCompatDelegate; | ||
|
||
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; | ||
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO; | ||
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES; | ||
|
||
public class ApplicationTheme { | ||
private static final int SYSTEM_DEFAULT = 0; | ||
private static final int DAY_THEME = 1; | ||
private static final int NIGHT_THEME = 2; | ||
|
||
private ApplicationTheme(){} | ||
|
||
public static void setApplicationTheme(int itemId){ | ||
switch (itemId){ | ||
case SYSTEM_DEFAULT: | ||
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_FOLLOW_SYSTEM); | ||
break; | ||
case DAY_THEME: | ||
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO); | ||
break; | ||
case NIGHT_THEME: | ||
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="#c2d9d9" android:state_enabled="false" /> | ||
<item android:color="@android:color/white" android:state_enabled="true" /> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ | |
</style> | ||
|
||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" /> | ||
|
||
</resources> |