Split login form for two fragments (#230)
This commit is contained in:

committed by
Mikołaj Pich

parent
2f87779647
commit
1b1f2ae3bb
@ -1,6 +1,5 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@ -34,7 +33,6 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/loginScroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none">
|
||||
@ -49,7 +47,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginHeader"
|
||||
android:id="@+id/loginFormHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
@ -57,72 +55,48 @@
|
||||
android:text="@string/login_header_default"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/loginMainForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_nickname_hint">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginNicknameEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_password_hint">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginPassEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeActionLabel="@string/login_sign_in"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
app:fontFamily="sans-serif" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/loginHostEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_host_hint" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginSymbolInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_symbol_hint"
|
||||
android:visibility="gone">
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_nickname_hint">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/loginSymbolEdit"
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginFormName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:hint="@string/login_password_hint">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/loginFormPass"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeActionLabel="@string/login_sign_in"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textAutoComplete"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
tools:ignore="LabelFor" />
|
||||
app:fontFamily="sans-serif" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/loginFormHost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_host_hint" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/loginSignButton"
|
||||
android:id="@+id/loginFormSignIn"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -134,12 +108,11 @@
|
||||
app:backgroundTint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginVersion"
|
||||
android:id="@+id/loginFormVersion"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/second_text"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@ -18,8 +19,8 @@
|
||||
android:layout_below="@id/loginOptionsProgressText"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminate="true"
|
||||
android:minHeight="30dp"
|
||||
android:minWidth="220dp" />
|
||||
android:minWidth="220dp"
|
||||
android:minHeight="30dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginOptionsProgressText"
|
||||
@ -33,5 +34,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/loginOptionsRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/item_login_options" />
|
||||
</LinearLayout>
|
88
app/src/main/res/layout/fragment_login_symbol.xml
Normal file
88
app/src/main/res/layout/fragment_login_symbol.xml
Normal file
@ -0,0 +1,88 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/loginSymbolProgressContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/loginSymbolProgressText"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:indeterminate="true"
|
||||
android:minWidth="220dp"
|
||||
android:minHeight="30dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginSymbolProgressText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="@string/login_progress" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/loginSymbolContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginSymbolHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="@string/login_header_symbol"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_symbol_hint">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/loginSymbolName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeActionLabel="@string/login_sign_in"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textAutoComplete"
|
||||
android:maxLines="1"
|
||||
tools:ignore="LabelFor" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/loginSymbolSignIn"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:text="@string/login_sign_in"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@color/colorPrimary" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
Reference in New Issue
Block a user