-
public final class EpubNavigatorFragment.Configuration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classEpubNavigatorFragment.Configuration.Companion
-
Field Summary
Fields Modifier and Type Field Description private List<String>servedAssetsprivate RsPropertiesreadiumCssRsPropertiesprivate BooleanuseReadiumCssFontSizeprivate HtmlDecorationTemplatesdecorationTemplatesprivate ActionMode.CallbackselectionActionModeCallbackprivate BooleanshouldApplyInsetsPaddingprivate BooleandisableSelectionWhenProtected
-
Constructor Summary
Constructors Constructor Description EpubNavigatorFragment.Configuration(List<String> servedAssets, RsProperties readiumCssRsProperties, HtmlDecorationTemplates decorationTemplates, ActionMode.Callback selectionActionModeCallback, Boolean shouldApplyInsetsPadding)
-
Method Summary
Modifier and Type Method Description final List<String>getServedAssets()Patterns for asset paths which will be available to EPUB resources under https://readium/assets/. final UnitsetServedAssets(List<String> servedAssets)Patterns for asset paths which will be available to EPUB resources under https://readium/assets/. final RsPropertiesgetReadiumCssRsProperties()Readium CSS reading system settings. final UnitsetReadiumCssRsProperties(RsProperties readiumCssRsProperties)Readium CSS reading system settings. final BooleangetUseReadiumCssFontSize()When disabled, the Android web view's WebSettings.textZoomwill be used to adjust the font size, instead of using the Readium CSS's--USER__fontSizevariable.final UnitsetUseReadiumCssFontSize(Boolean useReadiumCssFontSize)When disabled, the Android web view's WebSettings.textZoomwill be used to adjust the font size, instead of using the Readium CSS's--USER__fontSizevariable.final HtmlDecorationTemplatesgetDecorationTemplates()Supported HTML decoration templates. final UnitsetDecorationTemplates(HtmlDecorationTemplates decorationTemplates)Supported HTML decoration templates. final ActionMode.CallbackgetSelectionActionModeCallback()Custom ActionMode.Callback to be used when the user selects content. final UnitsetSelectionActionModeCallback(ActionMode.Callback selectionActionModeCallback)Custom ActionMode.Callback to be used when the user selects content. final BooleangetShouldApplyInsetsPadding()Whether padding accounting for display cutouts should be applied. final UnitsetShouldApplyInsetsPadding(Boolean shouldApplyInsetsPadding)Whether padding accounting for display cutouts should be applied. final BooleangetDisableSelectionWhenProtected()Disable user selection if the publication is protected by a DRM (e.g. final UnitsetDisableSelectionWhenProtected(Boolean disableSelectionWhenProtected)Disable user selection if the publication is protected by a DRM (e.g. final UnitregisterJavascriptInterface(String name, Function1<Link, Object> factory)Registers a new factory for the JavascriptInterface named name. final UnitaddFontFamilyDeclaration(FontFamily fontFamily, List<FontFamily> alternates, Function1<MutableFontFamilyDeclaration, Unit> builderAction)Adds a declaration for fontFamily using builderAction. -
-
Constructor Detail
-
EpubNavigatorFragment.Configuration
EpubNavigatorFragment.Configuration(List<String> servedAssets, RsProperties readiumCssRsProperties, HtmlDecorationTemplates decorationTemplates, ActionMode.Callback selectionActionModeCallback, Boolean shouldApplyInsetsPadding)
-
-
Method Detail
-
getServedAssets
final List<String> getServedAssets()
Patterns for asset paths which will be available to EPUB resources under https://readium/assets/.
The patterns can use simple glob wildcards, see: https://developer.android.com/reference/android/os/PatternMatcher#PATTERN_SIMPLE_GLOB
Use .* to serve all app assets.
-
setServedAssets
final Unit setServedAssets(List<String> servedAssets)
Patterns for asset paths which will be available to EPUB resources under https://readium/assets/.
The patterns can use simple glob wildcards, see: https://developer.android.com/reference/android/os/PatternMatcher#PATTERN_SIMPLE_GLOB
Use .* to serve all app assets.
-
getReadiumCssRsProperties
final RsProperties getReadiumCssRsProperties()
Readium CSS reading system settings.
See https://readium.org/readium-css/docs/CSS19-api.html#reading-system-styles
-
setReadiumCssRsProperties
final Unit setReadiumCssRsProperties(RsProperties readiumCssRsProperties)
Readium CSS reading system settings.
See https://readium.org/readium-css/docs/CSS19-api.html#reading-system-styles
-
getUseReadiumCssFontSize
final Boolean getUseReadiumCssFontSize()
When disabled, the Android web view's
WebSettings.textZoomwill be used to adjust the font size, instead of using the Readium CSS's--USER__fontSizevariable.WebSettings.textZoomwill work with more publications than--USER__fontSize, even the ones poorly authored. However, the page width is not adjusted when changing the font size to keep the optimal line length.See:
https://github.com/readium/mobile/issues/5
https://github.com/readium/mobile/issues/1#issuecomment-652431984
-
setUseReadiumCssFontSize
final Unit setUseReadiumCssFontSize(Boolean useReadiumCssFontSize)
When disabled, the Android web view's
WebSettings.textZoomwill be used to adjust the font size, instead of using the Readium CSS's--USER__fontSizevariable.WebSettings.textZoomwill work with more publications than--USER__fontSize, even the ones poorly authored. However, the page width is not adjusted when changing the font size to keep the optimal line length.See:
https://github.com/readium/mobile/issues/5
https://github.com/readium/mobile/issues/1#issuecomment-652431984
-
getDecorationTemplates
final HtmlDecorationTemplates getDecorationTemplates()
Supported HTML decoration templates.
-
setDecorationTemplates
final Unit setDecorationTemplates(HtmlDecorationTemplates decorationTemplates)
Supported HTML decoration templates.
-
getSelectionActionModeCallback
final ActionMode.Callback getSelectionActionModeCallback()
Custom ActionMode.Callback to be used when the user selects content.
Provide one if you want to customize the selection context menu items.
-
setSelectionActionModeCallback
final Unit setSelectionActionModeCallback(ActionMode.Callback selectionActionModeCallback)
Custom ActionMode.Callback to be used when the user selects content.
Provide one if you want to customize the selection context menu items.
-
getShouldApplyInsetsPadding
final Boolean getShouldApplyInsetsPadding()
Whether padding accounting for display cutouts should be applied.
-
setShouldApplyInsetsPadding
final Unit setShouldApplyInsetsPadding(Boolean shouldApplyInsetsPadding)
Whether padding accounting for display cutouts should be applied.
-
getDisableSelectionWhenProtected
final Boolean getDisableSelectionWhenProtected()
Disable user selection if the publication is protected by a DRM (e.g. with LCP).
WARNING: If you choose to disable this, you MUST remove the Copy and Share selection menu items in your app. Otherwise, you will void the EDRLab certification for your application. If you need help, follow up on: https://github.com/readium/kotlin-toolkit/issues/299#issuecomment-1315643577
-
setDisableSelectionWhenProtected
final Unit setDisableSelectionWhenProtected(Boolean disableSelectionWhenProtected)
Disable user selection if the publication is protected by a DRM (e.g. with LCP).
WARNING: If you choose to disable this, you MUST remove the Copy and Share selection menu items in your app. Otherwise, you will void the EDRLab certification for your application. If you need help, follow up on: https://github.com/readium/kotlin-toolkit/issues/299#issuecomment-1315643577
-
registerJavascriptInterface
final Unit registerJavascriptInterface(String name, Function1<Link, Object> factory)
Registers a new factory for the JavascriptInterface named name.
Return
nullin factory to prevent adding the Javascript interface for a given resource.
-
addFontFamilyDeclaration
final Unit addFontFamilyDeclaration(FontFamily fontFamily, List<FontFamily> alternates, Function1<MutableFontFamilyDeclaration, Unit> builderAction)
Adds a declaration for fontFamily using builderAction.
- Parameters:
alternates- Specifies a list of alternative font families used as fallbacks when symbols are missing from fontFamily.
-
-
-
-