Files
briar/briar-android/res/layout/forum_discussion_cell.xml
2016-05-30 23:57:01 +02:00

161 lines
5.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/forum_cell"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<View
android:id="@+id/nested_line_1"
style="@style/DiscussionLevelIndicator"
android:layout_width="@dimen/forum_nested_line_width"
android:layout_height="match_parent"
android:visibility="gone"
tools:visibility="showingDescendants"/>
<View
android:id="@+id/nested_line_2"
style="@style/DiscussionLevelIndicator"
android:layout_width="@dimen/forum_nested_line_width"
android:layout_height="match_parent"
android:layout_toRightOf="@id/nested_line_1"
android:visibility="gone"/>
<View
android:id="@+id/nested_line_3"
style="@style/DiscussionLevelIndicator"
android:layout_width="@dimen/forum_nested_line_width"
android:layout_height="match_parent"
android:layout_toRightOf="@id/nested_line_2"
android:visibility="gone"/>
<View
android:id="@+id/nested_line_4"
style="@style/DiscussionLevelIndicator"
android:layout_width="@dimen/forum_nested_line_width"
android:layout_height="match_parent"
android:layout_toRightOf="@id/nested_line_3"
android:visibility="gone"/>
<View
android:id="@+id/nested_line_5"
style="@style/DiscussionLevelIndicator"
android:layout_width="@dimen/forum_nested_line_width"
android:layout_height="match_parent"
android:layout_toRightOf="@id/nested_line_4"
android:visibility="gone"/>
<TextView
android:id="@+id/nested_line_text"
android:layout_width="@dimen/forum_nested_indicator"
android:layout_height="@dimen/forum_nested_indicator"
android:layout_centerInParent="true"
android:background="@drawable/level_indicator_circle"
android:gravity="center"
android:textSize="@dimen/text_size_small"
android:visibility="gone"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_weight="1">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_small"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_medium"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."/>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatar"
android:layout_width="@dimen/forum_avatar_size"
android:layout_height="@dimen/forum_avatar_size"
android:layout_alignLeft="@id/text"
android:layout_below="@id/text"
android:layout_marginRight="@dimen/margin_small"
android:layout_marginTop="@dimen/margin_small"
android:src="@drawable/ic_launcher"
app:civ_border_color="@color/briar_primary"
app:civ_border_width="@dimen/avatar_border_width"
tools:src="@drawable/ic_launcher"
/>
<ImageView
android:id="@+id/chevron"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/text"
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_small"
android:clickable="true"
android:src="@drawable/selector_chevron"
android:tint="@color/briar_button_positive"
/>
<TextView
android:id="@+id/btn_reply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/text"
android:layout_marginRight="@dimen/margin_medium"
android:layout_toLeftOf="@id/chevron"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:padding="@dimen/margin_medium"
android:text="@string/btn_reply"
android:textColor="@color/briar_button_positive"
android:textSize="@dimen/text_size_tiny"/>
<TextView
android:id="@+id/replies"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/btn_reply"
android:layout_toLeftOf="@id/btn_reply"
android:padding="@dimen/margin_medium"
android:textSize="@dimen/text_size_tiny"
tools:text="2 replies"/>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/replies"
android:layout_toLeftOf="@id/replies"
android:layout_toRightOf="@id/avatar"
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/text_size_tiny"
tools:text="09:09 John Smith"/>
<View
android:id="@+id/bottom_divider"
style="@style/Divider.ForumList"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_separator"
android:layout_alignLeft="@id/text"
android:layout_below="@id/btn_reply"/>
</RelativeLayout>
</LinearLayout>