FBReader SDK for Android: API changes in version 1.2.0
Class org.fbreader.text.widget.TextWidget
- The method
pageInText
returnsnull
if the book is not loaded yet. Recently, it returned the fake value(1, 1)
. - The method
getBackgroundColor
has gone. UseColorProfile.backgroundColor()
instead. - The new method
boolean showsTwoPages()
. To change it's value, use theViewOptions.twoColumnView
option. - 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
imageAdjusting
is replaced withimageAdjustingMode()
method. The value is not configurable anymore. The mode depends on theisLight
value. - The method
getWallpaperFile
has 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:
footerNGBackground
tofooterBackground
. - Renamed the option:
footerNGForeground
tofooterForeground
. - Renamed the option:
footerNGForegroundUnread
tofooterForegroundUnread
. - Renamed the option:
footerFill
tofooterOldStyleFill
.
New class org.fbreader.view.options.EInkOptions
- The option:
BooleanOption screenIsEnk
that 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:
FitToScreen
tofitToScreen
. - Renamed the option:
MatchBackground
tomatchBackground
.
Class org.fbreader.view.options.ViewOptions
- Renamed the option:
LeftMargin
toleftMargin
. - Renamed the option:
RightMargin
torightMargin
. - Renamed the option:
TopMargin
totopMargin
. - Renamed the option:
BottomMargin
tobottomMargin
. - Renamed the option:
SpaceBetweenColumns
tospaceBetweenColumns
. - Renamed the option:
ScreenBrigthnessLevel
toscreenBrigthnessLevel
. - Added a new option:
minScreenBrightnessLevel
; accepts value from 1 to 10, in percents; used inTextWidget.setScreenBrightness
method. It can be useful for devices that switch the screen to black too early. - Renamed the option:
BooleanOption TwoColumnView
toEnumOption<ViewOptions.Orientation> twoColumnView
. The option defines if theTextWidget
splits 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 ScrollbarType
toEnumOption<ViewOptions.ProgressIndicatorType> indicatorType
.
Class org.fbreader.widget.options.PageTurningOptions
- Renamed the option:
Animation
toanimation
. - Renamed the option:
AnimationSpeed
toanimationSpeed
. - 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:
FingerScrolling
tosupportedGestures
.