FBReader SDK for Android: API changes in version 1.2.0
Class org.fbreader.text.widget.TextWidget
- The method
pageInTextreturnsnullif the book is not loaded yet. Recently, it returned the fake value(1, 1). - The method
getBackgroundColorhas gone. UseColorProfile.backgroundColor()instead. - The new method
boolean showsTwoPages(). To change it's value, use theViewOptions.twoColumnViewoption. - The method
int scrollbarType()has been replaced withViewOptions.ProgressIndicatorType progressIndicatorType().
Class org.fbreader.util.ColorUtil
- Renamed the method:
long getAverageColor(Bitmap)tolong averageColor(Bitmap).
Class org.fbreader.view.options.ColorProfile
- Added the method
boolean isLight; it detects if the text colour is darker that the background. - Option
imageAdjustingis replaced withimageAdjustingMode()method. The value is not configurable anymore. The mode depends on theisLightvalue. - The method
getWallpaperFilehas gone, use the methods listed below instead. - Added the method
Bitmap backgroundBitmap. - Added the method
long backgroundColor. It returns the colour if a solid colour is used for background. If a bitmap is used, the method returns the average colur of the bitmap. - Added the method
backgroundFillMode. - Renamed the option:
footerNGBackgroundtofooterBackground. - Renamed the option:
footerNGForegroundtofooterForeground. - Renamed the option:
footerNGForegroundUnreadtofooterForegroundUnread. - Renamed the option:
footerFilltofooterOldStyleFill.
New class org.fbreader.view.options.EInkOptions
- The option:
BooleanOption screenIsEnkthat defines if the screen is eink. That means it does not support animations, etc. Normally, the value is set correctly automatically.
Class org.fbreader.view.options.ImageOptions
- Renamed the option:
FitToScreentofitToScreen. - Renamed the option:
MatchBackgroundtomatchBackground.
Class org.fbreader.view.options.ViewOptions
- Renamed the option:
LeftMargintoleftMargin. - Renamed the option:
RightMargintorightMargin. - Renamed the option:
TopMargintotopMargin. - Renamed the option:
BottomMargintobottomMargin. - Renamed the option:
SpaceBetweenColumnstospaceBetweenColumns. - Renamed the option:
ScreenBrigthnessLeveltoscreenBrigthnessLevel. - Added a new option:
minScreenBrightnessLevel; accepts value from 1 to 10, in percents; used inTextWidget.setScreenBrightnessmethod. It can be useful for devices that switch the screen to black too early. - Renamed the option:
BooleanOption TwoColumnViewtoEnumOption<ViewOptions.Orientation> twoColumnView. The option defines if theTextWidgetsplits page into two columns, depending on the screen orientation. - The interface
public interface Scrollbar { int HIDE = 0; int SHOW = 1; int SHOW_AS_PROGRESS = 2; int SHOW_AS_FOOTER = 3; int SHOW_AS_FOOTER_OLD_STYLE = 4; }has been replaced withpublic enum ProgressIndicatorType { none, scroller, scrollerAsProgress, footer, footerOldStyle } - Renamed the option:
IntegerRangeOption ScrollbarTypetoEnumOption<ViewOptions.ProgressIndicatorType> indicatorType.
Class org.fbreader.widget.options.PageTurningOptions
- Renamed the option:
Animationtoanimation. - Renamed the option:
AnimationSpeedtoanimationSpeed. - Removed the option
BooleanOption Horizontal. Use two options below instead. - Added the option
EnumOption<Direction> animationDirection. Defines the directoin of animation started with no initial position. - Added the option
EnumOption<Direction> flickPageTurningDirection. - Added the option
StringOption minForwardFlickDistance. - Added the option
BooleanOption continuousScrolling. - The enum has been renamed and changed:
public static enum FingerScrollingType { byTap, byFlick, byTapAndFlick }topublic static enum GestureType { tap, flick, tapAndFlick, none } - Renamed the option:
FingerScrollingtosupportedGestures.