Merge "Working around issue where setting min height on RelativeLayout causes items to collapse. (Bug 5640357)" into ics-mr1

This commit is contained in:
Adam Cohen
2011-11-30 21:10:27 -08:00
committed by Android (Google) Code Review

View File

@@ -14,48 +14,46 @@
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<!-- RelativeLayouts have an issue enforcing minimum heights, so just
work around this for now with LinearLayouts. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:paddingLeft="11dip"
android:paddingTop="6dip"
android:paddingBottom="6dip"
>
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:layout_marginRight="9dip"
/>
<TextView android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="26dip"
android:layout_toRightOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<TextView android:id="@+id/message"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
>
<TextView android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_toRightOf="@id/icon"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_above="@id/status"
android:layout_alignWithParentIfMissing="true"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge"
/>
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge"
/>
<TextView android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:minHeight="26dp"
</RelativeLayout>
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</LinearLayout>
</LinearLayout>