mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-01-30 17:13:50 +01:00
DroidFish: Fixed crash when rotating screen while editing UCI options.
This commit is contained in:
parent
7873d05541
commit
280bdfc5a1
|
@ -118,7 +118,7 @@
|
|||
android:label="@string/cpu_warning_title">
|
||||
</activity>
|
||||
<activity android:name=".activities.EditOptions"
|
||||
android:configChanges="orientation">
|
||||
android:configChanges="orientation|screenSize">
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -87,16 +87,15 @@ 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);
|
||||
String title = getString(R.string.edit_options_title);
|
||||
if (engineName != null)
|
||||
title = title + ": " + engineName;
|
||||
setTitle(title);
|
||||
|
||||
LinearLayout content = (LinearLayout)findViewById(R.id.eo_content);
|
||||
Button okButton = (Button)findViewById(R.id.eo_ok);
|
||||
Button cancelButton = (Button)findViewById(R.id.eo_cancel);
|
||||
Button resetButton = (Button)findViewById(R.id.eo_reset);
|
||||
View view = View.inflate(this, R.layout.editoptions, null);
|
||||
|
||||
if (uciOpts != null) {
|
||||
LinearLayout content = (LinearLayout)view.findViewById(R.id.eo_content);
|
||||
for (String name : uciOpts.getOptionNames()) {
|
||||
UCIOptions.OptionBase o = uciOpts.getOption(name);
|
||||
if (!o.visible)
|
||||
|
@ -209,6 +208,12 @@ public class EditOptions extends Activity {
|
|||
}
|
||||
}
|
||||
|
||||
setContentView(view);
|
||||
Util.overrideFonts(findViewById(android.R.id.content));
|
||||
Button okButton = (Button)findViewById(R.id.eo_ok);
|
||||
Button cancelButton = (Button)findViewById(R.id.eo_cancel);
|
||||
Button resetButton = (Button)findViewById(R.id.eo_reset);
|
||||
|
||||
okButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user