mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
XHTML_TAG_P in preferences
This commit is contained in:
parent
e4280c88ec
commit
6b133d0ad8
34 changed files with 196 additions and 106 deletions
|
@ -93,11 +93,11 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
final Screen directoriesScreen = createPreferenceScreen("directories");
|
||||
final Runnable libraryUpdater = new Runnable() {
|
||||
public void run() {
|
||||
final BookCollectionShadow collection = new BookCollectionShadow();
|
||||
collection.bindToService(PreferenceActivity.this, new Runnable() {
|
||||
final BookCollectionShadow bookCollection = new BookCollectionShadow();
|
||||
bookCollection.bindToService(PreferenceActivity.this, new Runnable() {
|
||||
public void run() {
|
||||
collection.reset(false);
|
||||
collection.unbind();
|
||||
bookCollection.reset(false);
|
||||
bookCollection.unbind();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -257,45 +257,25 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
|
||||
byte styles[] = {
|
||||
FBTextKind.REGULAR,
|
||||
FBTextKind.TITLE,
|
||||
FBTextKind.SECTION_TITLE,
|
||||
FBTextKind.SUBTITLE,
|
||||
FBTextKind.H1,
|
||||
FBTextKind.H2,
|
||||
FBTextKind.H3,
|
||||
FBTextKind.H4,
|
||||
FBTextKind.H5,
|
||||
FBTextKind.H6,
|
||||
//FBTextKind.XHTML_TAG_P,
|
||||
//FBTextKind.TITLE,
|
||||
//FBTextKind.SECTION_TITLE,
|
||||
//FBTextKind.SUBTITLE,
|
||||
//FBTextKind.H1,
|
||||
//FBTextKind.H2,
|
||||
//FBTextKind.H3,
|
||||
//FBTextKind.H4,
|
||||
//FBTextKind.H5,
|
||||
//FBTextKind.H6,
|
||||
FBTextKind.ANNOTATION,
|
||||
FBTextKind.EPIGRAPH,
|
||||
FBTextKind.AUTHOR,
|
||||
FBTextKind.POEM_TITLE,
|
||||
FBTextKind.STANZA,
|
||||
//FBTextKind.STANZA,
|
||||
FBTextKind.VERSE,
|
||||
FBTextKind.CITE,
|
||||
FBTextKind.INTERNAL_HYPERLINK,
|
||||
FBTextKind.EXTERNAL_HYPERLINK,
|
||||
FBTextKind.FOOTNOTE,
|
||||
FBTextKind.ITALIC,
|
||||
FBTextKind.EMPHASIS,
|
||||
FBTextKind.BOLD,
|
||||
FBTextKind.STRONG,
|
||||
FBTextKind.DEFINITION,
|
||||
FBTextKind.DEFINITION_DESCRIPTION,
|
||||
FBTextKind.PREFORMATTED,
|
||||
FBTextKind.CODE
|
||||
//FBTextKind.CITE,
|
||||
};
|
||||
for (int i = 0; i < styles.length; ++i) {
|
||||
final ZLTextNGStyleDescription description = collection.getDescription(styles[i]);
|
||||
if (description != null) {
|
||||
final Screen ngScreen = moreStylesScreen.createPreferenceScreen(description.Name);
|
||||
ngScreen.addPreference(new FontPreference(
|
||||
this, textScreen.Resource, "font",
|
||||
description.FontFamilyOption, true
|
||||
));
|
||||
continue;
|
||||
}
|
||||
|
||||
final ZLTextStyleDecoration decoration = collection.getDecoration(styles[i]);
|
||||
if (decoration == null) {
|
||||
continue;
|
||||
|
@ -371,6 +351,14 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
|||
));
|
||||
}
|
||||
|
||||
for (ZLTextNGStyleDescription description : collection.getDescriptionList()) {
|
||||
final Screen ngScreen = moreStylesScreen.createPreferenceScreen(description.Name);
|
||||
ngScreen.addPreference(new FontPreference(
|
||||
this, textScreen.Resource, "font",
|
||||
description.FontFamilyOption, true
|
||||
));
|
||||
}
|
||||
|
||||
final PreferenceSet footerPreferences = new PreferenceSet.Enabler() {
|
||||
@Override
|
||||
protected Boolean detectState() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue