Merge change 26301 into eclair

* changes:
  Add aggregated badge to ContactHeaderWidget
This commit is contained in:
Android (Google) Code Review
2009-09-22 12:49:20 -04:00
4 changed files with 28 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
private static final String TAG = "ContactHeaderWidget";
private TextView mDisplayNameView;
private View mAggregateBadge;
private TextView mPhoneticNameView;
private CheckBox mStarredView;
private FasttrackBadgeWidget mPhotoView;
@@ -159,6 +160,8 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
mDisplayNameView = (TextView) findViewById(R.id.name);
mDisplayNameView.setOnLongClickListener(this);
mAggregateBadge = findViewById(R.id.aggregate_badge);
mAggregateBadge.setVisibility(View.GONE);
mPhoneticNameView = (TextView) findViewById(R.id.phonetic_name);
@@ -283,6 +286,13 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList
}
}
/**
* Turn on/off showing of the aggregate bage element.
*/
public void showAggregateBadge(boolean showBagde) {
mAggregateBadge.setVisibility(showBagde ? View.VISIBLE : View.GONE);
}
/**
* Turn on/off showing of the star element.
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

View File

@@ -38,8 +38,24 @@
android:layout_marginTop="5dip"
android:orientation="vertical">
<!-- "Name" field is locale-specific. -->
<include layout="@layout/contact_header_name"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/aggregate_badge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="3dip"
android:paddingTop="3dip"
android:src="@drawable/ic_aggregated"
/>
<!-- "Name" field is locale-specific. -->
<include layout="@layout/contact_header_name"/>
</LinearLayout>
<TextView android:id="@+id/status"
android:layout_width="fill_parent"