Proper error page

This commit is contained in:
str4d
2014-12-17 01:53:05 +00:00
parent a9bf22c38f
commit 2e7b56cf48
4 changed files with 171 additions and 20 deletions

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/connect_error_occurred"
android:textAppearance="@style/TextAppearance.AppCompat.Subject"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/this_is_the_error"
android:textAppearance="@style/TextAppearance.AppCompat.Primary"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/error"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="@style/TextAppearance.AppCompat.Secondary"/>
<View
style="@style/Divider.Vertical"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"/>
<ImageView
android:id="@+id/copy_error"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="match_parent"
android:minHeight="@dimen/listitem_picture_size"
android:scaleType="center"
android:src="@drawable/ic_content_copy_grey600_24dp"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/most_errors_fixed_on_restart"
android:textAppearance="@style/TextAppearance.AppCompat.Primary"/>
<TextView
android:id="@+id/error_page_i2p_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/also_check_i2p_android"
android:textAppearance="@style/TextAppearance.AppCompat.Primary"
android:visibility="gone"/>
</LinearLayout>
</ScrollView>

View File

@@ -78,11 +78,5 @@
android:text="0"
android:textAppearance="@style/TextAppearance.AppCompat.Primary"/>
<TextView
android:id="@+id/error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>
</LinearLayout>
</ScrollView>

View File

@@ -152,6 +152,12 @@
<string name="unreliable">Unreliable</string>
<string name="untested">Untested</string>
<string name="banned_peers">Banned Peers:</string>
<string name="connect_error_occurred">Oh dear! Bote couldn\'t connect to the network.</string>
<string name="this_is_the_error">This is the error that happened:</string>
<string name="most_errors_fixed_on_restart">You can fix most problems by restarting Bote. To do this, go back to the main Bote page, then click "Disconnect from network" in the menu, and then click "Connect to network" in the menu again.</string>
<string name="also_check_i2p_android">If that doesn\'t help, check that I2P is running. You can see I2P\'s current status in the notification drawer, or by opening the I2P app. If it isn\'t running properly, restart I2P (in the app, click "Stop", and then click "Start" when it appears). Wait for I2P to be fully running, and then star Bote.</string>
<string name="bote_connection_error">Bote connection error</string>
<string name="full_error_copied_to_clipboard">Full error copied to clipboard</string>
<string name="pref_title_general">General</string>
<string name="pref_summ_general">General settings and default identity settings</string>
<string name="pref_title_autoMail">Auto-check mail</string>