created error report activity

This commit is contained in:
Christian Schabesberger 2016-02-24 23:12:02 +01:00
parent 11d3aeb0dd
commit 27a2dee3bd
8 changed files with 146 additions and 20 deletions

View file

@ -0,0 +1,87 @@
<?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="org.schabi.newpipe.errorhandling.ErrorActivity">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<TextView
android:id="@+id/errorSorryView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/sorry_string"
android:textStyle="bold" />
<TextView
android:id="@+id/errorWhatHappenedView"
android:paddingTop="@dimen/activity_vertical_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="What happened:"/>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/horizontalScrollView"
android:layout_gravity="center" >
<TextView
android:id="@+id/errorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="monospace"
android:text="asdkfjasdhfjshgfgnigregirenigneigheuigeorigjweogijhegiohegojiegoergjeogheoghweoghiehgohewgoiwehogihewrghieogh
&#xA;asdfgeogirejgoeirjgoregjogijegoiwejg
&#xA;wergjergljegoiejgoeigjogjeogjegohgeoigheognmgnbnorneog
&#xA;ergoegremgekgnonhotnhotrnhkhnh
&#xA;safs
&#xA;f
&#xA;s
&#xA;f
&#xA;f
&#xA;f
&#xA;safasf
&#xA;sageoigohntrh
&#xA;trhoijrhoirnhohintrionbobirnionb
&#xA;boitrnobinobnroni
&#xA;sadfsfagfkjgnsfdljhenvgoenvjibnoenpeoignweguihregpiorhnpoithtvhiohöio höio ho fvgegh gsfdsfd
&#xA;sfdaiohsfdiousfdahoiuhsfdaoiusfd oifdhoifdho fvigh fvuigupi refsfdasklsdfhsalkjfhsalkfjsa
&#xA;salgkjsfdgkjreog ehpio vpo hfgoeiwrhpwreo ibbuhwfgeubuh l jhjkb
&#xA;ssfda
&#xA;sfda
&#xA;sfda
&#xA;sfda
&#xA;
&#xA;sagrejgorigjeoigjgkofdjgölkfdjgsdökgjklgjoe
&#xA;sfdafgs
&#xA;dfg
&#xA;sd
&#xA;fg"/>
</HorizontalScrollView>
<Button
android:id="@+id/errorReportButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/error_report_button_text" />
</LinearLayout>
</ScrollView>
</FrameLayout>

View file

@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View file

@ -35,5 +35,8 @@
<!-- Paddings & Margins -->
<dimen name="video_item_detail_like_margin">6sp</dimen>
<dimen name="video_item_detail_play_fab_margin">20dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View file

@ -88,6 +88,9 @@
<string name="blocked_by_gema">Blocked by GEMA.</string>
<string name="could_not_setup_download_menu">Could not setup download menu.</string>
<string name="live_streams_not_supported">This is a LIVE STREAM. These are not yet supported.</string>
<!-- error activity -->
<string name="sorry_string">Sorry that shouldn#t have happened.</string>
<string name="error_report_button_text">Report error via mail</string>
<!-- Content descriptions (for better accessibility) -->