mirror of
https://github.com/apognu/otter
synced 2025-02-10 08:10:36 +01:00
Wrap LoginActivity in ScrollView to account for small screens and landscape mode.
This commit is contained in:
parent
c36616ab92
commit
9ea5446f58
@ -1,101 +1,106 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/colorPrimary"
|
android:background="@color/colorPrimary">
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="32dp">
|
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="128dp"
|
|
||||||
android:layout_height="128dp"
|
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:contentDescription="@string/alt_app_logo"
|
|
||||||
android:src="@drawable/ottershape"
|
|
||||||
android:tint="@android:color/white" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="32dp"
|
android:gravity="center"
|
||||||
android:text="@string/login_welcome"
|
android:orientation="vertical"
|
||||||
android:textAlignment="center"
|
android:padding="32dp">
|
||||||
android:textColor="@android:color/white" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<ImageView
|
||||||
android:id="@+id/hostname_field"
|
android:layout_width="128dp"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
android:layout_height="128dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_marginBottom="32dp"
|
||||||
android:layout_height="wrap_content"
|
android:contentDescription="@string/alt_app_logo"
|
||||||
android:layout_marginBottom="8dp"
|
android:src="@drawable/ottershape"
|
||||||
android:hint="@string/login_hostname"
|
android:tint="@android:color/white" />
|
||||||
android:textColorHint="@drawable/login_input"
|
|
||||||
app:boxStrokeColor="@drawable/login_input"
|
|
||||||
app:hintTextColor="@drawable/login_input">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<TextView
|
||||||
android:id="@+id/hostname"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textUri"
|
android:layout_marginBottom="32dp"
|
||||||
android:lines="1"
|
android:text="@string/login_welcome"
|
||||||
android:textColor="@android:color/white"
|
android:textAlignment="center"
|
||||||
android:textCursorDrawable="@null" />
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/hostname_field"
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:id="@+id/username_field"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:hint="@string/login_username"
|
|
||||||
android:textColorHint="@drawable/login_input"
|
|
||||||
app:boxStrokeColor="@drawable/login_input"
|
|
||||||
app:hintTextColor="@drawable/login_input">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/username"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textEmailAddress"
|
android:layout_marginBottom="8dp"
|
||||||
android:lines="1"
|
android:hint="@string/login_hostname"
|
||||||
android:textColor="@android:color/white"
|
android:textColorHint="@drawable/login_input"
|
||||||
android:textCursorDrawable="@null" />
|
app:boxStrokeColor="@drawable/login_input"
|
||||||
|
app:hintTextColor="@drawable/login_input">
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/hostname"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textUri"
|
||||||
|
android:lines="1"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textCursorDrawable="@null" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/password_field"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:hint="@string/login_password"
|
|
||||||
android:textColorHint="@drawable/login_input"
|
|
||||||
app:boxStrokeColor="@drawable/login_input"
|
|
||||||
app:hintTextColor="@drawable/login_input"
|
|
||||||
app:passwordToggleEnabled="true">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/password"
|
android:id="@+id/username_field"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textPassword"
|
android:layout_marginBottom="8dp"
|
||||||
android:lines="1"
|
android:hint="@string/login_username"
|
||||||
android:textColor="@android:color/white"
|
android:textColorHint="@drawable/login_input"
|
||||||
android:textCursorDrawable="@null" />
|
app:boxStrokeColor="@drawable/login_input"
|
||||||
|
app:hintTextColor="@drawable/login_input">
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/username"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:lines="1"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textCursorDrawable="@null" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/login"
|
|
||||||
android:layout_width="wrap_content"
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/password_field"
|
||||||
android:backgroundTint="@color/colorAccent"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:text="@string/login_submit"
|
android:layout_width="match_parent"
|
||||||
android:textColor="@color/whiteWhileLight" />
|
android:layout_height="wrap_content"
|
||||||
</LinearLayout>
|
android:layout_marginBottom="8dp"
|
||||||
|
android:hint="@string/login_password"
|
||||||
|
android:textColorHint="@drawable/login_input"
|
||||||
|
app:boxStrokeColor="@drawable/login_input"
|
||||||
|
app:hintTextColor="@drawable/login_input"
|
||||||
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:lines="1"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textCursorDrawable="@null" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/login"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:backgroundTint="@color/colorAccent"
|
||||||
|
android:text="@string/login_submit"
|
||||||
|
android:textColor="@color/whiteWhileLight" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user