Верстка админа
This commit is contained in:
parent
041db2955f
commit
7596e22de5
@ -6,7 +6,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/bg_color"
|
android:background="@color/bg_color"
|
||||||
tools:context=".admin">
|
tools:context=".ui.admin.AdminFragment">
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
@ -59,82 +59,28 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/block_employee"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/history_corner_radius"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
app:layout_constrainedWidth="true"
|
||||||
|
app:layout_constrainedHeight="true"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/block_header"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintVertical_bias="1"
|
||||||
|
app:layout_constraintLeft_toRightOf="@+id/guideline_left"
|
||||||
|
app:layout_constraintRight_toLeftOf="@+id/guideline_right">
|
||||||
|
|
||||||
<TextView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/visit_date"
|
android:id="@+id/content"
|
||||||
style="@style/secondary_text_color"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="top|start"
|
tools:listitem="@layout/item_employee" />
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
tools:text="18 февраля" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="12dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/visit_type"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:importantForAccessibility="no"
|
|
||||||
app:srcCompat="@drawable/logo_visit_card" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/visit_reader_id"
|
|
||||||
style="@style/font_medium"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
tools:text="Главный вход" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/visit_time"
|
|
||||||
style="@style/font_medium"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:gravity="end"
|
|
||||||
android:singleLine="true"
|
|
||||||
tools:text="8:00" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/visit_direction"
|
|
||||||
style="@style/secondary_text_color"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="12sp"
|
|
||||||
tools:text="Вход" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
66
app/src/main/res/layout/item_employee.xml
Normal file
66
app/src/main/res/layout/item_employee.xml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:paddingHorizontal="12dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
app:srcCompat="@drawable/avatar_alt"
|
||||||
|
tools:ignore="ImageContrastCheck" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/visit_reader_id"
|
||||||
|
style="@style/font_medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:singleLine="true"
|
||||||
|
tools:text="Артемий ФИО"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/уь_direction"
|
||||||
|
style="@style/secondary_text_color"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:singleLine="true"
|
||||||
|
tools:text="Вход"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/block_btn"
|
||||||
|
android:layout_width="116dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:backgroundTint="@color/accent_color"
|
||||||
|
android:text="@string/block_btn"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:fontFamily="@font/montserrat_medium"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="8sp"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:cornerRadius="16dp"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -48,6 +48,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
|
android:textSize="14sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
tools:text="Главный вход"/>
|
tools:text="Главный вход"/>
|
||||||
|
|
||||||
@ -58,6 +59,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
|
android:textSize="14sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
tools:text="8:00" />
|
tools:text="8:00" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
<string name="history_title">Visit history</string>
|
<string name="history_title">Visit history</string>
|
||||||
<string name="login_unauthorized">Incorrect login or password</string>
|
<string name="login_unauthorized">Incorrect login or password</string>
|
||||||
<string name="search_hint">Enter the employee\'s username</string>
|
<string name="search_hint">Enter the employee\'s username</string>
|
||||||
<string name="admin_unauthorized">Unauthorized</string>
|
<string name="block_btn">Block</string>
|
||||||
<string name="admin_forbidden">Forbidden \n
|
<string name="unblock_btn">Unblock</string>
|
||||||
How did you get here?</string>
|
|
||||||
<string name="not_found"> 404 Not Found</string>
|
|
||||||
</resources>
|
</resources>
|
@ -20,10 +20,8 @@
|
|||||||
<string name="history_title">История посещений</string>
|
<string name="history_title">История посещений</string>
|
||||||
<string name="login_unauthorized">Неправильное имя пользователя или пароль</string>
|
<string name="login_unauthorized">Неправильное имя пользователя или пароль</string>
|
||||||
<string name="search_hint">Введите логин сотрудника</string>
|
<string name="search_hint">Введите логин сотрудника</string>
|
||||||
<string name="admin_unauthorized">Вы не авторизованы</string>
|
<string name="block_btn">Заблокировать</string>
|
||||||
<string name="admin_forbidden">Не достаточно прав \n
|
<string name="unblock_btn">Разблокировать</string>
|
||||||
Как ты сюда попал?</string>
|
|
||||||
<string name="not_found">404 Не найдено</string>
|
|
||||||
<!-- TODO: Remove or change this placeholder text -->
|
<!-- TODO: Remove or change this placeholder text -->
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user