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() |
int |
getItemCount() |
int |
getItemHeight() |
int |
getItemRadius() |
int |
getItemSpacing() |
int |
getItemWidth() |
android.content.res.ColorStateList |
getLineColors()
Gets the line colors for the different states (normal, selected, focused) of the PinView.
|
int |
getLineWidth() |
boolean |
isCursorVisible() |
boolean |
isSuggestionsEnabled() |
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 |
setHideLineWhenFilled(boolean hideLineWhenFilled)
Specifies whether the line (border) should be hidden or visible when text entered.
|
void |
setItemBackground(android.graphics.drawable.Drawable background)
Set the item background to a given Drawable, or remove the background.
|
void |
setItemBackgroundColor(int color)
Sets the item background color for this view.
|
void |
setItemBackgroundResources(int resId)
Set the item background to a given resource.
|
void |
setItemCount(int count)
Sets the count of items.
|
void |
setItemHeight(int 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(int 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) |
void |
setTypeface(android.graphics.Typeface tf) |
void |
setTypeface(android.graphics.Typeface tf,
int style) |
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)
public void setTypeface(android.graphics.Typeface tf,
int style)
public void setTypeface(android.graphics.Typeface tf)
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)
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(int itemHeight)
getItemHeight()public int getItemHeight()
setItemHeight(int)public void setItemWidth(int itemWidth)
getItemWidth()public int getItemWidth()
setItemWidth(int)public void setAnimationEnable(boolean enable)
enable - True to start animation when adding text, false to transition immediatelypublic void setHideLineWhenFilled(boolean hideLineWhenFilled)
hideLineWhenFilled - true to hide line on a position where text entered,
false to always show linepublic void setTextSize(float size)
public void setTextSize(int unit,
float size)
public void setItemBackgroundResources(int resId)
resId - The identifier of the resource.public void setItemBackgroundColor(int color)
color - the color of the item backgroundpublic void setItemBackground(android.graphics.drawable.Drawable background)
background - The Drawable to use as the item background, or null to remove the
item backgroundpublic 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()
public boolean isSuggestionsEnabled()