public class PinCode
extends android.support.v7.widget.AppCompatEditText
Modifier and Type | Class and Description |
---|---|
static interface |
PinCode.OnTextChangeListener |
Constructor and Description |
---|
PinCode(android.content.Context context) |
PinCode(android.content.Context context,
android.util.AttributeSet attributeset) |
PinCode(android.content.Context context,
android.util.AttributeSet attributeset,
int defStyledAttrs) |
Modifier and Type | Method and Description |
---|---|
void |
hideText() |
void |
invalidate() |
boolean |
isTextVisible() |
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
protected void |
onTextChanged(java.lang.CharSequence text,
int start,
int lengthBefore,
int lengthAfter) |
void |
setBoxColor(int color) |
void |
setBoxCount(int itemCount) |
void |
setBoxWidthAndHeight(int widthAndHeight) |
void |
setBoxWidthAndHeightDP(int widthAndHeight) |
void |
setHighlightedBoxColor(int color) |
void |
setImageResource(int imageResource) |
void |
setImageResource(int imageResource,
int width,
int height) |
void |
setImageResourceDP(int imageResource,
int widthDP,
int heightDP)
set the picture
|
void |
setMarginBetweenBox(int marginBetweenBox) |
void |
setMarginBetweenBoxDp(int marginBetweenBoxDp) |
void |
setMaxEms(int maxEms) |
void |
setMaxLines(int maxLines) |
void |
setStrkoeWidthDP(float widthDP) |
void |
setStrokeWidth(float width) |
void |
setTextChangeListener(PinCode.OnTextChangeListener listener) |
void |
setTextColor(android.content.res.ColorStateList colors) |
void |
setTextColor(int color) |
void |
setTextSize(float textSize) |
void |
setTextSizeDP(float textSize) |
void |
showText() |
public PinCode(android.content.Context context)
public PinCode(android.content.Context context, android.util.AttributeSet attributeset)
public PinCode(android.content.Context context, android.util.AttributeSet attributeset, int defStyledAttrs)
protected void onDraw(android.graphics.Canvas canvas)
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
protected void onTextChanged(java.lang.CharSequence text, int start, int lengthBefore, int lengthAfter)
public void setTextChangeListener(PinCode.OnTextChangeListener listener)
public void showText()
public void hideText()
public boolean isTextVisible()
public void setMarginBetweenBoxDp(int marginBetweenBoxDp)
public void setMarginBetweenBox(int marginBetweenBox)
public void setBoxCount(int itemCount)
public void setMaxLines(int maxLines)
public void setMaxEms(int maxEms)
public void setTextSize(float textSize)
public void setHighlightedBoxColor(int color)
public void setBoxColor(int color)
public void setStrkoeWidthDP(float widthDP)
public void setStrokeWidth(float width)
public void setTextColor(int color)
public void setTextColor(android.content.res.ColorStateList colors)
public void setTextSizeDP(float textSize)
public void setBoxWidthAndHeight(int widthAndHeight)
public void setBoxWidthAndHeightDP(int widthAndHeight)
public void invalidate()
public void setImageResource(int imageResource)
public void setImageResource(int imageResource, int width, int height)
public void setImageResourceDP(int imageResource, int widthDP, int heightDP)
imageResource
- imagereourcewidthDP
- the width of the picture the value will be converted to DP , the width
of picture should be smalled than the width of the boxheightDP
- the height of the picture the value will be converted to DP , the height
should be smaller than the box height