Цвета подправил

This commit is contained in:
Кашин Максим 2023-10-26 19:26:03 +04:00
parent e7dec3a94a
commit 7f8fb77cb0
7 changed files with 41 additions and 11 deletions

View File

@ -20,4 +20,12 @@ fun ScreenProfile() {
modifier = Modifier.fillMaxSize().wrapContentHeight(),
text = "Тут будет профиль экран..."
)
}
}
@Composable
fun ScreenListProduct() {
Text(
modifier = Modifier.fillMaxSize().wrapContentHeight(),
text = "Тут будет профиль продуктов..."
)
}

View File

@ -18,5 +18,8 @@ fun SlideGraph(
composable("Info"){
ScreenInfo()
}
composable("ListProduct"){
ScreenListProduct()
}
}
}

View File

@ -5,4 +5,5 @@ import com.example.labwork.R
sealed class SlideItem(val title: String, val iconId: Int, val route: String){
object ScreenInfo: SlideItem("Информация", R.drawable.baseline_info,"Info" )
object ScreenProfile: SlideItem("Профиль", R.drawable.baseline_account_circle,"Profile" )
object ScreenListProduct: SlideItem("Товары", R.drawable.baseline_manage_search,"ListProduct" )
}

View File

@ -1,5 +1,7 @@
package com.example.labwork.button_navigation
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.BottomNavigation
import androidx.compose.material.BottomNavigationItem
import androidx.compose.material.Icon
@ -7,11 +9,19 @@ import androidx.compose.material.SnackbarDefaults.backgroundColor
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import androidx.navigation.compose.currentBackStackEntryAsState
import com.example.labwork.ui.theme.DarkBluePolitech
import com.example.labwork.ui.theme.LightBluePolitech
@Composable
fun SlideNavigation(
@ -19,11 +29,13 @@ fun SlideNavigation(
) {
val listItems = listOf(
SlideItem.ScreenInfo,
SlideItem.ScreenProfile
SlideItem.ScreenProfile,
SlideItem.ScreenListProduct
)
BottomNavigation(
backgroundColor = Color.White
backgroundColor = Color.White,
modifier = Modifier.padding(10.dp).shadow(2.dp)
) {
val backStackEntry by navController.currentBackStackEntryAsState()
val currentRout = backStackEntry?.destination?.route
@ -45,8 +57,8 @@ fun SlideNavigation(
fontSize = 9.sp
)
},
selectedContentColor = Color.Blue,
unselectedContentColor = Color.Gray
selectedContentColor = LightBluePolitech,
unselectedContentColor = DarkBluePolitech
)
}
}

View File

@ -8,4 +8,7 @@ val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val Pink40 = Color(0xFF7D5260)
val LightBluePolitech = Color(0xFF004890)
val DarkBluePolitech = Color(0xFF0D2D4F)

View File

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M7,9H2V7h5V9zM7,12H2v2h5V12zM20.59,19l-3.83,-3.83C15.96,15.69 15.02,16 14,16c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5s5,2.24 5,5c0,1.02 -0.31,1.96 -0.83,2.75L22,17.59L20.59,19zM17,11c0,-1.65 -1.35,-3 -3,-3s-3,1.35 -3,3s1.35,3 3,3S17,12.65 17,11zM2,19h10v-2H2V19z"/>
</vector>

View File

@ -1,10 +1,8 @@
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=C\:\\Users\\Maxim\\AppData\\Local\\Android\\Sdk
#Thu Oct 26 18:54:01 GMT+04:00 2023
sdk.dir=C\:\\android-sdk