Settings and Toolbar update
This commit is contained in:
parent
1aa5500c64
commit
f7edfbb34b
4 changed files with 18 additions and 8 deletions
|
@ -83,10 +83,12 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
|
||||||
|
|
||||||
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
|
if(sharedPref.getBoolean("pref_keep_screen_on", true)) {
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
}
|
||||||
|
|
||||||
GameType gameType = GameType.Unspecified;
|
GameType gameType = GameType.Unspecified;
|
||||||
GameDifficulty gameDifficulty = GameDifficulty.Unspecified;
|
GameDifficulty gameDifficulty = GameDifficulty.Unspecified;
|
||||||
int loadLevelID = 0;
|
int loadLevelID = 0;
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/gametype_unspecified"
|
android:text="@string/gametype_unspecified"
|
||||||
android:id="@+id/gameModeText"
|
android:id="@+id/gameModeText"
|
||||||
android:layout_weight="8"/>
|
android:layout_weight="7"/>
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="4"
|
android:layout_weight="5"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -140,6 +140,8 @@
|
||||||
<string name="help_permissions_summary">Privacy Friendly Sudoku does not use any permissions.</string>
|
<string name="help_permissions_summary">Privacy Friendly Sudoku does not use any permissions.</string>
|
||||||
<string name="okay">Okay</string>
|
<string name="okay">Okay</string>
|
||||||
<string name="view_help">View Help</string>
|
<string name="view_help">View Help</string>
|
||||||
<string name="difficulty_challenge">Challenge</string>
|
<string name="difficulty_challenge" translatable="false">Challenge</string>
|
||||||
<string name="pref_highlightInputError">Highlight input mistakes</string>
|
<string name="pref_highlightInputError" translatable="false">Highlight input mistakes</string>
|
||||||
|
<string name="pref_keep_screen_on">Keep Screen On</string>
|
||||||
|
<string name="pref_keep_screen_on_summary">Don\'t turn the screen off while playing</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -13,7 +13,13 @@
|
||||||
android:summary="@string/pref_timer_reset_summary"
|
android:summary="@string/pref_timer_reset_summary"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
|
|
||||||
<ListPreference
|
<SwitchPreference android:id="@+id/pref_keep_screen_on"
|
||||||
|
android:key="pref_keep_screen_on"
|
||||||
|
android:title="@string/pref_keep_screen_on"
|
||||||
|
android:summary="@string/pref_keep_screen_on_summary"
|
||||||
|
android:defaultValue="true"/>
|
||||||
|
|
||||||
|
<ListPreference
|
||||||
android:key="pref_symbols"
|
android:key="pref_symbols"
|
||||||
android:title="@string/pref_symbols"
|
android:title="@string/pref_symbols"
|
||||||
android:defaultValue="Default"
|
android:defaultValue="Default"
|
||||||
|
|
Loading…
Reference in a new issue