DroidFish: Moved ListPreference default values to strings.xml. Avoids "converting to string" warnings in the system log.

This commit is contained in:
Peter Osterlund 2011-12-31 12:19:05 +00:00
parent 7e133f2f15
commit e458b95d33
2 changed files with 36 additions and 18 deletions

View File

@ -9,6 +9,8 @@
<item>stockfish</item> <item>stockfish</item>
<item>cuckoochess</item> <item>cuckoochess</item>
</string-array> </string-array>
<string name="engine_default">stockfish</string>
<string-array name="engine_threads_texts"> <string-array name="engine_threads_texts">
<item>Automatic</item> <item>Automatic</item>
<item>1</item> <item>1</item>
@ -23,6 +25,8 @@
<item>3</item> <item>3</item>
<item>4</item> <item>4</item>
</string-array> </string-array>
<string name="engine_threads_default">0</string>
<string-array name="moves_per_session_texts"> <string-array name="moves_per_session_texts">
<item>Whole Game</item> <item>Whole Game</item>
<item>1 move</item> <item>1 move</item>
@ -43,6 +47,8 @@
<item>50</item> <item>50</item>
<item>60</item> <item>60</item>
</string-array> </string-array>
<string name="moves_per_session_default">60</string>
<string-array name="time_control_texts"> <string-array name="time_control_texts">
<item>15 seconds</item> <item>15 seconds</item>
<item>30 seconds</item> <item>30 seconds</item>
@ -73,6 +79,8 @@
<item>5400000</item> <item>5400000</item>
<item>7200000</item> <item>7200000</item>
</string-array> </string-array>
<string name="time_control_default">300000</string>
<string-array name="time_increment_texts"> <string-array name="time_increment_texts">
<item>0s</item> <item>0s</item>
<item>1s</item> <item>1s</item>
@ -99,6 +107,8 @@
<item>30000</item> <item>30000</item>
<item>60000</item> <item>60000</item>
</string-array> </string-array>
<string name="time_increment_default">0</string>
<string-array name="font_size_texts"> <string-array name="font_size_texts">
<item>Small</item> <item>Small</item>
<item>Medium</item> <item>Medium</item>
@ -111,6 +121,8 @@
<item>16</item> <item>16</item>
<item>21</item> <item>21</item>
</string-array> </string-array>
<string name="font_size_default">12</string>
<string-array name="thinking_arrows_texts"> <string-array name="thinking_arrows_texts">
<item>No arrows</item> <item>No arrows</item>
<item>Max 1 Arrow</item> <item>Max 1 Arrow</item>
@ -129,6 +141,8 @@
<item>5</item> <item>5</item>
<item>6</item> <item>6</item>
</string-array> </string-array>
<string name="thinking_arrows_default">2</string>
<string-array name="scroll_sensitivity_texts"> <string-array name="scroll_sensitivity_texts">
<item>Off</item> <item>Off</item>
<item>Slowest</item> <item>Slowest</item>
@ -145,15 +159,8 @@
<item>1</item> <item>1</item>
<item>0.5</item> <item>0.5</item>
</string-array> </string-array>
<string-array name="book_line_length_values"> <string name="scroll_sensitivity_default">2</string>
<item>5</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>30</item>
<item>50</item>
<item>1000000</item>
</string-array>
<string-array name="book_line_length_texts"> <string-array name="book_line_length_texts">
<item>5 moves</item> <item>5 moves</item>
<item>10 moves</item> <item>10 moves</item>
@ -163,6 +170,17 @@
<item>50 moves</item> <item>50 moves</item>
<item>Unlimited</item> <item>Unlimited</item>
</string-array> </string-array>
<string-array name="book_line_length_values">
<item>5</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>30</item>
<item>50</item>
<item>1000000</item>
</string-array>
<string name="book_line_length_default">1000000</string>
<string name="about_info">\ <string name="about_info">\
<b>About</b>\n\ <b>About</b>\n\
<i>DroidFish</i> is an Android port of the famous <i>stockfish 2.1.1</i> chess engine. \ <i>DroidFish</i> is an Android port of the famous <i>stockfish 2.1.1</i> chess engine. \

View File

@ -24,7 +24,7 @@
android:summary="@string/prefs_engine_summary" android:summary="@string/prefs_engine_summary"
android:entryValues="@array/engine_values" android:entryValues="@array/engine_values"
android:entries="@array/engine_texts" android:entries="@array/engine_texts"
android:defaultValue="stockfish"> android:defaultValue="@string/engine_default">
</ListPreference> </ListPreference>
<org.petero.droidfish.SeekBarPreference <org.petero.droidfish.SeekBarPreference
android:key="strength" android:key="strength"
@ -43,7 +43,7 @@
android:summary="@string/prefs_threads_summary" android:summary="@string/prefs_threads_summary"
android:entryValues="@array/engine_threads_values" android:entryValues="@array/engine_threads_values"
android:entries="@array/engine_threads_texts" android:entries="@array/engine_threads_texts"
android:defaultValue="0"> android:defaultValue="@string/engine_threads_default">
</ListPreference> </ListPreference>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
@ -54,7 +54,7 @@
android:summary="@string/prefs_movesPerSession_summary" android:summary="@string/prefs_movesPerSession_summary"
android:entryValues="@array/moves_per_session_values" android:entryValues="@array/moves_per_session_values"
android:entries="@array/moves_per_session_texts" android:entries="@array/moves_per_session_texts"
android:defaultValue="60"> android:defaultValue="@string/moves_per_session_default">
</ListPreference> </ListPreference>
<ListPreference <ListPreference
android:key="timeControl" android:key="timeControl"
@ -62,7 +62,7 @@
android:summary="@string/prefs_timeControl_summary" android:summary="@string/prefs_timeControl_summary"
android:entryValues="@array/time_control_values" android:entryValues="@array/time_control_values"
android:entries="@array/time_control_texts" android:entries="@array/time_control_texts"
android:defaultValue="300000"> android:defaultValue="@string/time_control_default">
</ListPreference> </ListPreference>
<ListPreference <ListPreference
android:key="timeIncrement" android:key="timeIncrement"
@ -70,7 +70,7 @@
android:summary="@string/prefs_timeIncrement_summary" android:summary="@string/prefs_timeIncrement_summary"
android:entryValues="@array/time_increment_values" android:entryValues="@array/time_increment_values"
android:entries="@array/time_increment_texts" android:entries="@array/time_increment_texts"
android:defaultValue="0"> android:defaultValue="@string/time_increment_default">
</ListPreference> </ListPreference>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
@ -99,7 +99,7 @@
android:summary="@string/prefs_thinkingArrows_summary" android:summary="@string/prefs_thinkingArrows_summary"
android:entryValues="@array/thinking_arrows_values" android:entryValues="@array/thinking_arrows_values"
android:entries="@array/thinking_arrows_texts" android:entries="@array/thinking_arrows_texts"
android:defaultValue="2"> android:defaultValue="@string/thinking_arrows_default">
</ListPreference> </ListPreference>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
@ -145,7 +145,7 @@
android:summary="@string/prefs_scrollSensitivity_summary" android:summary="@string/prefs_scrollSensitivity_summary"
android:entryValues="@array/scroll_sensitivity_values" android:entryValues="@array/scroll_sensitivity_values"
android:entries="@array/scroll_sensitivity_texts" android:entries="@array/scroll_sensitivity_texts"
android:defaultValue="2"> android:defaultValue="@string/scroll_sensitivity_default">
</ListPreference> </ListPreference>
<CheckBoxPreference <CheckBoxPreference
android:key="invertScrollDirection" android:key="invertScrollDirection"
@ -159,7 +159,7 @@
android:summary="@string/prefs_fontSize_summary" android:summary="@string/prefs_fontSize_summary"
android:entryValues="@array/font_size_values" android:entryValues="@array/font_size_values"
android:entries="@array/font_size_texts" android:entries="@array/font_size_texts"
android:defaultValue="12"> android:defaultValue="@string/font_size_default">
</ListPreference> </ListPreference>
<CheckBoxPreference <CheckBoxPreference
android:key="largeButtons" android:key="largeButtons"
@ -261,7 +261,7 @@
android:summary="@string/prefs_bookMaxLength_summary" android:summary="@string/prefs_bookMaxLength_summary"
android:entryValues="@array/book_line_length_values" android:entryValues="@array/book_line_length_values"
android:entries="@array/book_line_length_texts" android:entries="@array/book_line_length_texts"
android:defaultValue="1000000"> android:defaultValue="@string/book_line_length_default">
</ListPreference> </ListPreference>
<CheckBoxPreference <CheckBoxPreference
android:key="bookPreferMainLines" android:key="bookPreferMainLines"