mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-23 08:09:54 +01:00
Forum, nested discussions front end UI/UX, rev 2
This commit is contained in:
21
briar-android/res/layout/activity_forum.xml
Normal file
21
briar-android/res/layout/activity_forum.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.briarproject.android.util.BriarRecyclerView
|
||||
android:id="@+id/forum_discussion_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:scrollToEnd="false"/>
|
||||
|
||||
<include
|
||||
layout="@layout/text_input_field"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
161
briar-android/res/layout/forum_discussion_cell.xml
Normal file
161
briar-android/res/layout/forum_discussion_cell.xml
Normal file
@@ -0,0 +1,161 @@
|
||||
<?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>
|
||||
35
briar-android/res/layout/text_input_field.xml
Normal file
35
briar-android/res/layout/text_input_field.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:id="@+id/text_input_container"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/button_bar_background"
|
||||
android:elevation="@dimen/margin_tiny"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/margin_large"
|
||||
android:paddingStart="@dimen/margin_large">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:layout_weight="1"
|
||||
android:inputType="textMultiLine|textCapSentences"
|
||||
android:maxLines="5"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_send"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_margin="@dimen/margin_medium"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/send"
|
||||
android:onClick="sendMessage"
|
||||
android:src="@drawable/social_send_now_white"
|
||||
android:tint="@color/briar_primary"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user