summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-01-19 17:34:45 +0100
committerFup Duck <fupduck@sacknagel.com>2018-01-19 17:34:45 +0100
commitb065fa48e802487198ad73915dd017c4464e8c62 (patch)
treedf48491884de8e29c52db4794a3233fa34a4a6ff /app/src/main/res/layout
parent1ccb2f9e1bcfaf8279ef9576b3bca233e37af61b (diff)
improve layout
* improve layout * gracefully handle orientation changes * respect small devices * set correct colors for buttons, error messages...
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/a_login.xml38
-rw-r--r--app/src/main/res/layout/a_provider_credentials.xml54
-rw-r--r--app/src/main/res/layout/a_provider_detail.xml (renamed from app/src/main/res/layout/provider_detail_fragment.xml)1
-rw-r--r--app/src/main/res/layout/a_signup.xml38
-rw-r--r--app/src/main/res/layout/provider_credentials.xml (renamed from app/src/main/res/layout/provider_credentials_login.xml)28
-rw-r--r--app/src/main/res/layout/provider_credentials_signup.xml24
6 files changed, 82 insertions, 101 deletions
diff --git a/app/src/main/res/layout/a_login.xml b/app/src/main/res/layout/a_login.xml
deleted file mode 100644
index 5b33ec16..00000000
--- a/app/src/main/res/layout/a_login.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent"
- style="@style/BitmaskActivity">
-
- <include layout="@layout/loading_screen" />
-
- <LinearLayout
- android:id="@+id/content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <include
- layout="@layout/provider_header"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <include layout="@layout/provider_credentials_login"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <android.support.v7.widget.AppCompatButton
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/login_button"
- android:layout_alignParentRight="true"
- android:layout_alignParentEnd="true"/>
-
- </RelativeLayout>
- </LinearLayout>
-</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/a_provider_credentials.xml b/app/src/main/res/layout/a_provider_credentials.xml
new file mode 100644
index 00000000..85d9d3cb
--- /dev/null
+++ b/app/src/main/res/layout/a_provider_credentials.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/BitmaskActivity">
+
+ <include layout="@layout/loading_screen" />
+
+ <LinearLayout
+ android:id="@+id/content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <include
+ layout="@layout/provider_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+
+ <ScrollView
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:isScrollContainer="true"
+ >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ <include
+ layout="@layout/provider_credentials"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <android.support.v7.widget.AppCompatButton
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:text="@string/login_button" />
+
+ </RelativeLayout>
+ </LinearLayout>
+ </ScrollView>
+ </LinearLayout>
+</LinearLayout>
diff --git a/app/src/main/res/layout/provider_detail_fragment.xml b/app/src/main/res/layout/a_provider_detail.xml
index e4ee1cca..5f07b87c 100644
--- a/app/src/main/res/layout/provider_detail_fragment.xml
+++ b/app/src/main/res/layout/a_provider_detail.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/provider_detail_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/app/src/main/res/layout/a_signup.xml b/app/src/main/res/layout/a_signup.xml
deleted file mode 100644
index b0c8dc47..00000000
--- a/app/src/main/res/layout/a_signup.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent"
- style="@style/BitmaskActivity">
-
- <include layout="@layout/loading_screen" />
-
- <LinearLayout
- android:id="@+id/content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <include
- layout="@layout/provider_header"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <include layout="@layout/provider_credentials_signup"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <android.support.v7.widget.AppCompatButton
- android:id="@+id/button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/login_button"
- android:layout_alignParentRight="true"
- android:layout_alignParentEnd="true"/>
-
- </RelativeLayout>
- </LinearLayout>
-</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/provider_credentials_login.xml b/app/src/main/res/layout/provider_credentials.xml
index 915ac231..6e4dff95 100644
--- a/app/src/main/res/layout/provider_credentials_login.xml
+++ b/app/src/main/res/layout/provider_credentials.xml
@@ -2,7 +2,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
+ <android.support.v7.widget.AppCompatTextView
+ android:id="@+id/provider_credentials_user_message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/TextAppearance.Design.Error"
+ android:visibility="gone"
+ />
+
<android.support.design.widget.TextInputLayout
+ android:id="@+id/provider_credentials_username_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/auth_username"
@@ -20,6 +29,7 @@
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
+ android:id="@+id/provider_credentials_password_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
@@ -35,4 +45,22 @@
</android.support.design.widget.TextInputLayout>
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/provider_credentials_password_verification_error"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:passwordToggleEnabled="true"
+ android:hint="@string/password"
+ app:errorEnabled="true"
+ android:visibility="gone">
+
+ <android.support.design.widget.TextInputEditText
+ android:id="@+id/provider_credentials_password_verification"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textPassword"
+ android:visibility="gone"
+ />
+
+ </android.support.design.widget.TextInputLayout>
</merge> \ No newline at end of file
diff --git a/app/src/main/res/layout/provider_credentials_signup.xml b/app/src/main/res/layout/provider_credentials_signup.xml
deleted file mode 100644
index c2e3dcd3..00000000
--- a/app/src/main/res/layout/provider_credentials_signup.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto" >
-
- <include layout="@layout/provider_credentials_login" />
-
- <android.support.design.widget.TextInputLayout
- android:id="@+id/provider_credentials_password_verification_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:passwordToggleEnabled="true"
- android:hint="@string/password"
- app:errorEnabled="true">
-
- <android.support.design.widget.TextInputEditText
- android:id="@+id/provider_credentials_password_verification"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textPassword"
- />
-
- </android.support.design.widget.TextInputLayout>
-
-</merge> \ No newline at end of file