mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
preference dependency has been added
This commit is contained in:
parent
c8d571f7e1
commit
10b09a2a4b
3 changed files with 25 additions and 5 deletions
|
@ -328,8 +328,22 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
final ScrollingPreferences scrollingPreferences = ScrollingPreferences.Instance();
|
||||
scrollingScreen.addOption(scrollingPreferences.FingerScrollingOption, "fingerScrolling");
|
||||
scrollingScreen.addOption(fbReader.EnableDoubleTapOption, "enableDoubleTapDetection");
|
||||
scrollingScreen.addOption(scrollingPreferences.VolumeKeysOption, "volumeKeys");
|
||||
scrollingScreen.addOption(scrollingPreferences.InvertVolumeKeysOption, "invertVolumeKeys");
|
||||
|
||||
final ZLPreferenceSet volumeKeysPreferences = new ZLPreferenceSet();
|
||||
scrollingScreen.addPreference(new ZLBooleanPreference(
|
||||
this, scrollingPreferences.VolumeKeysOption, scrollingScreen.Resource, "volumeKeys"
|
||||
) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
volumeKeysPreferences.setEnabled(isChecked());
|
||||
}
|
||||
});
|
||||
volumeKeysPreferences.add(scrollingScreen.addOption(
|
||||
scrollingPreferences.InvertVolumeKeysOption, "invertVolumeKeys"
|
||||
));
|
||||
volumeKeysPreferences.setEnabled(scrollingPreferences.VolumeKeysOption.getValue());
|
||||
|
||||
scrollingScreen.addOption(scrollingPreferences.AnimationOption, "animation");
|
||||
scrollingScreen.addOption(scrollingPreferences.HorizontalOption, "horizontal");
|
||||
|
||||
|
|
|
@ -39,7 +39,12 @@ class ZLBooleanPreference extends CheckBoxPreference implements ZLPreference {
|
|||
setChecked(option.getValue());
|
||||
}
|
||||
|
||||
public void onAccept() {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
myOption.setValue(isChecked());
|
||||
}
|
||||
|
||||
public void onAccept() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,11 +46,12 @@ class ZLIntegerRangePreference extends ListPreference implements ZLPreference {
|
|||
protected void onDialogClosed(boolean result) {
|
||||
super.onDialogClosed(result);
|
||||
if (result) {
|
||||
setSummary(getValue());
|
||||
final String value = getValue();
|
||||
setSummary(value);
|
||||
myOption.setValue(myOption.MinValue + findIndexOfValue(value));
|
||||
}
|
||||
}
|
||||
|
||||
public void onAccept() {
|
||||
myOption.setValue(myOption.MinValue + findIndexOfValue(getValue()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue