DroidFish: Include engine name in UCI Options activity title.

This commit is contained in:
Peter Osterlund 2015-12-20 13:23:30 +01:00
parent 684ecce385
commit 7873d05541
3 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,6 @@
android:label="@string/cpu_warning_title">
</activity>
<activity android:name=".activities.EditOptions"
android:label="@string/edit_options_title"
android:configChanges="orientation">
</activity>
</application>

View File

@ -2881,6 +2881,7 @@ public class DroidFish extends Activity implements GUIInterface {
UCIOptions uciOpts = ctrl.getUCIOptions();
if (uciOpts != null) {
i.putExtra("org.petero.droidfish.ucioptions", uciOpts);
i.putExtra("org.petero.droidfish.enginename", engineTitleText.getText());
startActivityForResult(i, RESULT_EDITOPTIONS);
}
}

View File

@ -51,6 +51,7 @@ import android.widget.ToggleButton;
/** Edit UCI options. */
public class EditOptions extends Activity {
private UCIOptions uciOpts = null;
private String engineName = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -61,6 +62,7 @@ public class EditOptions extends Activity {
Intent i = getIntent();
uciOpts = (UCIOptions)i.getSerializableExtra("org.petero.droidfish.ucioptions");
engineName = (String)i.getSerializableExtra("org.petero.droidfish.enginename");
if (uciOpts != null) {
initUI();
} else {
@ -87,6 +89,7 @@ public class EditOptions extends Activity {
private final void initUI() {
setContentView(R.layout.editoptions);
Util.overrideFonts(findViewById(android.R.id.content));
setTitle(getString(R.string.edit_options_title) + ": " + engineName);
LinearLayout content = (LinearLayout)findViewById(R.id.eo_content);
Button okButton = (Button)findViewById(R.id.eo_ok);