Retain status

This commit is contained in:
Victor Shcherb 2015-11-07 20:36:17 +01:00
parent 67ab6a131a
commit b5c8aabb75
2 changed files with 3 additions and 4 deletions

View file

@ -47,6 +47,7 @@ public class HelpActivity extends OsmandActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
FrameLayout frame = new FrameLayout(this);
frame.setId(DIALOG);
@ -81,9 +82,6 @@ public class HelpActivity extends OsmandActionBarActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean isLightTheme = (getOsmandApplication())
.getSettings().OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME;
int themeId = isLightTheme ? R.style.OsmandLightTheme : R.style.OsmandDarkTheme;
}
@NonNull
@ -335,7 +333,7 @@ public class HelpActivity extends OsmandActionBarActivity {
@Override
public void onClick(View v) {
HelpArticleDialogFragment.instantiateWithAsset(filename, name)
.show(ctx.getSupportFragmentManager(), null);
.show(ctx.getSupportFragmentManager(), "DIALOG_HELP_ARTICLE");
}
}

View file

@ -38,6 +38,7 @@ public class HelpArticleDialogFragment extends DialogFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
setRetainInstance(true);
super.onCreate(savedInstanceState);
boolean isLightTheme = (getOsmandApplication())
.getSettings().OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME;