From b8d2dc67d1888799cd6ccefb5ed4e80ce0e0eb67 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 17 Aug 2019 09:56:42 +0200 Subject: [PATCH] Show identity color in selector --- .../eu/faircode/email/FragmentCompose.java | 3 ++ app/src/main/res/layout/spinner_item2.xml | 28 +++++++++++++++---- .../res/layout/spinner_item2_dropdown.xml | 28 +++++++++++++++---- 3 files changed, 47 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index eeddbad6d5..a1c6e85754 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -3095,6 +3095,9 @@ public class FragmentCompose extends FragmentBase { TupleIdentityEx identity = identities.get(position); + View vwColor = view.findViewById(R.id.vwColor); + vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color); + TextView text1 = view.findViewById(android.R.id.text1); text1.setText(identity.accountName + "/" + identity.getDisplayName() + (identity.primary ? " ★" : "")); diff --git a/app/src/main/res/layout/spinner_item2.xml b/app/src/main/res/layout/spinner_item2.xml index 44f9e05e69..536ffd155f 100644 --- a/app/src/main/res/layout/spinner_item2.xml +++ b/app/src/main/res/layout/spinner_item2.xml @@ -2,25 +2,41 @@ + android:layout_height="wrap_content"> + + \ No newline at end of file diff --git a/app/src/main/res/layout/spinner_item2_dropdown.xml b/app/src/main/res/layout/spinner_item2_dropdown.xml index 44f9e05e69..536ffd155f 100644 --- a/app/src/main/res/layout/spinner_item2_dropdown.xml +++ b/app/src/main/res/layout/spinner_item2_dropdown.xml @@ -2,25 +2,41 @@ + android:layout_height="wrap_content"> + + \ No newline at end of file