Верстка админа
This commit is contained in:
parent
041db2955f
commit
7596e22de5
@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_color"
|
||||
tools:context=".admin">
|
||||
tools:context=".ui.admin.AdminFragment">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
@ -59,82 +59,28 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/block_employee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
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_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintLeft_toRightOf="@+id/guideline_left"
|
||||
app:layout_constraintRight_toLeftOf="@+id/guideline_right">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/visit_date"
|
||||
style="@style/secondary_text_color"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|start"
|
||||
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>
|
||||
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/item_employee" />
|
||||
|
||||
</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_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:textSize="14sp"
|
||||
android:singleLine="true"
|
||||
tools:text="Главный вход"/>
|
||||
|
||||
@ -58,6 +59,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="end"
|
||||
android:textSize="14sp"
|
||||
android:singleLine="true"
|
||||
tools:text="8:00" />
|
||||
</LinearLayout>
|
||||
|
@ -18,8 +18,6 @@
|
||||
<string name="history_title">Visit history</string>
|
||||
<string name="login_unauthorized">Incorrect login or password</string>
|
||||
<string name="search_hint">Enter the employee\'s username</string>
|
||||
<string name="admin_unauthorized">Unauthorized</string>
|
||||
<string name="admin_forbidden">Forbidden \n
|
||||
How did you get here?</string>
|
||||
<string name="not_found"> 404 Not Found</string>
|
||||
<string name="block_btn">Block</string>
|
||||
<string name="unblock_btn">Unblock</string>
|
||||
</resources>
|
@ -20,10 +20,8 @@
|
||||
<string name="history_title">История посещений</string>
|
||||
<string name="login_unauthorized">Неправильное имя пользователя или пароль</string>
|
||||
<string name="search_hint">Введите логин сотрудника</string>
|
||||
<string name="admin_unauthorized">Вы не авторизованы</string>
|
||||
<string name="admin_forbidden">Не достаточно прав \n
|
||||
Как ты сюда попал?</string>
|
||||
<string name="not_found">404 Не найдено</string>
|
||||
<string name="block_btn">Заблокировать</string>
|
||||
<string name="unblock_btn">Разблокировать</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user