Fix stream item layout and failing tests
Bug 6220226
- Fixed the stream item layout. Put +1/like in the same line as the timestamp.
Bug 6352201
- Fix failing tests
Change-Id: I771a208ba1037c361625a610d25030eb05b4b0a1
diff --git a/res/layout/stream_item_container.xml b/res/layout/stream_item_container.xml
index 6fa15b1..ee32596 100644
--- a/res/layout/stream_item_container.xml
+++ b/res/layout/stream_item_container.xml
@@ -50,20 +50,31 @@
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary" />
- <TextView android:id="@+id/stream_item_attribution"
- android:layout_width="wrap_content"
+ <!--
+ Attribution (e.g. timestamp) and comments (e.g. +1, like) should align horizontally.
+ Can't merge this with the parent list view.
+ -->
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"
- android:ellipsize="end"
- android:maxLines="1" />
- <TextView android:id="@+id/stream_item_comments"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/detail_update_section_attribution_comments_padding"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"
- android:maxLines="1"/>
+ android:orientation="horizontal"
+ >
+ <TextView android:id="@+id/stream_item_attribution"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
+ android:ellipsize="end"
+ android:maxLines="1" />
+ <TextView android:id="@+id/stream_item_comments"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft=
+ "@dimen/detail_update_section_attribution_comments_padding"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="1"/>
+ </LinearLayout>
</LinearLayout>
<View