Slight layout change, keep id on single line

This commit is contained in:
Vincent Breitmoser 2018-04-03 01:06:11 +02:00
parent ee7706b5e9
commit 650fb911ff
2 changed files with 7 additions and 3 deletions

View file

@ -444,12 +444,14 @@ public class RemoteSelectIdKeyActivity extends FragmentActivity {
void bind(KeyInfo keyInfo, Drawable selectionIcon) {
Context context = vCreation.getContext();
String email = keyInfo.getEmail();
String name = keyInfo.getName();
if (name != null) {
if (email != null) {
vName.setText(context.getString(R.string.use_key, email));
} else if (name != null) {
vName.setText(context.getString(R.string.use_key, name));
} else {
String email = keyInfo.getEmail();
vName.setText(context.getString(R.string.use_key, email));
vName.setText(context.getString(R.string.use_key_no_name));
}
String dateTime = DateUtils.formatDateTime(context, keyInfo.getCreationDate(),

View file

@ -30,6 +30,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:maxLines="1"
android:ellipsize="end"
tools:text="Use key: look@my.amazin.horse"
/>