Remove icon, add scroll view to crash report dialog.

Scroll view helps with smaller screens. Alert dialog icons are not
part of the material design spec so that was removed.
This commit is contained in:
Peter Serwylo 2016-01-03 15:48:44 +11:00
parent 49d01e0ca3
commit a99767f3a6
2 changed files with 32 additions and 26 deletions

View File

@ -1,36 +1,43 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingBottom="24dp"
android:paddingTop="20dp"
> >
<TextView <LinearLayout
android:id="@android:id/text1" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/crash_dialog_text" android:paddingLeft="24dp"
/> android:paddingRight="24dp"
android:paddingBottom="24dp"
android:paddingTop="20dp"
>
<TextView <TextView
android:id="@android:id/text2" android:id="@android:id/text1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:text="@string/crash_dialog_text"
android:text="@string/crash_dialog_comment_prompt" />
/>
<EditText <TextView
android:id="@android:id/input" android:id="@android:id/text2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="textMultiLine" android:layout_marginTop="20dp"
android:layout_marginTop="20dp" android:text="@string/crash_dialog_comment_prompt"
/> />
</LinearLayout> <EditText
android:id="@android:id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:layout_marginTop="20dp"
/>
</LinearLayout>
</ScrollView>

View File

@ -15,7 +15,6 @@ public class CrashReportActivity extends BaseCrashReportDialog implements Dialog
final AlertDialog dialog = new AlertDialog.Builder(this) final AlertDialog dialog = new AlertDialog.Builder(this)
.setTitle(R.string.crash_dialog_title) .setTitle(R.string.crash_dialog_title)
.setIcon(android.R.drawable.ic_dialog_alert)
.setView(R.layout.crash_report_dialog) .setView(R.layout.crash_report_dialog)
.setPositiveButton(R.string.ok, this) .setPositiveButton(R.string.ok, this)
.setNegativeButton(R.string.cancel, this) .setNegativeButton(R.string.cancel, this)