Commit b3b40753 authored by Torsten Grote's avatar Torsten Grote

RTL support: Address review issues

parent e60df3ce
......@@ -16,8 +16,7 @@
android:paddingLeft="@dimen/margin_activity_horizontal"
android:paddingRight="@dimen/margin_activity_horizontal"
android:paddingStart="@dimen/margin_activity_horizontal"
android:paddingTop="@dimen/margin_activity_vertical"
android:id="@+id/relativeLayout2">
android:paddingTop="@dimen/margin_activity_vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/current_password_entry_wrapper"
......@@ -25,10 +24,10 @@
android:layout_height="wrap_content"
app:errorEnabled="true"
app:hintEnabled="false"
app:passwordToggleEnabled="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:passwordToggleEnabled="true">
<EditText
android:id="@+id/current_password_entry"
......@@ -45,10 +44,10 @@
android:layout_height="wrap_content"
app:errorEnabled="true"
app:hintEnabled="false"
app:passwordToggleEnabled="true"
app:layout_constraintTop_toBottomOf="@id/current_password_entry_wrapper"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/current_password_entry_wrapper"
app:passwordToggleEnabled="true">
<EditText
android:id="@+id/new_password_entry"
......@@ -65,10 +64,10 @@
android:layout_height="wrap_content"
app:errorEnabled="true"
app:hintEnabled="false"
app:passwordToggleEnabled="true"
app:layout_constraintTop_toBottomOf="@id/new_password_entry_wrapper"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/new_password_entry_wrapper"
app:passwordToggleEnabled="true">
<EditText
android:id="@+id/new_password_confirm"
......@@ -85,9 +84,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@id/new_password_confirm_wrapper"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/new_password_confirm_wrapper"/>
<Button
android:id="@+id/change_password"
......@@ -97,19 +96,19 @@
android:layout_marginTop="@dimen/margin_medium"
android:enabled="false"
android:text="@string/change_password"
tools:enabled="true"
app:layout_constraintTop_toBottomOf="@id/strength_meter"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/strength_meter"
tools:enabled="true"/>
<ProgressBar
android:id="@+id/progress_wheel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:layout_constraintTop_toTopOf="@id/change_password"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/change_password"/>
</android.support.constraint.ConstraintLayout>
......
......@@ -29,6 +29,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginTop="@dimen/margin_large"
app:hintEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBar">
......@@ -38,6 +40,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine|textCapSentences"
android:maxLines="5"
tools:hint="@string/describe_crash"/>
</android.support.design.widget.TextInputLayout>
......@@ -48,6 +51,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginStart="@dimen/margin_large"
app:hintEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/user_comment_layout">
......@@ -71,8 +75,8 @@
android:checked="false"
android:text="@string/include_debug_report_crash"
app:layout_constraintBottom_toBottomOf="@+id/chevron"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/chevron"
app:layout_constraintEnd_toStartOf="@+id/chevron"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/chevron"/>
<Button
......@@ -81,7 +85,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/show"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/user_email_layout"/>
<ScrollView
......@@ -99,11 +103,10 @@
android:orientation="vertical"
android:paddingBottom="@dimen/listitem_height_one_line_avatar"
android:paddingEnd="@dimen/margin_large"
android:paddingLeft="@dimen/margin_large"
android:paddingRight="@dimen/margin_large"
android:paddingStart="@dimen/margin_large"
android:paddingTop="@dimen/margin_small"
android:visibility="gone"/>
android:visibility="gone"
tools:visibility="visible"/>
</ScrollView>
......@@ -115,9 +118,10 @@
android:indeterminate="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include_debug_report"/>
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include_debug_report"
tools:visibility="visible"/>
</android.support.constraint.ConstraintLayout>
......@@ -137,9 +141,11 @@
android:text="@string/briar_crashed"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_large"
app:layout_constraintBottom_toTopOf="@+id/fault"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:layout_editor_absoluteY="8dp"/>
<TextView
......@@ -151,6 +157,7 @@
android:text="@string/not_your_fault"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_large"
app:layout_constraintBottom_toTopOf="@+id/pleaseSend"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/crashed"/>
......@@ -164,6 +171,7 @@
android:text="@string/please_send_report"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_large"
app:layout_constraintBottom_toTopOf="@+id/encrypted"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/fault"/>
......@@ -177,6 +185,7 @@
android:text="@string/report_is_encrypted"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_large"
app:layout_constraintBottom_toTopOf="@+id/acceptButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pleaseSend"/>
......@@ -186,14 +195,12 @@
style="@style/BriarButtonFlat.Negative"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_large"
android:text="@string/close"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/acceptButton"
app:layout_constraintEnd_toStartOf="@+id/acceptButton"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/encrypted"
app:layout_constraintVertical_bias="1.0"/>
app:layout_constraintTop_toTopOf="@+id/acceptButton"/>
<Button
android:id="@+id/acceptButton"
......@@ -206,8 +213,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/declineButton"
app:layout_constraintTop_toBottomOf="@+id/encrypted"
app:layout_constraintVertical_bias="1.0"/>
app:layout_constraintTop_toBottomOf="@+id/encrypted"/>
</android.support.constraint.ConstraintLayout>
......
......@@ -27,6 +27,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:max="50"
android:min="1"
android:progress="20"
app:layout_constraintEnd_toStartOf="@+id/textViewContactsSb"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -16,6 +16,8 @@
android:layout_height="@dimen/blogs_avatar_normal_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/authorName"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/ic_launcher_round"/>
......@@ -35,17 +37,30 @@
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/authorName"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@+id/trustIndicator"
app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toTopOf="parent"
tools:text="Author View that can have a long name"/>
<org.briarproject.briar.android.view.TrustIndicatorView
android:id="@+id/trustIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/authorName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/authorName"
app:layout_constraintTop_toTopOf="@+id/authorName"
app:layout_goneMarginEnd="0dp"
app:layout_goneMarginStart="0dp"
tools:src="@drawable/trust_indicator_verified"/>
<TextView
android:id="@+id/dateView"
android:layout_width="0dp"
......@@ -57,18 +72,4 @@
tools:text="yesterday"
tools:visibility="visible"/>
<org.briarproject.briar.android.view.TrustIndicatorView
android:id="@+id/trustIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/dateView"
app:layout_constraintTop_toTopOf="@+id/dateView"
app:layout_goneMarginEnd="0dp"
app:layout_goneMarginStart="0dp"
tools:src="@drawable/trust_indicator_verified"/>
</merge>
......@@ -10,6 +10,8 @@
android:id="@+id/include_in_report"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_large"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -41,9 +41,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:gravity="bottom"
android:inputType="textMultiLine|textLongMessage|textCapSentences|textAutoCorrect"
android:minHeight="@dimen/text_input_height"
android:paddingBottom="@dimen/margin_small"
android:paddingBottom="10dp"
android:paddingEnd="@dimen/margin_small"
android:paddingRight="@dimen/margin_small"
android:paddingTop="@dimen/margin_small"
......
......@@ -130,13 +130,7 @@ public class TestDataCreatorImpl implements TestDataCreator {
private void createTestDataOnIoExecutor(int numContacts, int numPrivateMsgs,
int numBlogPosts, int numForums, int numForumPosts)
throws DbException {
List<Contact> contacts;
if (numContacts == 0) {
contacts = new ArrayList<>(contactManager.getActiveContacts());
if (contacts.isEmpty()) contacts = createContacts(1);
} else {
contacts = createContacts(numContacts);
}
List<Contact> contacts = createContacts(numContacts);
createPrivateMessages(contacts, numPrivateMsgs);
createBlogPosts(contacts, numBlogPosts);
List<Forum> forums = createForums(contacts, numForums, numForumPosts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment