summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-04-18 11:33:46 -0700
committerAndrew Lee <anwlee@google.com>2014-04-18 11:36:51 -0700
commit099592e51291f9b08abf775f1e5f43dcbc95a050 (patch)
tree97b11544007437a9da96db03222073c44f642974 /src
parentb70f8a8f6e0016bbb1876a5127f635acd4568a05 (diff)
Add favorites/star icon to the phone favorite tile view.
Bug: 14116267 Change-Id: Id4ea8dafcfe4fa46ab0ea7677cada4f2e64aff7a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteTileView.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index 047f381ae..7fe4eaa65 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
+import android.widget.ImageView;
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.MoreContactUtils;
@@ -87,17 +88,20 @@ public abstract class PhoneFavoriteTileView extends ContactTileView {
@Override
public void loadFromContact(ContactEntry entry) {
super.loadFromContact(entry);
- mPhoneNumberString = null; // ... in case we're reusing the view
+ // Set phone number to null in case we're reusing the view.
+ mPhoneNumberString = null;
if (entry != null) {
- // Grab the phone-number to call directly... see {@link onClick()}
+ // Grab the phone-number to call directly. See {@link onClick()}.
mPhoneNumberString = entry.phoneNumber;
// If this is a blank entry, don't show anything.
- // TODO krelease:Just hide the view for now. For this to truly look like an empty row
+ // TODO krelease: Just hide the view for now. For this to truly look like an empty row
// the entire ContactTileRow needs to be hidden.
if (entry == ContactEntry.BLANK_ENTRY) {
setVisibility(View.INVISIBLE);
} else {
+ final ImageView starIcon = (ImageView) findViewById(R.id.contact_star_icon);
+ starIcon.setVisibility(entry.isFavorite ? View.VISIBLE : View.GONE);
setVisibility(View.VISIBLE);
}
}