Merge branch 'advancedErrorHandling'
This commit is contained in:
commit
3aecd15916
35 changed files with 1234 additions and 416 deletions
125
app/src/main/res/layout/activity_error.xml
Normal file
125
app/src/main/res/layout/activity_error.xml
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<?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=".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"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorSorryView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:text="@string/sorry_string"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageWhatHappenedView"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/what_happened_headline"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorMessageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/info_labels"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorDeviceHeadlineView"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/what_device_headline"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/errorInfoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorInfoLabelsView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/info_labels"/>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:paddingLeft="16dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorInfosView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorDetailView"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/error_details_headline"/>
|
||||
|
||||
<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"/>
|
||||
</HorizontalScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorYourComment"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/your_comment"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/errorCommentBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<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>
|
||||
9
app/src/main/res/menu/error_menu.xml
Normal file
9
app/src/main/res/menu/error_menu.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:id="@+id/menu_item_share_error"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="@drawable/ic_share_black"/>
|
||||
</menu>
|
||||
6
app/src/main/res/values-w820dp/dimens.xml
Normal file
6
app/src/main/res/values-w820dp/dimens.xml
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<string name="download">Download</string>
|
||||
<string name="search">Search</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="did_you_mean">Did you mean: </string>
|
||||
<string name="did_you_mean">Did you mean: %1$s ?</string>
|
||||
<string name="search_page">Search page: </string>
|
||||
<string name="share_dialog_title">Share with:</string>
|
||||
<string name="choose_browser">Choose browser:</string>
|
||||
|
|
@ -84,10 +84,25 @@
|
|||
<string name="could_not_load_thumbnails">Could not load all Thumbnails</string>
|
||||
<string name="youtube_signature_decryption_error">Could not decrypt video url signature.</string>
|
||||
<string name="parsing_error">Could not parse website.</string>
|
||||
<string name="light_parsing_error">Could not parse website complete.</string>
|
||||
<string name="content_not_available">Content not available.</string>
|
||||
<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>
|
||||
<string name="could_not_get_stream">Could not get any stream.</string>
|
||||
<!-- error activity -->
|
||||
<string name="sorry_string">Sorry that should not happen.</string>
|
||||
<string name="guru_meditation" translatable="false">Guru Meditation.</string>
|
||||
<string name="error_report_button_text">Report error via mail</string>
|
||||
<string name="error_snackbar_message">Sorry some errors occurred.</string>
|
||||
<string name="error_snackbar_action">REPORT</string>
|
||||
<string name="what_device_headline">Info:</string>
|
||||
<string name="what_happened_headline">What happened:</string>
|
||||
<string name="info_labels">What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nVersion:\\nOS version:\\nGlob. IP range:</string>
|
||||
<string name="info_searched_lbl">Searched for:</string>
|
||||
<string name="info_requested_stream_lbl">Requested stream:</string>
|
||||
<string name="your_comment">Your comment (in English):</string>
|
||||
<string name="error_details_headline">Details:</string>
|
||||
|
||||
|
||||
<!-- Content descriptions (for better accessibility) -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue