diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:00:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:00:34 -0700 |
commit | 98f40163b9d811f9decd27492338f9d1921a0334 (patch) | |
tree | f0ab1062804829dde14c59a444ae21ab36a6bd32 | |
parent | 24cecfbbbcf9a40cc7730834e1945e239804ebfd (diff) | |
parent | 97f3209b45dd59b814dda70f1cc90ee8bc5f1319 (diff) | |
download | frameworks_base-98f40163b9d811f9decd27492338f9d1921a0334.zip frameworks_base-98f40163b9d811f9decd27492338f9d1921a0334.tar.gz frameworks_base-98f40163b9d811f9decd27492338f9d1921a0334.tar.bz2 |
Merge change 21162
* changes:
more support for bindStatic some minor tweaks to the layout in the hopes I can start using this for gtalk soon
-rw-r--r-- | core/java/com/android/internal/widget/ContactHeaderWidget.java | 27 | ||||
-rw-r--r-- | core/res/res/layout/contact_header_name.xml | 2 |
2 files changed, 16 insertions, 13 deletions
diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java index 85f7ae8..30349b3 100644 --- a/core/java/com/android/internal/widget/ContactHeaderWidget.java +++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java @@ -27,6 +27,7 @@ import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Rect; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Handler; import android.os.Message; @@ -251,6 +252,20 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList } /** + * Manually set the presence. + */ + public void setPresence(int presence) { + mPresenceView.setImageResource(Presence.getPresenceIconResourceId(presence)); + } + + /** + * Manually set the contact uri + */ + public void setContactUri(Uri uri) { + mContactUri = uri; + } + + /** * Manually set the photo to display in the header. This doesn't change the * underlying {@link Contacts}, only the UI state. */ @@ -364,18 +379,6 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList } /** - * @deprecated use {@link #setDisplayName(CharSequence, CharSequence)} and - * {@link #setSocialSnippet(CharSequence)} instead. - */ - @Deprecated - public void bindStatic(String main, String secondary) { - mDisplayNameView.setText(main); - mStatusView.setText(secondary); - mStarredView.setVisibility(View.GONE); - mPhotoView.setImageBitmap(loadPlaceholderPhoto(null)); - } - - /** * Bind the contact details provided by the given {@link Cursor}. */ protected void bindContactInfo(Cursor c) { diff --git a/core/res/res/layout/contact_header_name.xml b/core/res/res/layout/contact_header_name.xml index 77751c3..9039702 100644 --- a/core/res/res/layout/contact_header_name.xml +++ b/core/res/res/layout/contact_header_name.xml @@ -19,7 +19,7 @@ android:id="@+id/name" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceLargeInverse" + android:textAppearance="?android:attr/textAppearanceMediumInverse" android:textColor="@android:color/secondary_text_light" android:singleLine="true" android:ellipsize="end" |