Small layout improvements

Refs #166
pull/167/head
M66B 6 years ago
parent a71f231218
commit 8e8b947b99

@ -30,11 +30,11 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
} }
@Override @Override
public View getDropDownView(int position, View convertView, ViewGroup parent) { public View getDropDownView(int position, View convertView, @NonNull ViewGroup parent) {
return getLayout(position, convertView, parent, R.layout.spinner_item2_dropdown); return getLayout(position, convertView, parent, R.layout.spinner_item2_dropdown);
} }
View getLayout(int position, View convertView, ViewGroup parent, int resid) { private View getLayout(int position, View convertView, ViewGroup parent, int resid) {
View view = LayoutInflater.from(context).inflate(resid, parent, false); View view = LayoutInflater.from(context).inflate(resid, parent, false);
TupleIdentityEx identity = identities.get(position); TupleIdentityEx identity = identities.get(position);
@ -44,8 +44,8 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
TextView text2 = view.findViewById(android.R.id.text2); TextView text2 = view.findViewById(android.R.id.text2);
vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color); vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color);
text1.setText(identity.accountName + "/" + identity.getDisplayName() + (identity.primary ? " ★" : "")); text1.setText(identity.getDisplayName() + (identity.primary ? " ★" : ""));
text2.setText(identity.email); text2.setText(identity.accountName + "/" + identity.email);
return view; return view;
} }

Loading…
Cancel
Save