public static class ContentView.Options
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
mInvalidate |
protected boolean |
mInvalidateLines |
protected boolean |
mInvalidateMeasurement |
protected ContentView.OptionsChangeListener |
mListener |
Constructor and Description |
---|
ContentView.Options() |
ContentView.Options(ContentView.Options source) |
ContentView.Options(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
Modifier and Type | Method and Description |
---|---|
void |
apply()
notify change listener about invalidation level
|
void |
copy(ContentView.Options source) |
ContentView.Options |
enableJustification(boolean justification)
enable/disable full text justification
|
void |
fromAttributes(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
int |
getDefaultDirection() |
float |
getDrawableMinimumScaleFactor() |
android.graphics.Rect |
getDrawablePaddings() |
void |
getDrawablePaddings(android.graphics.Rect rect) |
float |
getDrawableWrapRatioTreshold() |
float |
getDrawableWrapWidthTreshold() |
int |
getEmptyLineHeightLimit()
empty lines height must be less or equals to limit
|
int |
getEmptyLinesThreshold() |
ImagePlacementHandler |
getImagePlacementHandler() |
LineBreaker |
getLineBreaker() |
int |
getLineSpacingAdd() |
float |
getLineSpacingMultiplier() |
int |
getNewLineLeftMargin() |
int |
getNewLineTopMargin() |
int |
getReflowQuantize() |
java.lang.String |
getReflowThreadPoolTag() |
int |
getSelectionColor() |
android.os.Bundle |
getState() |
android.graphics.Rect |
getTextPaddings() |
boolean |
isAsyncReflow() |
boolean |
isFilterEmptyLines() |
boolean |
isJustification() |
void |
set(android.os.Bundle in)
set options from bundle
|
void |
setChangeListener(ContentView.OptionsChangeListener listener)
sets object, which must handle notifications about options updated
|
ContentView.Options |
setDefaultDirection(int direction)
set default text direction (NOT SUPPORTED YET)
|
ContentView.Options |
setDrawableMinimumScaleFactor(float factor) |
ContentView.Options |
setDrawablePaddings(int left,
int top,
int right,
int bottom)
set paddings, applied to all drawables in text
(text and drawables has separated paddings)
|
ContentView.Options |
setDrawableWrapRatioTreshold(float treshold) |
ContentView.Options |
setDrawableWrapWidthTreshold(float treshold) |
ContentView.Options |
setFilterEmptyLines(boolean filter)
if true - ContentView will skip lines with zero length, if sufficient lines
was added to paragraph (see setEmptyLinesThreashold)
|
ContentView.Options |
setImagePlacementHandler(ImagePlacementHandler handler) |
ContentView.Options |
setLineBreaker(LineBreaker lineBreaker) |
ContentView.Options |
setLineSpacingAdd(int add) |
ContentView.Options |
setLineSpacingMultiplier(float mult) |
ContentView.Options |
setNewLineLeftMargin(int margin) |
ContentView.Options |
setNewLineTopMargin(int margin) |
ContentView.Options |
setReflowQuantize(int milliseconds) |
void |
setTextPaddings(int left,
int top,
int right,
int bottom)
set text paddings (in additional to view's padding)
|
ContentView.Options |
setTextSize(float size)
change base text size
|
protected boolean mInvalidateMeasurement
protected boolean mInvalidateLines
protected boolean mInvalidate
protected ContentView.OptionsChangeListener mListener
public ContentView.Options()
public ContentView.Options(ContentView.Options source)
public ContentView.Options(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
public void copy(ContentView.Options source)
public void set(android.os.Bundle in)
in
- - android.os.Bundlepublic android.os.Bundle getState()
public void fromAttributes(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
public void setChangeListener(ContentView.OptionsChangeListener listener)
listener
- - instance of OptionsChangeListenerpublic ContentView.Options setFilterEmptyLines(boolean filter)
filter
- public boolean isFilterEmptyLines()
public ContentView.Options enableJustification(boolean justification)
justification
- public ContentView.Options setDefaultDirection(int direction)
direction
- public int getDefaultDirection()
public ContentView.Options setDrawablePaddings(int left, int top, int right, int bottom)
left
- top
- right
- bottom
- public void getDrawablePaddings(android.graphics.Rect rect)
rect
- - this Rect instance will be contain paddings after callpublic ContentView.Options setImagePlacementHandler(ImagePlacementHandler handler)
handler
- - implementation of ImagePlacementHandlerpublic ImagePlacementHandler getImagePlacementHandler()
public ContentView.Options setLineBreaker(LineBreaker lineBreaker)
lineBreaker
- - LineBreaker instancepublic LineBreaker getLineBreaker()
public ContentView.Options setLineSpacingMultiplier(float mult)
mult
- - multiply argument for calculating linespacing (by default 1.0)public float getLineSpacingMultiplier()
public ContentView.Options setLineSpacingAdd(int add)
add
- - additional space between lines (in pixels)public int getLineSpacingAdd()
public ContentView.Options setReflowQuantize(int milliseconds)
milliseconds
- - maximum time between calling onProgress()public int getReflowQuantize()
public boolean isJustification()
public int getEmptyLineHeightLimit()
public int getEmptyLinesThreshold()
public ContentView.Options setNewLineLeftMargin(int margin)
margin
- - additional start padding to each line after '\n'public int getNewLineLeftMargin()
public ContentView.Options setNewLineTopMargin(int margin)
margin
- - additional top padding to each line after '\n'public int getNewLineTopMargin()
public void apply()
public void setTextPaddings(int left, int top, int right, int bottom)
left
- top
- right
- bottom
- public android.graphics.Rect getTextPaddings()
public android.graphics.Rect getDrawablePaddings()
public ContentView.Options setTextSize(float size)
size
- public float getDrawableMinimumScaleFactor()
public ContentView.Options setDrawableMinimumScaleFactor(float factor)
public float getDrawableWrapRatioTreshold()
public ContentView.Options setDrawableWrapRatioTreshold(float treshold)
public float getDrawableWrapWidthTreshold()
public ContentView.Options setDrawableWrapWidthTreshold(float treshold)
public boolean isAsyncReflow()
public java.lang.String getReflowThreadPoolTag()
public int getSelectionColor()