am 1935a341: Merge change I9d12beeb into eclair
Merge commit '1935a3417e986d38b9a0d981c3dbd06acf75a9fc' into eclair-plus-aosp * commit '1935a3417e986d38b9a0d981c3dbd06acf75a9fc': Change FasttrackBadgeWidget->QuickContactBadge and make public.
This commit is contained in:
@@ -36,12 +36,10 @@ import android.view.View.OnClickListener;
|
||||
import com.android.internal.R;
|
||||
|
||||
/**
|
||||
* Widget used to show an image with the standard fasttrack badge
|
||||
* Widget used to show an image with the standard QuickContact badge
|
||||
* and on-click behavior.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
public class QuickContactBadge extends ImageView implements OnClickListener {
|
||||
|
||||
private Uri mContactUri;
|
||||
private String mContactEmail;
|
||||
@@ -74,22 +72,22 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
|
||||
|
||||
|
||||
public FasttrackBadgeWidget(Context context) {
|
||||
public QuickContactBadge(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public FasttrackBadgeWidget(Context context, AttributeSet attrs) {
|
||||
public QuickContactBadge(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public FasttrackBadgeWidget(Context context, AttributeSet attrs, int defStyle) {
|
||||
public QuickContactBadge(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
TypedArray a =
|
||||
context.obtainStyledAttributes(attrs,
|
||||
com.android.internal.R.styleable.FasttrackBadgeWidget, defStyle, 0);
|
||||
com.android.internal.R.styleable.QuickContactBadge, defStyle, 0);
|
||||
|
||||
mMode = a.getInt(com.android.internal.R.styleable.FasttrackBadgeWidget_fasttrackWindowSize,
|
||||
mMode = a.getInt(com.android.internal.R.styleable.QuickContactBadge_quickContactWindowSize,
|
||||
FastTrack.MODE_MEDIUM);
|
||||
|
||||
a.recycle();
|
||||
@@ -105,8 +103,8 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign the contact uri that this fasttrack badge should be associated
|
||||
* with. Note that this is only used for displaying the fasttrack window and
|
||||
* Assign the contact uri that this QuickContactBadge should be associated
|
||||
* with. Note that this is only used for displaying the QuickContact window and
|
||||
* won't bind the contact's photo for you.
|
||||
*
|
||||
* @param contactUri Either a {@link Contacts#CONTENT_URI} or
|
||||
@@ -122,7 +120,7 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
private void onContactUriChanged() {
|
||||
if (mContactUri == null && mContactEmail == null && mContactPhone == null) {
|
||||
if (mNoBadgeBackground == null) {
|
||||
mNoBadgeBackground = getResources().getDrawable(R.drawable.fasttrack_nobadge);
|
||||
mNoBadgeBackground = getResources().getDrawable(R.drawable.quickcontact_nobadge);
|
||||
}
|
||||
setBackgroundDrawable(mNoBadgeBackground);
|
||||
} else {
|
||||
@@ -173,7 +171,7 @@ public class FasttrackBadgeWidget extends ImageView implements OnClickListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the fasttrack window mode. Options are {@link FastTrack#MODE_SMALL},
|
||||
* Set the QuickContact window mode. Options are {@link FastTrack#MODE_SMALL},
|
||||
* {@link FastTrack#MODE_MEDIUM}, {@link FastTrack#MODE_LARGE}.
|
||||
* @param size
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.FasttrackBadgeWidget;
|
||||
import android.widget.QuickContactBadge;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -68,7 +68,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
||||
private View mAggregateBadge;
|
||||
private TextView mPhoneticNameView;
|
||||
private CheckBox mStarredView;
|
||||
private FasttrackBadgeWidget mPhotoView;
|
||||
private QuickContactBadge mPhotoView;
|
||||
private ImageView mPresenceView;
|
||||
private TextView mStatusView;
|
||||
private TextView mStatusAttributionView;
|
||||
@@ -171,7 +171,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
|
||||
mStarredView = (CheckBox)findViewById(R.id.star);
|
||||
mStarredView.setOnClickListener(this);
|
||||
|
||||
mPhotoView = (FasttrackBadgeWidget) findViewById(R.id.photo);
|
||||
mPhotoView = (QuickContactBadge) findViewById(R.id.photo);
|
||||
|
||||
mPresenceView = (ImageView) findViewById(R.id.presence);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user