Merge "Resolver/Chooser - Fix reuse of textview" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ab3811efea
@@ -689,17 +689,17 @@ public class ResolverListAdapter extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void bindLabel(CharSequence label, CharSequence subLabel, boolean showSubLabel) {
|
public void bindLabel(CharSequence label, CharSequence subLabel, boolean showSubLabel) {
|
||||||
if (!TextUtils.equals(text.getText(), label)) {
|
|
||||||
text.setText(label);
|
text.setText(label);
|
||||||
}
|
|
||||||
|
|
||||||
if (TextUtils.equals(label, subLabel)) {
|
if (TextUtils.equals(label, subLabel)) {
|
||||||
subLabel = "";
|
subLabel = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSubLabel || !TextUtils.equals(text2.getText(), subLabel)) {
|
|
||||||
text2.setVisibility(View.VISIBLE);
|
|
||||||
text2.setText(subLabel);
|
text2.setText(subLabel);
|
||||||
|
if (showSubLabel || subLabel != null) {
|
||||||
|
text2.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
text2.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
itemView.setContentDescription(null);
|
itemView.setContentDescription(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user