Skip to content

Commit 21359ec

Browse files
committed
Remove navigation drawer composable
1 parent 023f071 commit 21359ec

File tree

1 file changed

+0
-70
lines changed
  • AdaptiveUiCodelab/app/src/main/java/com/example/reply/ui

1 file changed

+0
-70
lines changed

AdaptiveUiCodelab/app/src/main/java/com/example/reply/ui/ReplyApp.kt

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,18 @@
1616

1717
package com.example.reply.ui
1818

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
2419
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
3020
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
3521
import androidx.compose.material3.Text
3622
import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffold
3723
import androidx.compose.runtime.Composable
3824
import androidx.compose.runtime.getValue
3925
import androidx.compose.runtime.mutableStateOf
4026
import androidx.compose.runtime.remember
4127
import androidx.compose.runtime.setValue
42-
import androidx.compose.ui.Alignment
4328
import androidx.compose.ui.Modifier
44-
import androidx.compose.ui.graphics.Color
4529
import androidx.compose.ui.res.stringResource
46-
import androidx.compose.ui.unit.dp
4730
import androidx.window.core.layout.WindowWidthSizeClass
48-
import com.example.reply.R
4931
import com.example.reply.ui.utils.DevicePosture
5032
import com.example.reply.ui.utils.ReplyContentType
5133

@@ -128,55 +110,3 @@ fun ReplyAppContent(
128110
)
129111
}
130112
}
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

Comments
 (0)