Fix layout for favorites frequent section
Ia042ba0d548ca4b62a349508eaa8754bbd92dff2 introduced a new
photo container layout, which doesn't take care of RelativeLayout
at all.
Bug: 5276785
Change-Id: If6e1d8f26a6baff888336f472b2e2a7b13a94712
diff --git a/res/layout/contact_tile_frequent.xml b/res/layout/contact_tile_frequent.xml
index b9d637d..43bbe9d 100644
--- a/res/layout/contact_tile_frequent.xml
+++ b/res/layout/contact_tile_frequent.xml
@@ -27,16 +27,17 @@
android:layout_height="match_parent" >
<view
+ android:id="@+id/image_container"
class="com.android.contacts.list.ContactTileImageContainer"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_width="64dip"
+ android:layout_height="64dip"
+ android:layout_alignParentRight="true">
<QuickContactBadge
android:id="@+id/contact_tile_quick"
- android:layout_width="64dip"
- android:layout_height="64dip"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:scaleType="centerCrop"
- android:focusable="true"
- android:layout_alignParentRight="true" />
+ android:focusable="true" />
</view>
<LinearLayout
@@ -78,7 +79,7 @@
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"
- android:layout_below="@id/contact_tile_quick" />
+ android:layout_below="@id/image_container" />
</RelativeLayout>
diff --git a/res/layout/contact_tile_frequent_phone.xml b/res/layout/contact_tile_frequent_phone.xml
index 1f5171d..6b920e8 100644
--- a/res/layout/contact_tile_frequent_phone.xml
+++ b/res/layout/contact_tile_frequent_phone.xml
@@ -28,17 +28,18 @@
android:layout_height="match_parent" >
<view
+ android:id="@+id/image_container"
class="com.android.contacts.list.ContactTileImageContainer"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_width="64dip"
+ android:layout_height="64dip"
+ android:layout_alignParentLeft="true">
<QuickContactBadge
android:id="@id/contact_tile_quick"
android:nextFocusRight="@id/contact_tile_frequent_phone"
- android:layout_width="64dip"
- android:layout_height="64dip"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:scaleType="centerCrop"
- android:focusable="true"
- android:layout_alignParentLeft="true" />
+ android:focusable="true" />
</view>
<TextView
@@ -48,7 +49,7 @@
android:layout_marginLeft="8dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginTop="8dip"
- android:layout_toRightOf="@id/contact_tile_quick"
+ android:layout_toRightOf="@id/image_container"
android:singleLine="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="3dip"
@@ -63,7 +64,7 @@
android:layout_marginLeft="8dip"
android:singleLine="true"
android:maxLength="18"
- android:layout_toRightOf="@id/contact_tile_quick"
+ android:layout_toRightOf="@id/image_container"
android:layout_below="@id/contact_tile_name" />
<TextView
@@ -85,7 +86,7 @@
android:layout_width="match_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"
- android:layout_below="@id/contact_tile_quick" />
+ android:layout_below="@id/image_container" />
</RelativeLayout>