bug fix
This commit is contained in:
@@ -343,11 +343,13 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
private final View rootView;
|
||||
private final TextView subcategoryNameItem;
|
||||
private final View bottomLineView;
|
||||
|
||||
ItemViewHolder(View view) {
|
||||
super(view);
|
||||
rootView = view;
|
||||
subcategoryNameItem = (TextView) view.findViewById(R.id.subcategoryNameItem);
|
||||
bottomLineView = (View) view.findViewById(R.id.bottomLineView);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +394,12 @@ public class MainActivity extends BaseActivity {
|
||||
final ItemViewHolder itemHolder = (ItemViewHolder) holder;
|
||||
String name = list.get(position).getName();
|
||||
itemHolder.subcategoryNameItem.setText(name);
|
||||
if(position == list.size() - 1){
|
||||
itemHolder.bottomLineView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
itemHolder.bottomLineView.setVisibility(View.GONE);
|
||||
}
|
||||
itemHolder.rootView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -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