mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
PreferenceSet.Reloader usages
This commit is contained in:
parent
a6aa805e81
commit
3e258b410f
2 changed files with 16 additions and 12 deletions
|
@ -108,11 +108,13 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
directoriesScreen.addPreference(myChooserCollection.createPreference(
|
||||
directoriesScreen.Resource, "downloadDir", Paths.DownloadsDirectoryOption, libraryUpdater
|
||||
));
|
||||
final PreferenceSet fontReloader = new PreferenceSet.Reloader();
|
||||
directoriesScreen.addPreference(myChooserCollection.createPreference(
|
||||
directoriesScreen.Resource, "fontPath", Paths.FontPathOption, null
|
||||
directoriesScreen.Resource, "fontPath", Paths.FontPathOption, fontReloader
|
||||
));
|
||||
final PreferenceSet wallpaperReloader = new PreferenceSet.Reloader();
|
||||
directoriesScreen.addPreference(myChooserCollection.createPreference(
|
||||
directoriesScreen.Resource, "wallpaperPath", Paths.WallpaperPathOption, null
|
||||
directoriesScreen.Resource, "wallpaperPath", Paths.WallpaperPathOption, wallpaperReloader
|
||||
));
|
||||
directoriesScreen.addPreference(myChooserCollection.createPreference(
|
||||
directoriesScreen.Resource, "tempDir", Paths.TempDirectoryOption, null
|
||||
|
@ -196,7 +198,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
einkPreferences.update();
|
||||
einkPreferences.run();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -206,7 +208,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
einkScreen.addPreference(updateIntervalPreference);
|
||||
|
||||
einkPreferences.add(updateIntervalPreference);
|
||||
einkPreferences.update();
|
||||
einkPreferences.run();
|
||||
}
|
||||
|
||||
final Screen textScreen = createPreferenceScreen("text");
|
||||
|
@ -224,6 +226,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
baseStyle.FontFamilyOption, false
|
||||
);
|
||||
textScreen.addPreference(fontPreference);
|
||||
fontReloader.add(fontPreference);
|
||||
|
||||
textScreen.addPreference(new ZLIntegerRangePreference(
|
||||
this, textScreen.Resource.getResource("fontSize"),
|
||||
|
@ -391,15 +394,16 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
@Override
|
||||
protected void onDialogClosed(boolean result) {
|
||||
super.onDialogClosed(result);
|
||||
bgPreferences.update();
|
||||
bgPreferences.run();
|
||||
}
|
||||
};
|
||||
colorsScreen.addPreference(wallpaperPreference);
|
||||
wallpaperReloader.add(wallpaperPreference);
|
||||
|
||||
bgPreferences.add(
|
||||
colorsScreen.addOption(profile.BackgroundOption, "backgroundColor")
|
||||
);
|
||||
bgPreferences.update();
|
||||
bgPreferences.run();
|
||||
colorsScreen.addOption(profile.HighlightingOption, "highlighting");
|
||||
colorsScreen.addOption(profile.RegularTextOption, "text");
|
||||
colorsScreen.addOption(profile.HyperlinkTextOption, "hyperlink");
|
||||
|
@ -440,7 +444,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
@Override
|
||||
protected void onDialogClosed(boolean result) {
|
||||
super.onDialogClosed(result);
|
||||
footerPreferences.update();
|
||||
footerPreferences.run();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -458,7 +462,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
this, statusLineScreen.Resource, "font",
|
||||
footerOptions.Font, false
|
||||
)));
|
||||
footerPreferences.update();
|
||||
footerPreferences.run();
|
||||
|
||||
/*
|
||||
final Screen colorProfileScreen = createPreferenceScreen("colorProfile");
|
||||
|
@ -498,7 +502,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
keyBindings.bindKey(KeyEvent.KEYCODE_VOLUME_DOWN, false, FBReaderApp.NoAction);
|
||||
keyBindings.bindKey(KeyEvent.KEYCODE_VOLUME_UP, false, FBReaderApp.NoAction);
|
||||
}
|
||||
volumeKeysPreferences.update();
|
||||
volumeKeysPreferences.run();
|
||||
}
|
||||
});
|
||||
volumeKeysPreferences.add(scrollingScreen.addPreference(new ZLCheckBoxPreference(
|
||||
|
@ -522,7 +526,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
}
|
||||
}
|
||||
}));
|
||||
volumeKeysPreferences.update();
|
||||
volumeKeysPreferences.run();
|
||||
|
||||
scrollingScreen.addOption(pageTurningOptions.Animation, "animation");
|
||||
scrollingScreen.addPreference(new AnimationSpeedPreference(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue