Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98f40163 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

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
parents 24cecfbb 97f3209b
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -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;
@@ -250,6 +251,20 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
        mStarredView.setChecked(starred);
    }

    /**
     * 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.
@@ -363,18 +378,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}.
     */
+1 −1
Original line number Diff line number Diff line
@@ -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"