public class PinView
extends AppCompatEditText
| Constructor and Description |
|---|
PinView(android.content.Context context) |
PinView(android.content.Context context,
android.util.AttributeSet attrs) |
PinView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawableStateChanged() |
int |
getCurrentLineColor()
Return the current color selected for normal line.
|
int |
getCursorColor()
Gets the cursor color.
|
int |
getCursorWidth() |
protected android.text.method.MovementMethod |
getDefaultMovementMethod() |
int |
getItemCount() |
float |
getItemHeight() |
int |
getItemRadius() |
int |
getItemSpacing() |
float |
getItemWidth() |
android.content.res.ColorStateList |
getLineColors()
Gets the line colors for the different states (normal, selected, focused) of the PinView.
|
int |
getLineWidth() |
boolean |
isCursorVisible() |
protected void |
onAttachedToWindow() |
protected void |
onDetachedFromWindow() |
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onFocusChanged(boolean focused,
int direction,
android.graphics.Rect previouslyFocusedRect) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onScreenStateChanged(int screenState) |
protected void |
onSelectionChanged(int selStart,
int selEnd) |
protected void |
onTextChanged(java.lang.CharSequence text,
int start,
int lengthBefore,
int lengthAfter) |
void |
setAnimationEnable(boolean enable)
Specifies whether the text animation should be enabled or disabled.
|
void |
setCursorColor(int color)
Sets the cursor color.
|
void |
setCursorVisible(boolean visible) |
void |
setCursorWidth(int width)
Sets the width (in pixels) of cursor.
|
void |
setItemCount(int count)
Sets the count of items.
|
void |
setItemHeight(float itemHeight)
Sets the height of item.
|
void |
setItemRadius(int itemRadius)
Sets the radius of square.
|
void |
setItemSpacing(int itemSpacing)
Specifies extra space between two items.
|
void |
setItemWidth(float itemWidth)
Sets the width of item.
|
void |
setLineColor(android.content.res.ColorStateList colors)
Sets the line color.
|
void |
setLineColor(int color)
Sets the line color for all the states (normal, selected,
focused) to be this color.
|
void |
setLineWidth(int borderWidth)
Sets the line width.
|
void |
setTextSize(float size) |
void |
setTextSize(int unit,
float size) |
public PinView(android.content.Context context)
public PinView(android.content.Context context,
android.util.AttributeSet attrs)
public PinView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
protected void onTextChanged(java.lang.CharSequence text,
int start,
int lengthBefore,
int lengthAfter)
protected void onFocusChanged(boolean focused,
int direction,
android.graphics.Rect previouslyFocusedRect)
protected void onSelectionChanged(int selStart,
int selEnd)
protected void drawableStateChanged()
protected void onDraw(android.graphics.Canvas canvas)
protected android.text.method.MovementMethod getDefaultMovementMethod()
public void setLineColor(int color)
color - A color value in the form 0xAARRGGBB.
Do not pass a resource ID. To get a color value from a resource ID, call
getColor.setLineColor(ColorStateList),
getLineColors()public void setLineColor(android.content.res.ColorStateList colors)
setLineColor(int),
getLineColors()public android.content.res.ColorStateList getLineColors()
setLineColor(ColorStateList),
setLineColor(int)public int getCurrentLineColor()
Return the current color selected for normal line.
public void setLineWidth(int borderWidth)
getLineWidth()public int getLineWidth()
setLineWidth(int)public void setItemCount(int count)
getItemCount()public int getItemCount()
setItemCount(int)public void setItemRadius(int itemRadius)
getItemRadius()public int getItemRadius()
setItemRadius(int)public void setItemSpacing(int itemSpacing)
getItemSpacing()public int getItemSpacing()
setItemSpacing(int)public void setItemHeight(float itemHeight)
getItemHeight()public float getItemHeight()
setItemHeight(float)public void setItemWidth(float itemWidth)
getItemWidth()public float getItemWidth()
setItemWidth(float)public void setAnimationEnable(boolean enable)
enable - True to start animation when adding text, false to transition immediatelypublic void setTextSize(float size)
public void setTextSize(int unit,
float size)
public void setCursorWidth(int width)
getCursorWidth()public int getCursorWidth()
setCursorWidth(int)public void setCursorColor(int color)
color - A color value in the form 0xAARRGGBB.
Do not pass a resource ID. To get a color value from a resource ID, call
getColor.getCursorColor()public int getCursorColor()
setCursorColor(int)public void setCursorVisible(boolean visible)
public boolean isCursorVisible()
public void onScreenStateChanged(int screenState)
protected void onAttachedToWindow()
protected void onDetachedFromWindow()