Commit 53edcaf3 authored by Torsten Grote's avatar Torsten Grote

Add RTL support to remaining list items

Also fixes several small UI glitches with long texts
parent 5122c961
package org.briarproject.briar.android.sharing;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -26,7 +27,7 @@ public abstract class InvitationAdapter<I extends InvitationItem, VH extends Inv
}
@Override
public void onBindViewHolder(VH ui, int position) {
public void onBindViewHolder(@NonNull VH ui, int position) {
I item = getItemAt(position);
if (item == null) return;
ui.onBind(item, listener);
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
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"
......@@ -9,27 +9,30 @@
<View
android:id="@+id/inputDivider"
style="@style/Divider.Horizontal"/>
style="@style/Divider.Horizontal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/authorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="@dimen/listitem_vertical_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:persona="commenter"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/bodyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/authorView"
android:paddingBottom="@dimen/listitem_vertical_margin"
android:paddingLeft="@dimen/listitem_vertical_margin"
android:paddingRight="@dimen/listitem_vertical_margin"
android:paddingEnd="@dimen/listitem_vertical_margin"
android:paddingStart="@dimen/listitem_vertical_margin"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/authorView"
tools:text="This is a comment that appears below a blog post. Usually, it is expected to be rather short. Not much longer than this one."/>
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
......@@ -9,66 +9,64 @@
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground">
<LinearLayout
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/rebloggerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/listitem_vertical_margin">
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/rebloggerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="@dimen/listitem_horizontal_margin"
android:layout_toLeftOf="@+id/commentView"
app:persona="reblogger"/>
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/authorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/rebloggerView"
android:layout_marginBottom="@dimen/listitem_vertical_margin"
android:layout_toLeftOf="@+id/commentView"/>
android:layout_marginBottom="@dimen/listitem_horizontal_margin"
android:layout_marginEnd="@dimen/listitem_vertical_margin"
android:layout_marginStart="@dimen/listitem_vertical_margin"
android:layout_marginTop="@dimen/listitem_vertical_margin"
app:layout_constraintEnd_toStartOf="@+id/commentView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:persona="reblogger"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/commentView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/blogs_reblog_comment_hint"
android:padding="@dimen/margin_small"
android:src="@drawable/ic_repeat"
app:tint="?attr/colorControlNormal"/>
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/authorView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/listitem_vertical_margin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rebloggerView"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/bodyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/authorView"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_medium"
tools:text="This is a body text that shows the content of a blog post.\n\nThis one is not short, but it is also not too long."/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/commentView"
android:layout_width="@dimen/button_size"
android:layout_height="@dimen/button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/blogs_reblog_comment_hint"
android:src="@drawable/ic_repeat"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"/>
</RelativeLayout>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/bodyView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/listitem_vertical_margin"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_medium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/authorView"
tools:text="This is a body text that shows the content of a blog post.\n\nThis one is not short, but it is also not too long."/>
<!-- TODO replace with RecyclerView -->
<LinearLayout
android:id="@+id/commentContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_marginTop="@dimen/listitem_vertical_margin"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@+id/bodyView">
<include
layout="@layout/list_item_blog_comment"
......@@ -77,6 +75,6 @@
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
......@@ -23,7 +23,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:layout_weight="1"
android:maxLines="2"
......@@ -36,7 +36,9 @@
android:layout_width="@dimen/listitem_horizontal_margin"
android:layout_height="@dimen/listitem_horizontal_margin"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
tools:ignore="ContentDescription"
tools:src="@drawable/contact_connected"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/listitem_horizontal_margin"
android:paddingStart="@dimen/listitem_horizontal_margin"
tools:ignore="RtlSymmetry">
android:background="?attr/selectableItemBackground">
<org.briarproject.briar.android.view.TextAvatarView
android:id="@+id/avatarView"
android:layout_width="@dimen/listitem_picture_frame_size"
android:layout_height="@dimen/listitem_picture_frame_size"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/forumNameView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:maxLines="2"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of a forum"/>
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toTopOf="parent"
tools:text="This is a name of a forum which can be long"/>
<TextView
android:id="@+id/postCountView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/forumNameView"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:paddingBottom="@dimen/listitem_horizontal_margin"
android:paddingTop="@dimen/margin_medium"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="@dimen/margin_medium"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
tools:text="1337 posts"/>
app:layout_constraintEnd_toStartOf="@+id/dateView"
app:layout_constraintStart_toStartOf="@+id/forumNameView"
app:layout_constraintTop_toBottomOf="@+id/forumNameView"
tools:text="@string/no_forum_posts"/>
<TextView
android:id="@+id/dateView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/forumNameView"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:paddingBottom="@dimen/listitem_horizontal_margin"
android:paddingTop="@dimen/margin_medium"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintBaseline_toBaselineOf="@+id/postCountView"
app:layout_constraintEnd_toEndOf="parent"
tools:text="Dec 24"/>
<View
android:id="@+id/divider"
style="@style/Divider.ThreadItem"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/postCountView"/>
</RelativeLayout>
android:layout_width="0dp"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toBottomOf="@id/postCountView"/>
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/listitem_horizontal_margin"
android:paddingStart="@dimen/listitem_horizontal_margin"
tools:ignore="RtlSymmetry">
android:background="?attr/selectableItemBackground">
<org.briarproject.briar.android.view.TextAvatarView
android:id="@+id/avatarView"
android:layout_width="@dimen/listitem_picture_frame_size"
android:layout_height="@dimen/listitem_picture_frame_size"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
android:layout_margin="@dimen/listitem_horizontal_margin"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:maxLines="2"
android:layout_margin="@dimen/listitem_horizontal_margin"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of a Private Group"/>
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toTopOf="parent"
tools:text="This is a name of a Private Group which can be quite long actually"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/creatorView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/nameView"
android:layout_marginBottom="@dimen/margin_small"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:paddingTop="@dimen/margin_small"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/margin_small"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/nameView"
app:layout_constraintTop_toBottomOf="@+id/nameView"
tools:text="Created by Santa Claus"/>
<TextView
android:id="@+id/messageCountView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/creatorView"
android:layout_marginBottom="@dimen/margin_small"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:paddingTop="@dimen/margin_small"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/margin_medium"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toStartOf="@+id/dateView"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toBottomOf="@+id/creatorView"
tools:text="1337 messages"
tools:visibility="visible"/>
......@@ -63,27 +61,27 @@
android:id="@+id/dateView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/creatorView"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:paddingTop="@dimen/margin_small"
android:layout_margin="@dimen/listitem_horizontal_margin"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintBaseline_toBaselineOf="@+id/messageCountView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:text="3 weeks ago, 12:00"
tools:visibility="visible"/>
<TextView
android:id="@+id/statusView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/messageCountView"
android:layout_toEndOf="@+id/avatarView"
android:layout_toLeftOf="@+id/removeButton"
android:layout_toRightOf="@+id/avatarView"
android:paddingTop="@dimen/margin_small"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/margin_medium"
android:textColor="?android:attr/textColorTertiary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toRightOf="@+id/avatarView"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toBottomOf="@+id/messageCountView"
tools:text="@string/groups_group_is_empty"/>
<Button
......@@ -91,18 +89,21 @@
style="@style/BriarButtonFlat.Negative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/divider"
android:layout_alignParentRight="true"
android:text="@string/groups_remove"
app:layout_constraintBottom_toBottomOf="@+id/divider"
app:layout_constraintRight_toRightOf="parent"
tools:visibility="gone"/>
<View
android:id="@+id/divider"
style="@style/Divider.ThreadItem"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/statusView"
android:layout_marginTop="@dimen/listitem_horizontal_margin"/>
android:layout_width="0dp"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toBottomOf="@+id/statusView"/>
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:paddingTop="@dimen/margin_medium">
android:layout_height="wrap_content">
<org.briarproject.briar.android.view.AuthorView
android:id="@+id/authorView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="@dimen/margin_small"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_toStartOf="@+id/bulbView"
android:layout_toLeftOf="@+id/bulbView"
android:layout_margin="@dimen/margin_medium"
app:layout_constraintEnd_toStartOf="@+id/bulbView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:persona="list"/>
<ImageView
android:id="@+id/bulbView"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignBottom="@+id/authorView"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/authorView"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_margin="@dimen/margin_medium"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription"
tools:src="@drawable/contact_connected"/>
<TextView
android:id="@+id/creatorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/authorView"
android:layout_marginBottom="@dimen/margin_small"
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
android:layout_marginStart="@dimen/listitem_group_member_indentation"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/groups_member_created_you"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/authorView"
tools:visibility="visible"/>
<View
android:id="@+id/divider"
style="@style/Divider.ContactList"
android:layout_below="@+id/creatorView"
android:layout_marginStart="@dimen/listitem_group_member_indentation"
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
android:layout_marginTop="@dimen/margin_medium"/>
android:layout_marginLeft="36dp"
android:layout_marginStart="36dp"
android:layout_marginTop="@dimen/margin_medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/creatorView"/>
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:background="?attr/selectableItemBackground"
android:paddingTop="@dimen/listitem_horizontal_margin">
android:layout_height="wrap_content">
<org.briarproject.briar.android.view.TextAvatarView
android:id="@+id/avatarView"
android:layout_width="@dimen/listitem_picture_frame_size"
android:layout_height="@dimen/listitem_picture_frame_size"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginRight="@dimen/listitem_horizontal_margin"/>
android:layout_margin="@dimen/listitem_horizontal_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/forumNameView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:maxLines="2"
android:layout_margin="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of a forum that is available"/>
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toTopOf="parent"
tools:text="This is a name of a forum that is available and has a long name"/>
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/sharedByView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/forumNameView"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_toEndOf="@+id/avatarView"
android:layout_toRightOf="@+id/avatarView"
android:paddingTop="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_medium"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/forumNameView"
app:layout_constraintTop_toBottomOf="@+id/forumNameView"
tools:text="Shared by Megalox"/>
<TextView
android:id="@+id/forumSubscribedView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@+id/sharedByView"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:paddingTop="@dimen/margin_medium"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/margin_medium"
android:text="@string/forum_invitation_exists"
android:textColor="?android:attr/textColorTertiary"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sharedByView"
tools:visibility="visible"/>
<Button
......@@ -62,28 +61,23 @@
style="@style/BriarButtonFlat.Positive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/forumSubscribedView"
android:layout_marginTop="-8dp"
android:text="@string/accept"/>
android:text="@string/accept"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/forumSubscribedView"/>
<Button
android:id="@+id/declineButton"
style="@style/BriarButtonFlat.Negative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/forumSubscribedView"
android:layout_marginTop="-8dp"
android:layout_toLeftOf="@+id/acceptButton"
android:layout_toStartOf="@+id/acceptButton"
android:text="@string/decline"/>
android:text="@string/decline"
app:layout_constraintEnd_toStartOf="@+id/acceptButton"
app:layout_constraintTop_toBottomOf="@+id/forumSubscribedView"/>
<View
android:id="@+id/divider"
style="@style/Divider.ThreadItem"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/acceptButton"/>
</RelativeLayout>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/acceptButton"/>
</android.support.constraint.ConstraintLayout>
......@@ -6,8 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="vertical">
android:background="?attr/selectableItemBackground">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatarView"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<android.support.constraint.ConstraintLayout
android:id="@+id/relativeLayout4"
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
android:background="?attr/selectableItemBackground">
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/titleView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:maxLines="2"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/listitem_horizontal_margin"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of a RSS Feed"/>
app:layout_constraintEnd_toStartOf="@+id/deleteButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="This is a name of a RSS Feed that can be long"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/deleteButton"
android:layout_width="@dimen/button_size"
android:layout_height="@dimen/button_size"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="?attr/selectableItemBackground"
android:layout_margin="@dimen/margin_medium"