DroidFish: Made "save to pgn file" easier to understand.

This commit is contained in:
Peter Osterlund 2012-04-14 13:25:19 +00:00
parent 14d17d6719
commit fbd7225386
4 changed files with 16 additions and 2 deletions

View File

@ -4,6 +4,12 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical"> android:orientation="vertical">
<TextView
android:id="@+id/select_game_hint"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:includeFontPadding="true">
</TextView>
<EditText <EditText
android:id="@+id/select_game_filter" android:id="@+id/select_game_filter"
android:hint="@string/filter_text" android:hint="@string/filter_text"

View File

@ -269,7 +269,7 @@ you are not actively using the program.\
<string name="filename">Filename:</string> <string name="filename">Filename:</string>
<string name="halfmove">Halfmove clock:</string> <string name="halfmove">Halfmove clock:</string>
<string name="fullmove">Fullmove counter:</string> <string name="fullmove">Fullmove counter:</string>
<string name="filter_text">Filter text</string> <string name="filter_text">Search…</string>
<string name="value_percent">Value (%):</string> <string name="value_percent">Value (%):</string>
<string name="header_event">Event:</string> <string name="header_event">Event:</string>
<string name="header_site">Site:</string> <string name="header_site">Site:</string>
@ -299,6 +299,7 @@ you are not actively using the program.\
<string name="preferences">Preferences</string> <string name="preferences">Preferences</string>
<string name="load_game_title">Edit File / Load Game</string> <string name="load_game_title">Edit File / Load Game</string>
<string name="save_game_title">Edit File / Save Game</string> <string name="save_game_title">Edit File / Save Game</string>
<string name="save_game_hint">Select an existing game to control where to save the game. Long press an existing game to delete it.</string>
<string name="load_scid_game_title">Load Scid Game</string> <string name="load_scid_game_title">Load Scid Game</string>
<string name="cpu_warning_title">CPU Warning</string> <string name="cpu_warning_title">CPU Warning</string>
<string name="failed_to_read_pgn_data">Failed to read pgn data</string> <string name="failed_to_read_pgn_data">Failed to read pgn data</string>

View File

@ -141,7 +141,6 @@ public class DroidFish extends Activity implements GUIInterface {
// FIXME!!! Option to display coordinates in border outside chess board. // FIXME!!! Option to display coordinates in border outside chess board.
// FIXME!!! Hard to understand how to undo a single half-move. // FIXME!!! Hard to understand how to undo a single half-move.
// FIXME!!! Hard to understand how "save game" works.
// FIXME!!! Better behavior if engine is terminated. How exactly? // FIXME!!! Better behavior if engine is terminated. How exactly?
// FIXME!!! Handle PGN intents with more than one game. // FIXME!!! Handle PGN intents with more than one game.

View File

@ -47,6 +47,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener; import android.widget.AdapterView.OnItemLongClickListener;
@ -58,6 +59,7 @@ public class EditPGN extends ListActivity {
ProgressDialog progress; ProgressDialog progress;
private GameInfo selectedGi = null; private GameInfo selectedGi = null;
ArrayAdapter<GameInfo> aa = null; ArrayAdapter<GameInfo> aa = null;
TextView hintText = null;
EditText filterText = null; EditText filterText = null;
SharedPreferences settings; SharedPreferences settings;
@ -278,6 +280,12 @@ public class EditPGN extends ListActivity {
} }
}); });
filterText.setText(lastSearchString); filterText.setText(lastSearchString);
hintText = (TextView)findViewById(R.id.select_game_hint);
if (loadGame) {
hintText.setVisibility(View.GONE);
} else {
hintText.setText(R.string.save_game_hint);
}
lv.requestFocus(); lv.requestFocus();
} }