1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

new style preferences for all lengths

This commit is contained in:
Nikolay Pultsin 2014-06-07 01:56:47 +01:00
parent af829b8d51
commit 274fd03e54
36 changed files with 363 additions and 115 deletions

View file

@ -257,10 +257,6 @@ public class PreferenceActivity extends ZLPreferenceActivity {
/*
final Screen formatScreen = moreStylesScreen.createPreferenceScreen(decoration.Name);
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("fontSizeDifference"),
decoration.FontSizeDeltaOption
));
formatScreen.addPreference(new ZLBoolean3Preference(
this, textScreen.Resource, "bold",
decoration.BoldOption
@ -286,26 +282,6 @@ public class PreferenceActivity extends ZLPreferenceActivity {
this, textScreen.Resource, "allowHyphenations",
decoration.AllowHyphenationsOption
));
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("spaceBefore"),
decoration.SpaceBeforeOption
));
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("spaceAfter"),
decoration.SpaceAfterOption
));
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("leftIndent"),
decoration.LeftIndentOption
));
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("rightIndent"),
decoration.RightIndentOption
));
formatScreen.addPreference(new ZLIntegerRangePreference(
this, textScreen.Resource.getResource("firstLineIndent"),
decoration.FirstLineIndentDeltaOption
));
final ZLIntegerOption spacePercentOption = decoration.LineSpacePercentOption;
final int[] spacingValues = new int[17];
final String[] spacingKeys = new String[17];
@ -328,6 +304,46 @@ public class PreferenceActivity extends ZLPreferenceActivity {
this, textScreen.Resource, "font",
description.FontFamilyOption, true
));
ngScreen.addPreference(new StringPreference(
this, description.FontSizeOption,
StringPreference.Constraint.POSITIVE_LENGTH,
textScreen.Resource, "fontSize"
));
//public final ZLStringOption FontWeightOption;
//public final ZLStringOption FontStyleOption;
//public final ZLStringOption TextDecorationOption;
//public final ZLStringOption HyphenationOption;
ngScreen.addPreference(new StringPreference(
this, description.MarginTopOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "spaceBefore"
));
ngScreen.addPreference(new StringPreference(
this, description.MarginBottomOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "spaceAfter"
));
ngScreen.addPreference(new StringPreference(
this, description.MarginLeftOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "leftIndent"
));
ngScreen.addPreference(new StringPreference(
this, description.MarginRightOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "rightIndent"
));
ngScreen.addPreference(new StringPreference(
this, description.TextIndentOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "firstLineIndent"
));
//public final ZLStringOption AlignmentOption;
ngScreen.addPreference(new StringPreference(
this, description.VerticalAlignOption,
StringPreference.Constraint.LENGTH,
textScreen.Resource, "verticalAlignment"
));
}
final PreferenceSet footerPreferences = new PreferenceSet.Enabler() {