Темная тема

This commit is contained in:
senijan 2025-02-20 14:53:06 +03:00
parent f6e9f28e3c
commit eb4a59e4fe
12 changed files with 41 additions and 45 deletions

View File

@ -11,7 +11,6 @@ import androidx.fragment.app.viewModels
import ru.myitschool.work.R
import ru.myitschool.work.databinding.FragmentAdminBinding
import ru.myitschool.work.entities.EmployeeEntity
import ru.myitschool.work.ui.login.LoginViewModel
import ru.myitschool.work.utils.collectWithLifecycle
class AdminFragment : Fragment(R.layout.fragment_admin) {

View File

@ -12,7 +12,6 @@ import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import androidx.paging.LoadState
import androidx.paging.map
import androidx.recyclerview.widget.LinearLayoutManager
import com.squareup.picasso.Picasso
import kotlinx.coroutines.delay

View File

@ -7,8 +7,8 @@
android:pathData="M50,50m-48.5,0a48.5,48.5 0,1 1,97 0a48.5,48.5 0,1 1,-97 0"
android:strokeWidth="3"
android:fillColor="#AEC3FF"
android:strokeColor="#ffffff"/>
android:strokeColor="@color/theme_color"/>
<path
android:pathData="M61.99,54.17C64.58,54.17 66.67,56.26 66.67,58.85V60.05C66.67,61.91 66.01,63.71 64.8,65.13C61.53,68.95 56.55,70.83 50,70.83C43.45,70.83 38.48,68.95 35.21,65.13C34,63.71 33.34,61.91 33.34,60.05V58.85C33.34,56.26 35.44,54.17 38.03,54.17H61.99ZM61.99,57.29H38.03C37.16,57.29 36.47,57.99 36.47,58.85V60.05C36.47,61.17 36.86,62.25 37.59,63.1C40.2,66.16 44.3,67.71 50,67.71C55.71,67.71 59.8,66.16 62.42,63.1C63.15,62.25 63.55,61.17 63.55,60.05V58.85C63.55,57.99 62.85,57.29 61.99,57.29ZM50,29.18C55.75,29.18 60.42,33.84 60.42,39.59C60.42,45.35 55.75,50.01 50,50.01C44.25,50.01 39.58,45.35 39.58,39.59C39.58,33.84 44.25,29.18 50,29.18ZM50,32.3C45.97,32.3 42.71,35.57 42.71,39.59C42.71,43.62 45.97,46.88 50,46.88C54.03,46.88 57.29,43.62 57.29,39.59C57.29,35.57 54.03,32.3 50,32.3Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/theme_color"/>
</vector>

View File

@ -5,41 +5,41 @@
android:viewportHeight="36">
<path
android:pathData="M6.75,8.625C6.75,7.589 7.589,6.75 8.625,6.75H11.625C12.246,6.75 12.75,6.246 12.75,5.625C12.75,5.004 12.246,4.5 11.625,4.5H8.625C6.347,4.5 4.5,6.347 4.5,8.625V11.625C4.5,12.246 5.004,12.75 5.625,12.75C6.246,12.75 6.75,12.246 6.75,11.625V8.625Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M6.75,27.375C6.75,28.411 7.589,29.25 8.625,29.25H11.625C12.246,29.25 12.75,29.754 12.75,30.375C12.75,30.996 12.246,31.5 11.625,31.5H8.625C6.347,31.5 4.5,29.653 4.5,27.375V24.375C4.5,23.754 5.004,23.25 5.625,23.25C6.246,23.25 6.75,23.754 6.75,24.375V27.375Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M27.375,6.75C28.411,6.75 29.25,7.589 29.25,8.625V11.625C29.25,12.246 29.754,12.75 30.375,12.75C30.996,12.75 31.5,12.246 31.5,11.625V8.625C31.5,6.347 29.653,4.5 27.375,4.5H24.375C23.754,4.5 23.25,5.004 23.25,5.625C23.25,6.246 23.754,6.75 24.375,6.75H27.375Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M29.25,27.375C29.25,28.411 28.411,29.25 27.375,29.25H24.375C23.754,29.25 23.25,29.754 23.25,30.375C23.25,30.996 23.754,31.5 24.375,31.5H27.375C29.653,31.5 31.5,29.653 31.5,27.375V24.375C31.5,23.754 30.996,23.25 30.375,23.25C29.754,23.25 29.25,23.754 29.25,24.375V27.375Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M15,13.5H13.5V15H15V13.5Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M11.25,12.938C11.25,12.005 12.005,11.25 12.938,11.25H15.563C16.494,11.25 17.25,12.005 17.25,12.938V15.563C17.25,16.494 16.494,17.25 15.563,17.25H12.938C12.005,17.25 11.25,16.494 11.25,15.563V12.938ZM12.938,12.375C12.627,12.375 12.375,12.627 12.375,12.938V15.563C12.375,15.873 12.627,16.125 12.938,16.125H15.563C15.873,16.125 16.125,15.873 16.125,15.563V12.938C16.125,12.627 15.873,12.375 15.563,12.375H12.938Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M13.5,21H15V22.5H13.5V21Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M11.25,20.438C11.25,19.506 12.005,18.75 12.938,18.75H15.563C16.494,18.75 17.25,19.506 17.25,20.438V23.063C17.25,23.994 16.494,24.75 15.563,24.75H12.938C12.005,24.75 11.25,23.994 11.25,23.063V20.438ZM12.938,19.875C12.627,19.875 12.375,20.127 12.375,20.438V23.063C12.375,23.373 12.627,23.625 12.938,23.625H15.563C15.873,23.625 16.125,23.373 16.125,23.063V20.438C16.125,20.127 15.873,19.875 15.563,19.875H12.938Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M22.5,13.5H21V15H22.5V13.5Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M20.438,11.25C19.506,11.25 18.75,12.005 18.75,12.938V15.563C18.75,16.494 19.506,17.25 20.438,17.25H23.063C23.994,17.25 24.75,16.494 24.75,15.563V12.938C24.75,12.005 23.994,11.25 23.063,11.25H20.438ZM19.875,12.938C19.875,12.627 20.127,12.375 20.438,12.375H23.063C23.373,12.375 23.625,12.627 23.625,12.938V15.563C23.625,15.873 23.373,16.125 23.063,16.125H20.438C20.127,16.125 19.875,15.873 19.875,15.563V12.938Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M18.75,18.75H20.813V20.813H18.75V18.75Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M22.688,20.813H20.813V22.688H18.75V24.75H20.813V22.688H22.688V24.75H24.75V22.688H22.688V20.813Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
<path
android:pathData="M22.688,20.813V18.75H24.75V20.813H22.688Z"
android:fillColor="#ffffff"/>
android:fillColor="@color/white"/>
</vector>

View File

@ -6,7 +6,7 @@
android:viewportHeight="48">
<path
android:pathData="M16,0L32,0A16,16 0,0 1,48 16L48,32A16,16 0,0 1,32 48L16,48A16,16 0,0 1,0 32L0,16A16,16 0,0 1,16 0z"
android:fillColor="#F2F1F7"/>
android:fillColor="@color/bg_color"/>
<path
android:pathData="M34.333,13.333C35.99,13.333 37.333,14.676 37.333,16.333V31.673C37.333,33.329 35.99,34.673 34.333,34.673H13.667C12.01,34.673 10.667,33.329 10.667,31.673V16.333C10.667,14.676 12.01,13.333 13.667,13.333H34.333ZM34.333,15.333H13.667C13.114,15.333 12.667,15.781 12.667,16.333V31.673C12.667,32.225 13.114,32.673 13.667,32.673H34.333C34.886,32.673 35.333,32.225 35.333,31.673V16.333C35.333,15.781 34.886,15.333 34.333,15.333ZM21,24.667C21.552,24.667 22,25.114 22,25.667V26.323L21.989,26.468C21.772,27.952 20.53,28.668 18.667,28.668C16.803,28.668 15.561,27.951 15.344,26.467L15.333,26.322V25.667C15.333,25.114 15.781,24.667 16.333,24.667H21ZM25.67,25.328H31.667C32.219,25.328 32.667,25.776 32.667,26.328C32.667,26.834 32.29,27.253 31.802,27.319L31.667,27.328H25.67C25.117,27.328 24.67,26.881 24.67,26.328C24.67,25.822 25.046,25.403 25.534,25.337L25.67,25.328ZM18.667,19.336C19.771,19.336 20.667,20.232 20.667,21.336C20.667,22.441 19.771,23.336 18.667,23.336C17.562,23.336 16.667,22.441 16.667,21.336C16.667,20.232 17.562,19.336 18.667,19.336ZM25.67,20.667H31.667C32.219,20.667 32.667,21.114 32.667,21.667C32.667,22.173 32.29,22.591 31.802,22.657L31.667,22.667H25.67C25.117,22.667 24.67,22.219 24.67,21.667C24.67,21.16 25.046,20.742 25.534,20.676L25.67,20.667Z"
android:fillColor="#004BFF"

View File

@ -5,7 +5,7 @@
android:viewportHeight="48">
<path
android:pathData="M16,0L32,0A16,16 0,0 1,48 16L48,32A16,16 0,0 1,32 48L16,48A16,16 0,0 1,0 32L0,16A16,16 0,0 1,16 0z"
android:fillColor="#F2F1F7"/>
android:fillColor="@color/bg_color"/>
<path
android:pathData="M14,15.667C14,14.746 14.746,14 15.667,14H18.333C18.886,14 19.333,13.552 19.333,13C19.333,12.448 18.886,12 18.333,12H15.667C13.642,12 12,13.642 12,15.667V18.333C12,18.886 12.448,19.333 13,19.333C13.552,19.333 14,18.886 14,18.333V15.667Z"
android:fillColor="#004BFF"/>

View File

@ -129,7 +129,7 @@
<Button
android:id="@+id/block_btn"
android:layout_width="116dp"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"

View File

@ -45,7 +45,7 @@
android:fontFamily="@font/montserrat_bold"
android:text="@string/main_error"
android:textAlignment="center"
android:textColor="@color/red"
android:textColor="@color/error_color"
android:textSize="20sp"
android:visibility="gone" />
</LinearLayout>
@ -54,6 +54,7 @@
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/accent_color"
android:visibility="gone"
tools:visibility="gone" />
</LinearLayout>
@ -81,7 +82,7 @@
<Button
android:id="@+id/refresh"
style="@style/theme_text_color"
style="@style/white_text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
@ -97,7 +98,7 @@
<Button
android:id="@+id/logout"
style="@style/theme_text_color"
style="@style/white_text_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
@ -122,11 +123,11 @@
<TextView
android:id="@+id/fullname"
style="@style/white_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="68dp"
android:fontFamily="@font/montserrat_bold"
android:textColor="@color/theme_color"
android:textAlignment="center"
android:textSize="20sp"
tools:text="@tools:sample/full_names" />
@ -171,7 +172,7 @@
<Button
android:id="@+id/scan"
style="@style/theme_text_color"
style="@style/white_text_color"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="28dp"

View File

@ -49,7 +49,7 @@
<Button
android:id="@+id/block_btn"
android:layout_width="116dp"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"

View File

@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="red">#E4080A</color>
<color name="enable_btn">#E78A07</color>
<color name="disable_btn">#C3C3C3</color>
<color name="gray">#E78A07</color>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<color name="error_color">#FF1F44</color>
<color name="theme_color">#FFFFFF</color>

View File

@ -16,6 +16,13 @@
<item name="android:fontFamily">@font/montserrat_medium</item>
</style>
<style name="white_color">
<item name="android:textColor">@color/white</item>
</style>
<style name="white_text_color" parent="white_color">
<item name="android:fontFamily">@font/montserrat_medium</item>
</style>
<style name="secondary_text_color">
<item name="android:textColor">@color/secondary_text_color</item>

View File

@ -1,16 +1,14 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.Default" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<color name="theme_color">#000000</color>
<color name="primary_text_color">#FFFFFF</color>
<color name="secondary_text_color">#B0B0B0</color>
<color name="bg_color">#434343</color>
<color name="input_color">#6A6A6A</color>
</resources>