1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-24 22:23:19 +00:00
NewPipe/app/src/main/res/layout/activity_error.xml
TiA4f8R 411b3129f9
Use a custom EditText everywhere to be able to share with ShareUtils the selected text
This EditText class extends the AppCompatEditText class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:41:03 +02:00

148 lines
6.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".error.ErrorActivity">
<include
layout="@layout/toolbar_layout"
android:id="@+id/toolbar_layout"/>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin">
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/errorSorryView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/sorry_string"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/what_happened_headline"
android:textAppearance="?android:attr/textAppearanceMedium" />
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/errorMessageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/info_labels"
android:textColor="?attr/colorAccent" />
<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/what_device_headline"
android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/errorInfoLabelsView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/info_labels"
android:textColor="?attr/colorAccent" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp">
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/errorInfosView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</HorizontalScrollView>
</LinearLayout>
<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/error_details_headline"
android:textAppearance="?android:attr/textAppearanceMedium" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/errorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:typeface="monospace" />
</HorizontalScrollView>
<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/your_comment"
android:textAppearance="?android:attr/textAppearanceMedium" />
<org.schabi.newpipe.views.NewPipeEditText
android:id="@+id/errorCommentBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="" />
<Button
android:id="@+id/errorReportEmailButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/error_report_button_text" />
<org.schabi.newpipe.views.NewPipeTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:text="@string/error_report_open_github_notice"
android:textStyle="bold" />
<Button
android:id="@+id/errorReportCopyButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/copy_for_github" />
<Button
android:id="@+id/errorReportGitHubButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/error_report_open_issue_button_text" />
</LinearLayout>
</ScrollView>
</FrameLayout>