removed side Navigation
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.data.dataStore
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.home.navigationDrawer.ui.components
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
@Composable
|
||||
fun BottomComponents(appVersion : String){
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth().padding(8.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text(
|
||||
text = "App Version",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 20.sp,
|
||||
color = MaterialTheme.colorScheme.onSurface
|
||||
)
|
||||
Text(
|
||||
text = appVersion,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 20.sp,
|
||||
color = MaterialTheme.colorScheme.onSurface
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.home.navigationDrawer.ui
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.DrawerValue
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.ModalDrawerSheet
|
||||
import androidx.compose.material3.ModalNavigationDrawer
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.rememberDrawerState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import `in`.sminnovations.attendanceapp.R
|
||||
import `in`.sminnovations.attendanceapp.screens.home.ui.Home
|
||||
import `in`.sminnovations.attendanceapp.screens.home.navigationDrawer.ui.components.BottomComponents
|
||||
import `in`.sminnovations.attendanceapp.screens.home.navigationDrawer.ui.components.TopComponents
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
fun NavigationDrawer() {
|
||||
|
||||
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
fun openClose() {
|
||||
scope.launch {
|
||||
drawerState.apply {
|
||||
if (isClosed) open() else close()
|
||||
}
|
||||
}
|
||||
}
|
||||
ModalNavigationDrawer(
|
||||
drawerState = drawerState,
|
||||
drawerContent = {
|
||||
ModalDrawerSheet {
|
||||
Column(modifier = Modifier.clickable { openClose() }) {
|
||||
TopComponents(onclose = {
|
||||
scope.launch {
|
||||
openClose()
|
||||
}
|
||||
})
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
BottomComponents(appVersion = "1.0")
|
||||
}
|
||||
}
|
||||
},
|
||||
) {
|
||||
Scaffold(topBar = {
|
||||
Row {
|
||||
IconButton(
|
||||
onClick = { openClose() }, modifier = Modifier.padding(20.dp)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.baseline_menu_24),
|
||||
contentDescription = "menu"
|
||||
)
|
||||
}
|
||||
}
|
||||
}) { contentPadding ->
|
||||
Column(modifier = Modifier.padding(contentPadding)) {
|
||||
Home()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.home.navigationDrawer.viewModel
|
||||
|
||||
class navigationViewModel {
|
||||
}
|
||||
Reference in New Issue
Block a user