diff options
author | blong <blong@codeaurora.org> | 2014-11-03 15:37:14 +0800 |
---|---|---|
committer | Xiaojing Zhang <zhangx@codeaurora.org> | 2014-11-04 20:34:57 -0800 |
commit | e4b2b7ef0304be52697591271730eaff8a2b8115 (patch) | |
tree | 3d49546d0ca5886e183c31ef33744301dca73609 | |
parent | adab5d2339ae3f2bea73e3b71d5bbb89f9ea1c46 (diff) | |
download | android_packages_apps_ContactsCommon-e4b2b7ef0304be52697591271730eaff8a2b8115.tar.gz android_packages_apps_ContactsCommon-e4b2b7ef0304be52697591271730eaff8a2b8115.tar.bz2 android_packages_apps_ContactsCommon-e4b2b7ef0304be52697591271730eaff8a2b8115.zip |
Hide the icon frame
- It will display a blank area when don't set icon for preference,
so hide the icon frame.
Change-Id: I017efb351c3b52ba41d54e5e561cb9970df538c5
-rwxr-xr-x[-rw-r--r--] | src/com/android/contacts/common/preference/DisplayOrderPreference.java | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | src/com/android/contacts/common/preference/SortOrderPreference.java | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/preference/DisplayOrderPreference.java b/src/com/android/contacts/common/preference/DisplayOrderPreference.java index 6a182c51..c053466d 100644..100755 --- a/src/com/android/contacts/common/preference/DisplayOrderPreference.java +++ b/src/com/android/contacts/common/preference/DisplayOrderPreference.java @@ -21,6 +21,8 @@ import android.content.Context; import android.preference.ListPreference; import android.provider.ContactsContract; import android.util.AttributeSet; +import android.view.View; +import android.widget.ImageView; import com.android.contacts.common.R; import com.android.contacts.common.preference.ContactsPreferences; @@ -89,4 +91,13 @@ public final class DisplayOrderPreference extends ListPreference { super.onPrepareDialogBuilder(builder); builder.setNegativeButton(null, null); } + + @Override + protected void onBindView(View view) { + super.onBindView(view); + final View imageFrame = view.findViewById(com.android.internal.R.id.icon_frame); + if (imageFrame != null) { + imageFrame.setVisibility(View.GONE); + } + } } diff --git a/src/com/android/contacts/common/preference/SortOrderPreference.java b/src/com/android/contacts/common/preference/SortOrderPreference.java index dfd9550b..863d9845 100644..100755 --- a/src/com/android/contacts/common/preference/SortOrderPreference.java +++ b/src/com/android/contacts/common/preference/SortOrderPreference.java @@ -20,6 +20,8 @@ import android.app.AlertDialog.Builder; import android.content.Context; import android.preference.ListPreference; import android.util.AttributeSet; +import android.view.View; +import android.widget.ImageView; import com.android.contacts.common.R; import com.android.contacts.common.preference.ContactsPreferences; @@ -88,4 +90,13 @@ public final class SortOrderPreference extends ListPreference { super.onPrepareDialogBuilder(builder); builder.setNegativeButton(null, null); } + + @Override + protected void onBindView(View view) { + super.onBindView(view); + final View imageFrame = view.findViewById(com.android.internal.R.id.icon_frame); + if (imageFrame != null) { + imageFrame.setVisibility(View.GONE); + } + } } |