Skip to content

Commit

Permalink
Added error template. Use <include layout="@layout/error_template"> t…
Browse files Browse the repository at this point in the history
…o use it.
  • Loading branch information
steenburgh committed Mar 13, 2016
1 parent fa4907e commit 1f5ea5d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/src/main/res/layout/error_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_refresh"
android:background="?android:selectableItemBackground"
android:layout_gravity="center"/>

<TextView
android:id="@+id/error_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Error loading the stuff, tap to retry"
android:textAppearance="?android:textAppearanceMedium"
android:layout_gravity="center_horizontal"/>

<TextView
android:layout_marginTop="8dp"
android:id="@+id/error_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="The error loading the stuff might be caused by the thing that happened. Maybe you should try doing the thing with the stuff and it might fix it."
android:layout_gravity="center_horizontal"/>
</LinearLayout>

0 comments on commit 1f5ea5d

Please sign in to comment.