Creata login page per layout large
This commit is contained in:
parent
0acf023556
commit
19e2d5b869
150
app/src/main/res/layout-large/activity_login.xml
Normal file
150
app/src/main/res/layout-large/activity_login.xml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.login.LoginActivity" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/colorPrimarySurface"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="32dp"
|
||||||
|
app:cardCornerRadius="16dp">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingTop="56dp"
|
||||||
|
android:paddingRight="24dp"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@drawable/logo_integry_testo" />
|
||||||
|
|
||||||
|
<!-- Username Label -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:errorText="@{view.usernameError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_username"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="300dp"
|
||||||
|
android:hint="Username"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
app:binding="@{view.username}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- Password Label -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:errorText="@{view.passwordError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_password"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minWidth="300dp"
|
||||||
|
android:hint="Password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:binding="@{view.password}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/login_checkbox_custom_server"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
||||||
|
android:text="@string/action_customize_server_settings"
|
||||||
|
app:checked="@{view.customSettingsCheckboxChecked}" />
|
||||||
|
|
||||||
|
<net.cachapa.expandablelayout.ExpandableLayout
|
||||||
|
android:id="@+id/login_layout_server_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
app:el_duration="400"
|
||||||
|
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Host Label-->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:errorText="@{view.codAziendaError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_cod_azienda"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Codice azienda"
|
||||||
|
android:inputType="text"
|
||||||
|
app:binding="@{view.codAzienda}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btn_login"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:minWidth="170dp"
|
||||||
|
android:enabled="@{view.loginButtonEnabled}"
|
||||||
|
android:text="@string/login"
|
||||||
|
app:onClick="@{() -> view.login()}" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</ScrollView>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</layout>
|
||||||
@ -10,122 +10,124 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="24dp"
|
|
||||||
android:paddingTop="56dp"
|
|
||||||
android:paddingRight="24dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="72dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:src="@drawable/logo_integry_testo" />
|
|
||||||
|
|
||||||
<!-- Username Label -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
app:errorText="@{view.usernameError}"
|
|
||||||
app:hintTextAppearance="@style/hint_text"
|
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_username"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Username"
|
android:orientation="vertical"
|
||||||
android:inputType="textEmailAddress"
|
android:paddingLeft="24dp"
|
||||||
app:binding="@{view.username}" />
|
android:paddingTop="56dp"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
android:paddingRight="24dp">
|
||||||
|
|
||||||
<!-- Password Label -->
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="72dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:src="@drawable/logo_integry_testo" />
|
||||||
app:errorText="@{view.passwordError}"
|
|
||||||
app:hintTextAppearance="@style/hint_text"
|
|
||||||
app:passwordToggleEnabled="true"
|
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<!-- Username Label -->
|
||||||
android:id="@+id/input_password"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="Password"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
app:binding="@{view.password}" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatCheckBox
|
|
||||||
android:id="@+id/login_checkbox_custom_server"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
|
||||||
android:text="@string/action_customize_server_settings"
|
|
||||||
app:checked="@{view.customSettingsCheckboxChecked}" />
|
|
||||||
|
|
||||||
<net.cachapa.expandablelayout.ExpandableLayout
|
|
||||||
android:id="@+id/login_layout_server_details"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="6dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
app:el_duration="400"
|
|
||||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<!--Host Label-->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:errorText="@{view.codAziendaError}"
|
android:layout_marginBottom="8dp"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
app:errorText="@{view.usernameError}"
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_cod_azienda"
|
android:id="@+id/input_username"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Codice azienda"
|
android:hint="Username"
|
||||||
android:inputType="text"
|
android:inputType="textEmailAddress"
|
||||||
app:binding="@{view.codAzienda}" />
|
app:binding="@{view.username}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<!-- Password Label -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:errorText="@{view.passwordError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text"
|
||||||
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:binding="@{view.password}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/login_checkbox_custom_server"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
||||||
|
android:text="@string/action_customize_server_settings"
|
||||||
|
app:checked="@{view.customSettingsCheckboxChecked}" />
|
||||||
|
|
||||||
|
<net.cachapa.expandablelayout.ExpandableLayout
|
||||||
|
android:id="@+id/login_layout_server_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
app:el_duration="400"
|
||||||
|
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Host Label-->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:errorText="@{view.codAziendaError}"
|
||||||
|
app:hintTextAppearance="@style/hint_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_cod_azienda"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Codice azienda"
|
||||||
|
android:inputType="text"
|
||||||
|
app:binding="@{view.codAzienda}" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_login"
|
android:id="@+id/btn_login"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Button.PrimaryFull"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:enabled="@{view.loginButtonEnabled}"
|
android:enabled="@{view.loginButtonEnabled}"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
app:onClick="@{() -> view.login()}" />
|
app:onClick="@{() -> view.login()}" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
</ScrollView>
|
|
||||||
</layout>
|
</layout>
|
||||||
Loading…
x
Reference in New Issue
Block a user