mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
sync options
This commit is contained in:
parent
9527ba7d6a
commit
d5579cd602
3 changed files with 63 additions and 2 deletions
|
@ -80,6 +80,7 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
final FooterOptions footerOptions = viewOptions.getFooterOptions();
|
||||
final PageTurningOptions pageTurningOptions = new PageTurningOptions();
|
||||
final ImageOptions imageOptions = new ImageOptions();
|
||||
final SyncOptions syncOptions = new SyncOptions();
|
||||
final ColorProfile profile = viewOptions.getColorProfile();
|
||||
final ZLTextStyleCollection collection = viewOptions.getTextStyleCollection();
|
||||
final ZLKeyBindings keyBindings = new ZLKeyBindings();
|
||||
|
@ -120,6 +121,27 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
directoriesScreen.Resource, "tempDir", Paths.TempDirectoryOption, null
|
||||
));
|
||||
|
||||
final Screen syncScreen = createPreferenceScreen("sync");
|
||||
final PreferenceSet syncPreferences = new PreferenceSet.Enabler() {
|
||||
@Override
|
||||
protected Boolean detectState() {
|
||||
return syncOptions.Enabled.getValue();
|
||||
}
|
||||
};
|
||||
syncScreen.addPreference(new ZLBooleanPreference(
|
||||
this, syncOptions.Enabled, syncScreen.Resource, "enable"
|
||||
) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
syncPreferences.run();
|
||||
}
|
||||
});
|
||||
syncPreferences.add(syncScreen.addOption(syncOptions.UploadAllBooks, "uploadAllBooks"));
|
||||
syncPreferences.add(syncScreen.addOption(syncOptions.Positions, "positions"));
|
||||
syncPreferences.add(syncScreen.addOption(syncOptions.Metainfo, "metainfo"));
|
||||
syncPreferences.add(syncScreen.addOption(syncOptions.Bookmarks, "bookmarks"));
|
||||
|
||||
final Screen appearanceScreen = createPreferenceScreen("appearance");
|
||||
appearanceScreen.addPreference(new LanguagePreference(
|
||||
this, appearanceScreen.Resource, "language", ZLResource.interfaceLanguages()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue