Fix login activity crashes, repeated re-authentications,

layout when keyboard appears
This commit is contained in:
Eugen Rochko 2017-03-15 20:32:26 +01:00
commit 3798f9a803
5 changed files with 60 additions and 53 deletions

View file

@ -1,63 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView 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"
android:padding="16dp"
android:fillViewport="true"
tools:context="com.keylesspalace.tusky.LoginActivity">
<RelativeLayout
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:padding="16dp"
android:gravity="center"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center">
android:layout_marginBottom="50dp"
android:src="@drawable/elephant_friend"/>
<ImageView
<android.support.design.widget.TextInputLayout
android:layout_height="wrap_content"
android:layout_width="250dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/elephant_friend"/>
android:inputType="textUri"
android:hint="@string/hint_domain"
android:ems="10"
android:id="@+id/edit_text_domain" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_height="match_parent"
android:layout_width="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:hint="@string/hint_domain"
android:ems="10"
android:id="@+id/edit_text_domain" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/button_login"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:elevation="0dp"
android:text="@string/action_login" />
<Button
android:id="@+id/button_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:elevation="0dp"
android:text="@string/action_login" />
<TextView
android:layout_width="250dp"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/text_error" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/text_error" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:id="@+id/no_account"
android:text="@string/link_no_account" />
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
<TextView
android:layout_width="250dp"
android:layout_height="wrap_content"
android:textAlignment="center"
android:id="@+id/no_account"
android:text="@string/link_no_account" />
</LinearLayout>
</ScrollView>