code: Сделан экран входа в XML
This commit is contained in:
parent
21fbedfdf0
commit
ea8dd6f869
8
app/src/main/res/drawable/button_black.xml
Normal file
8
app/src/main/res/drawable/button_black.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/black" />
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/black" />
|
||||||
|
<corners android:radius="8dp"/>
|
||||||
|
</shape>
|
@ -3,6 +3,6 @@
|
|||||||
<solid android:color="@color/white" />
|
<solid android:color="@color/white" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="2dp"
|
||||||
android:color="@color/black" />
|
android:color="@color/grey" />
|
||||||
<corners android:radius="8dp"/>
|
<corners android:radius="8dp"/>
|
||||||
</shape>
|
</shape>
|
@ -1,7 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
@ -13,59 +15,137 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/guideline_top"
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="24dp"
|
|
||||||
android:gravity="center">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.25" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.8" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_mid"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.55" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/welcomeText"
|
android:text="@string/welcomeText"
|
||||||
android:textSize="24sp"
|
android:textColor="@color/black"
|
||||||
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:gravity="center" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_top" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/textView2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/inputLoginText"
|
android:text="@string/inputLoginText"
|
||||||
android:textSize="18sp"
|
android:textColor="@color/black"
|
||||||
android:gravity="center" />
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:gravity="center"
|
||||||
android:text="@string/welcomeDescriptionLoginText"
|
android:text="@string/welcomeDescriptionLoginText"
|
||||||
android:textSize="14sp"
|
android:textColor="@color/black"
|
||||||
android:gravity="center" />
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView2" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/field_view"
|
||||||
|
android:layout_width="320dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:background="@drawable/button_grestroke_whiteback"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/guideline_mid"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/username"
|
android:id="@+id/username"
|
||||||
android:layout_width="match_parent"
|
style="@style/NoUnderLineEditText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:autofillHints=""
|
android:autofillHints=""
|
||||||
android:hint="@string/loginText"
|
android:hint="@string/loginText"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:padding="12dp" />
|
android:padding="12dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/field_view"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/field_view"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/field_view" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/field_view2"
|
||||||
|
android:layout_width="320dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/button_grestroke_whiteback"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_mid" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/password"
|
||||||
|
style="@style/NoUnderLineEditText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:hint="@string/passwordText"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:padding="12dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/field_view2"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/field_view2"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/field_view2" />
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/login"
|
android:id="@+id/login"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="320dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="24dp"
|
android:background="@drawable/button_black"
|
||||||
|
android:enabled="false"
|
||||||
android:text="@string/continueText"
|
android:text="@string/continueText"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:enabled="false"/>
|
app:layout_constraintBottom_toTopOf="@+id/guideline_bottom"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/field_view2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/error"
|
android:id="@+id/error"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:gravity="center"
|
||||||
android:text="@string/loginError"
|
android:text="@string/loginError"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:gravity="center"
|
android:visibility="gone"
|
||||||
android:visibility="gone"/>
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
</LinearLayout>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -9,4 +9,5 @@
|
|||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
<color name="buttonBackground">#5C5C5C</color>
|
<color name="buttonBackground">#5C5C5C</color>
|
||||||
<color name="buttonText">#C0C0C0</color>
|
<color name="buttonText">#C0C0C0</color>
|
||||||
|
<color name="grey">#808080</color>
|
||||||
</resources>
|
</resources>
|
@ -1,6 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">NTO Pass</string>
|
<string name="app_name">NTO Pass</string>
|
||||||
<string name="loginText">Логин</string>
|
<string name="loginText">логин</string>
|
||||||
<string name="welcomeText">Добро пожаловать!</string>
|
<string name="welcomeText">Добро пожаловать!</string>
|
||||||
<string name="inputLoginText">Введите свой логин</string>
|
<string name="inputLoginText">Введите свой логин</string>
|
||||||
<string name="welcomeDescriptionLoginText">для авторизации в приложении</string>
|
<string name="welcomeDescriptionLoginText">для авторизации в приложении</string>
|
||||||
@ -19,4 +19,5 @@
|
|||||||
<string name="closeText">Закрыть/Close</string>
|
<string name="closeText">Закрыть/Close</string>
|
||||||
<string name="errorLoginText">Ошибка входа</string>
|
<string name="errorLoginText">Ошибка входа</string>
|
||||||
<string name="text_last_enter">Последний вход 12.12.1212</string>
|
<string name="text_last_enter">Последний вход 12.12.1212</string>
|
||||||
|
<string name="passwordText">пароль</string>
|
||||||
</resources>
|
</resources>
|
9
app/src/main/res/values/styles.xml
Normal file
9
app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="NoUnderLineEditText"
|
||||||
|
parent = "Widget.AppCompat.EditText" >
|
||||||
|
<item
|
||||||
|
name = "android:background" >@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user