Накидал главный экран с полями

This commit is contained in:
2025-12-19 16:37:46 +03:00
parent 4cb7b2d6d1
commit 98327bb9f4
14 changed files with 2207 additions and 175 deletions
@@ -28,39 +28,14 @@ class MainActivity : ComponentActivity() {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
// Нижняя панель не показывается на экранах входа, регистрации и восстановления пароля
val showBottomBar = currentRoute != null &&
currentRoute != "login" &&
currentRoute != "registration" &&
currentRoute != "forgot_password"
// Нижняя панель скрыта везде (используется левая панель навигации)
Scaffold(
modifier = Modifier.fillMaxSize(),
bottomBar = {
if (showBottomBar) {
BottomNavigationBar(
currentRoute = currentRoute,
onNavigate = { route ->
navController.navigate(route) {
popUpTo(navController.graph.startDestinationId) {
saveState = true
}
launchSingleTop = true
restoreState = true
}
}
)
}
}
modifier = Modifier.fillMaxSize()
) { innerPadding ->
NewPlanetNavigation(
navController = navController,
modifier = Modifier
.fillMaxSize()
.padding(
// Убираем нижний отступ на экране входа
bottom = if (showBottomBar) innerPadding.calculateBottomPadding() else 0.dp
)
)
}
}