From bac4b86ec3aa1d1fd0d6899b38a57803ee55511e Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 17 Jul 2019 09:45:20 +1000 Subject: [PATCH] Further Lokify settings UI --- res/drawable/icon_seedling.xml | 9 +++++++++ res/drawable/icon_share.xml | 9 +++++++++ res/xml/preferences.xml | 4 ++-- .../securesms/preferences/widgets/ProfilePreference.java | 3 +++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 res/drawable/icon_seedling.xml create mode 100644 res/drawable/icon_share.xml diff --git a/res/drawable/icon_seedling.xml b/res/drawable/icon_seedling.xml new file mode 100644 index 0000000000..820b0b2617 --- /dev/null +++ b/res/drawable/icon_seedling.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/res/drawable/icon_share.xml b/res/drawable/icon_share.xml new file mode 100644 index 0000000000..afa355e8e2 --- /dev/null +++ b/res/drawable/icon_share.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 5eeb3568f7..6dd209dc70 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -35,10 +35,10 @@ + android:icon="@drawable/icon_share"/> + android:icon="@drawable/icon_seedling"/> diff --git a/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java b/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java index e2afb38192..5c56ef6d49 100644 --- a/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java +++ b/src/org/thoughtcrime/securesms/preferences/widgets/ProfilePreference.java @@ -8,6 +8,7 @@ import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceViewHolder; import android.text.TextUtils; import android.util.AttributeSet; +import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -78,6 +79,8 @@ public class ProfilePreference extends Preference { profileNameView.setText(profileName); } + profileNameView.setVisibility(TextUtils.isEmpty(profileName) ? View.GONE : View.VISIBLE); + profileNumberView.setText(localAddress.toPhoneString()); } }