Simplify dev reporter and add RTL support

This commit is contained in:
Torsten Grote
2018-09-11 17:18:55 -03:00
parent f83b9244d4
commit 5122c961b4
3 changed files with 20 additions and 28 deletions

View File

@@ -292,8 +292,7 @@ public class DevReportActivity extends BaseCrashReportDialog
cb.setChecked(required || !excluded); cb.setChecked(required || !excluded);
cb.setEnabled(!required); cb.setEnabled(!required);
cb.setOnCheckedChangeListener(DevReportActivity.this); cb.setOnCheckedChangeListener(DevReportActivity.this);
TextView title = v.findViewById(R.id.title); cb.setText(field.toString());
title.setText(field.toString());
TextView content = v.findViewById(R.id.content); TextView content = v.findViewById(R.id.content);
content.setText(value); content.setText(value);
report.addView(v); report.addView(v);

View File

@@ -86,7 +86,7 @@
<ScrollView <ScrollView
android:id="@+id/report_scroll" android:id="@+id/report_scroll"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/include_debug_report"> app:layout_constraintTop_toBottomOf="@id/include_debug_report">

View File

@@ -1,38 +1,31 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content">
android:orientation="vertical">
<LinearLayout <CheckBox
android:layout_width="match_parent" android:id="@+id/include_in_report"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_large"
<CheckBox app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/include_in_report" app:layout_constraintStart_toStartOf="parent"
android:layout_width="wrap_content" app:layout_constraintTop_toTopOf="parent"
android:layout_height="wrap_content"/> tools:text="Crash log entry title"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_small"
android:gravity="bottom"
android:textSize="@dimen/text_size_large"
android:textColor="?android:attr/textColorPrimary"
tools:text="Crash log entry title"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/content" android:id="@+id/content"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_medium" android:layout_marginTop="4dp"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include_in_report"
tools:text="Crash log entry value"/> tools:text="Crash log entry value"/>
</LinearLayout> </android.support.constraint.ConstraintLayout>