Layout for Updates with multiple images.
Use a table layout to arrange images in the updates: if the number of
images is even (including no images), the text is placed on its own row.
Otherwise, the text is added together with the last image.
Bug: 5123875
Change-Id: I372a15a3d384fbea79a1cd9f225db3f05996f5d4
diff --git a/res/layout/stream_item_container.xml b/res/layout/stream_item_container.xml
new file mode 100644
index 0000000..1f96aad
--- /dev/null
+++ b/res/layout/stream_item_container.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TableLayout
+ android:id="@+id/stream_item_content"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/detail_update_section_item_vertical_padding"
+ android:paddingBottom="@dimen/detail_update_section_item_last_row_extra_vertical_padding"
+ android:paddingLeft="@dimen/detail_update_section_item_horizontal_padding"
+ android:paddingRight="@dimen/detail_update_section_item_horizontal_padding"
+ android:background="@drawable/list_selector"
+ />
+
+ <View
+ android:id="@+id/horizontal_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginLeft="@dimen/detail_update_section_side_padding"
+ android:layout_marginRight="@dimen/detail_update_section_side_padding"
+ android:background="?android:attr/dividerHorizontal" />
+
+</LinearLayout>