bug fix
This commit is contained in:
@@ -35,6 +35,7 @@ public class AppEditText extends LinearLayout implements View.OnClickListener {
|
||||
private String hint;
|
||||
private String inputType;
|
||||
private String edittextTheme;
|
||||
private int characterCount;
|
||||
|
||||
/*
|
||||
public PizzalinkEditText(LinearLayout rootView, boolean isLeftIconVisible, int leftIconId,
|
||||
@@ -57,6 +58,7 @@ public class AppEditText extends LinearLayout implements View.OnClickListener {
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.AppEditText, 0, 0);
|
||||
try {
|
||||
hint = a.getString(R.styleable.AppEditText_hint);
|
||||
characterCount = a.getInt(R.styleable.AppEditText_characterCount, 5-1);
|
||||
inputType = a.getString(R.styleable.AppEditText_inputType);
|
||||
edittextTheme = a.getString(R.styleable.AppEditText_edittextTheme);
|
||||
} finally {
|
||||
@@ -77,6 +79,11 @@ public class AppEditText extends LinearLayout implements View.OnClickListener {
|
||||
editText.setTextColor(navyColor);
|
||||
bottomLineLayout.setBackgroundColor(navyColor);
|
||||
}
|
||||
|
||||
if(characterCount != -1){
|
||||
int maxLength = characterCount;
|
||||
editText.setFilters(new InputFilter[] {new InputFilter.LengthFilter(maxLength)});
|
||||
}
|
||||
setInputType();
|
||||
rootView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user