NavigationDrawer rearrange
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
package `in`.sminnovations.attendanceapp
|
||||
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import `in`.sminnovations.attendanceapp.navigation.ui.NavigationDrawer
|
||||
import `in`.sminnovations.attendanceapp.screens.navigationDrawer.ui.NavigationDrawer
|
||||
import `in`.sminnovations.attendanceapp.ui.theme.SMIAttendanceTheme
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.navigation.ui.components
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
fun BottomComponents(){
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package `in`.sminnovations.attendanceapp.navigation.viewModel
|
||||
|
||||
class navigationViewModel {
|
||||
}
|
||||
@@ -1,2 +1,9 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.home.ui
|
||||
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
fun Home(){
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.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,4 +1,4 @@
|
||||
package `in`.sminnovations.attendanceapp.navigation.ui.components
|
||||
package `in`.sminnovations.attendanceapp.screens.navigationDrawer.ui.components
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@@ -25,7 +25,7 @@ import `in`.sminnovations.attendanceapp.R
|
||||
@Composable
|
||||
fun TopComponents() {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth().padding(16.dp),
|
||||
modifier = Modifier.fillMaxWidth().padding(8.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
// Image with rounded corners
|
||||
@@ -1,6 +1,7 @@
|
||||
package `in`.sminnovations.attendanceapp.navigation.ui
|
||||
package `in`.sminnovations.attendanceapp.screens.navigationDrawer.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
@@ -15,8 +16,9 @@ import androidx.compose.material3.rememberDrawerState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Modifier
|
||||
import `in`.sminnovations.attendanceapp.screens.navigationDrawer.ui.components.BottomComponents
|
||||
import kotlinx.coroutines.launch
|
||||
import `in`.sminnovations.attendanceapp.navigation.ui.components.TopComponents
|
||||
import `in`.sminnovations.attendanceapp.screens.navigationDrawer.ui.components.TopComponents
|
||||
|
||||
@Composable
|
||||
fun NavigationDrawer(){
|
||||
@@ -25,9 +27,14 @@ fun NavigationDrawer(){
|
||||
ModalNavigationDrawer(
|
||||
drawerState = drawerState,
|
||||
drawerContent = {
|
||||
ModalDrawerSheet { /* Drawer content */
|
||||
TopComponents()
|
||||
ModalDrawerSheet {
|
||||
Column (
|
||||
Modifier.fillMaxHeight(),
|
||||
|
||||
){
|
||||
TopComponents()
|
||||
BottomComponents(appVersion = "")
|
||||
}
|
||||
}
|
||||
},
|
||||
) {
|
||||
@@ -47,7 +54,7 @@ fun NavigationDrawer(){
|
||||
}
|
||||
) { contentPadding ->
|
||||
Column (modifier = Modifier.padding(contentPadding)){
|
||||
|
||||
`in`.sminnovations.attendanceapp.screens.home.ui.Home()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.navigationDrawer.viewModel
|
||||
|
||||
class navigationViewModel {
|
||||
}
|
||||
Reference in New Issue
Block a user