Restart activity when ViewHolder layout setting is changed
This commit is contained in:
parent
4f188ff74e
commit
dbceed7411
2 changed files with 16 additions and 2 deletions
|
@ -540,8 +540,11 @@ public class NewsReaderListActivity extends PodcastFragmentActivity implements
|
|||
{
|
||||
getSlidingListFragment().ReloadAdapter();
|
||||
|
||||
if(ThemeChooser.ThemeRequiresRestartOfUI(this)) {
|
||||
finish();
|
||||
String oldLayout = data.getStringExtra(SettingsActivity.SP_FEED_LIST_LAYOUT);
|
||||
String newLayout = PreferenceManager.getDefaultSharedPreferences(this).getString(SettingsActivity.SP_FEED_LIST_LAYOUT,"0");
|
||||
|
||||
if(ThemeChooser.ThemeRequiresRestartOfUI(this) || !newLayout.equals(oldLayout)) {
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
}
|
||||
} else if(requestCode == RESULT_ADD_NEW_FEED) {
|
||||
|
|
|
@ -228,6 +228,17 @@ public class SettingsActivity extends PreferenceActivity {
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(
|
||||
SettingsActivity.SP_FEED_LIST_LAYOUT,
|
||||
PreferenceManager.getDefaultSharedPreferences(this).getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0")
|
||||
);
|
||||
setResult(RESULT_OK,intent);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean onIsMultiPane() {
|
||||
|
|
Loading…
Reference in a new issue