Что-то получается...
This commit is contained in:
parent
8d7f7cccab
commit
c25ac4a9a9
@ -7,11 +7,11 @@
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\dxren\.android\avd\Pixel_3a_API_34_extension_level_7_x86_64.avd" />
|
||||
<value value="C:\Users\Danya\.android\avd\Pixel_2_API_34_2.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-10-08T11:14:30.167187700Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2023-10-09T12:44:34.176701300Z" />
|
||||
</component>
|
||||
</project>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17_PREVIEW" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -17,16 +17,10 @@ class MainActivity : ComponentActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContent {
|
||||
ShawarmaTheme {
|
||||
// A surface container using the 'background' color from the theme
|
||||
Surface(
|
||||
color = MyLightYellow,
|
||||
modifier = Modifier.fillMaxSize()
|
||||
)
|
||||
{
|
||||
|
||||
MainNavBar()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,35 @@
|
||||
package com.example.shawarma.screens
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.Scaffold
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.example.shawarma.screens.authorization.AuthorizationScreen
|
||||
import com.example.shawarma.screens.registration.RegistrationScreen
|
||||
import com.example.shawarma.ui.theme.MyLightYellow
|
||||
import com.example.shawarma.utils.ScreenPaths
|
||||
|
||||
@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
|
||||
@Composable
|
||||
fun MainNavBar() {
|
||||
val navController = rememberNavController()
|
||||
|
||||
NavHost(navController = navController, startDestination = ScreenPaths.authorization.name) {
|
||||
composable(ScreenPaths.authorization.name) {
|
||||
AuthorizationScreen(navController)
|
||||
}
|
||||
composable(ScreenPaths.registration.name) {
|
||||
RegistrationScreen(navController)
|
||||
Scaffold(
|
||||
backgroundColor = MyLightYellow,
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {scaffoldPadding ->
|
||||
NavHost(navController = navController, startDestination = ScreenPaths.authorization.name) {
|
||||
composable(ScreenPaths.authorization.name) {
|
||||
AuthorizationScreen(navController)
|
||||
}
|
||||
composable(ScreenPaths.registration.name) {
|
||||
RegistrationScreen(navController)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.example.shawarma.screens.authorization
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
@ -33,8 +34,10 @@ import com.example.shawarma.widgets.ShawarmaLogo1
|
||||
|
||||
@Composable
|
||||
fun AuthorizationScreen(navHostController: NavHostController) {
|
||||
ShawarmaLogo1()
|
||||
AuthorizationCard(navHostController)
|
||||
Box(contentAlignment = Alignment.TopCenter){
|
||||
ShawarmaLogo1()
|
||||
AuthorizationCard(navHostController)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@ -47,12 +50,15 @@ fun AuthorizationCard(navHostController: NavHostController) {
|
||||
modifier = Modifier
|
||||
.zIndex(2f)
|
||||
.verticalScroll(rememberScrollState())
|
||||
.imePadding().padding(10.dp)
|
||||
.imePadding()
|
||||
.padding(10.dp)
|
||||
.fillMaxHeight()
|
||||
) {
|
||||
Card(
|
||||
shape = RoundedCornerShape(20.dp),
|
||||
modifier = Modifier.size(275.dp, 290.dp + 72.dp).padding(top = 72.dp)
|
||||
modifier = Modifier
|
||||
.size(275.dp, 290.dp + 72.dp)
|
||||
.padding(top = 72.dp)
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
|
@ -3,6 +3,7 @@ package com.example.shawarma.screens.registration
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.gestures.FlingBehavior
|
||||
import androidx.compose.foundation.gestures.ScrollScope
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
@ -28,6 +29,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.compose.ui.zIndex
|
||||
import androidx.navigation.NavHostController
|
||||
import com.example.shawarma.screens.authorization.AuthorizationCard
|
||||
import com.example.shawarma.ui.theme.JejuFamily
|
||||
import com.example.shawarma.ui.theme.MyLightRed
|
||||
import com.example.shawarma.utils.ScreenPaths
|
||||
@ -36,9 +38,10 @@ import com.example.shawarma.widgets.ShawarmaLogo1
|
||||
|
||||
@Composable
|
||||
fun RegistrationScreen(navHostController: NavHostController) {
|
||||
RegistrationCard(navHostController)
|
||||
ShawarmaLogo1()
|
||||
|
||||
Box(contentAlignment = Alignment.TopCenter){
|
||||
ShawarmaLogo1()
|
||||
RegistrationCard(navHostController)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
@ -23,5 +23,4 @@ kotlin.code.style=official
|
||||
android.nonTransitiveRClass=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonFinalResIds=false
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
android.suppressUnsupportedCompileSdk=34
|
Loading…
Reference in New Issue
Block a user