|
16 | 16 |
|
17 | 17 | package com.example.reply.ui |
18 | 18 |
|
19 | | -import androidx.compose.foundation.background |
20 | | -import androidx.compose.foundation.layout.Arrangement |
21 | | -import androidx.compose.foundation.layout.Column |
22 | | -import androidx.compose.foundation.layout.Row |
23 | | -import androidx.compose.foundation.layout.fillMaxHeight |
24 | 19 | import androidx.compose.foundation.layout.fillMaxSize |
25 | | -import androidx.compose.foundation.layout.fillMaxWidth |
26 | | -import androidx.compose.foundation.layout.padding |
27 | | -import androidx.compose.foundation.layout.wrapContentWidth |
28 | | -import androidx.compose.material.icons.Icons |
29 | | -import androidx.compose.material.icons.filled.MenuOpen |
30 | 20 | import androidx.compose.material3.Icon |
31 | | -import androidx.compose.material3.IconButton |
32 | | -import androidx.compose.material3.MaterialTheme |
33 | | -import androidx.compose.material3.NavigationDrawerItem |
34 | | -import androidx.compose.material3.NavigationDrawerItemDefaults |
35 | 21 | import androidx.compose.material3.Text |
36 | 22 | import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffold |
37 | 23 | import androidx.compose.runtime.Composable |
38 | 24 | import androidx.compose.runtime.getValue |
39 | 25 | import androidx.compose.runtime.mutableStateOf |
40 | 26 | import androidx.compose.runtime.remember |
41 | 27 | import androidx.compose.runtime.setValue |
42 | | -import androidx.compose.ui.Alignment |
43 | 28 | import androidx.compose.ui.Modifier |
44 | | -import androidx.compose.ui.graphics.Color |
45 | 29 | import androidx.compose.ui.res.stringResource |
46 | | -import androidx.compose.ui.unit.dp |
47 | 30 | import androidx.window.core.layout.WindowWidthSizeClass |
48 | | -import com.example.reply.R |
49 | 31 | import com.example.reply.ui.utils.DevicePosture |
50 | 32 | import com.example.reply.ui.utils.ReplyContentType |
51 | 33 |
|
@@ -128,55 +110,3 @@ fun ReplyAppContent( |
128 | 110 | ) |
129 | 111 | } |
130 | 112 | } |
131 | | - |
132 | | -@Composable |
133 | | -fun NavigationDrawerContent( |
134 | | - selectedDestination: ReplyDestination, |
135 | | - modifier: Modifier = Modifier, |
136 | | - onDrawerClicked: () -> Unit = {} |
137 | | -) { |
138 | | - Column( |
139 | | - modifier |
140 | | - .wrapContentWidth() |
141 | | - .fillMaxHeight() |
142 | | - .background(MaterialTheme.colorScheme.inverseOnSurface) |
143 | | - .padding(24.dp) |
144 | | - ) { |
145 | | - Row( |
146 | | - modifier = modifier |
147 | | - .fillMaxWidth() |
148 | | - .padding(16.dp), |
149 | | - horizontalArrangement = Arrangement.SpaceBetween, |
150 | | - verticalAlignment = Alignment.CenterVertically |
151 | | - ) { |
152 | | - Text( |
153 | | - text = stringResource(id = R.string.app_name).uppercase(), |
154 | | - style = MaterialTheme.typography.titleMedium, |
155 | | - color = MaterialTheme.colorScheme.primary |
156 | | - ) |
157 | | - IconButton(onClick = onDrawerClicked) { |
158 | | - Icon( |
159 | | - imageVector = Icons.Default.MenuOpen, |
160 | | - contentDescription = stringResource(id = R.string.navigation_drawer) |
161 | | - ) |
162 | | - } |
163 | | - } |
164 | | - |
165 | | - ReplyDestination.entries.forEach { |
166 | | - NavigationDrawerItem( |
167 | | - selected = selectedDestination == it, |
168 | | - label = { |
169 | | - Text( |
170 | | - text = stringResource(it.labelRes), |
171 | | - modifier = Modifier.padding(horizontal = 16.dp) |
172 | | - ) |
173 | | - }, |
174 | | - icon = { Icon(it.icon, stringResource(it.labelRes)) }, |
175 | | - colors = NavigationDrawerItemDefaults.colors( |
176 | | - unselectedContainerColor = Color.Transparent |
177 | | - ), |
178 | | - onClick = { /*TODO*/ }, |
179 | | - ) |
180 | | - } |
181 | | - } |
182 | | -} |
0 commit comments