Skip to content

Commit f1ad34c

Browse files
jakerosemangithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent e4e4dec commit f1ad34c

File tree

1 file changed

+18
-23
lines changed
  • compose/snippets/src/main/java/com/example/compose/snippets/components

1 file changed

+18
-23
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/components/Menu.kt

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,56 @@
1+
/*
2+
* Copyright 2024 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.compose.snippets.components
218

3-
import android.util.Log
4-
import androidx.compose.foundation.clickable
5-
import androidx.compose.foundation.interaction.MutableInteractionSource
6-
import androidx.compose.foundation.layout.Arrangement
719
import androidx.compose.foundation.layout.Box
820
import androidx.compose.foundation.layout.Column
9-
import androidx.compose.foundation.layout.Row
1021
import androidx.compose.foundation.layout.fillMaxSize
1122
import androidx.compose.foundation.layout.fillMaxWidth
12-
import androidx.compose.foundation.layout.height
1323
import androidx.compose.foundation.layout.padding
14-
import androidx.compose.foundation.layout.width
15-
import androidx.compose.foundation.layout.wrapContentSize
16-
import androidx.compose.foundation.text.KeyboardOptions
1724
import androidx.compose.material.icons.Icons
1825
import androidx.compose.material.icons.filled.ArrowDropDown
1926
import androidx.compose.material.icons.filled.MoreVert
20-
import androidx.compose.material.icons.filled.Phone
2127
import androidx.compose.material3.Button
2228
import androidx.compose.material3.DropdownMenu
2329
import androidx.compose.material3.DropdownMenuItem
2430
import androidx.compose.material3.ExperimentalMaterial3Api
25-
import androidx.compose.material3.ExposedDropdownMenuBox
26-
import androidx.compose.material3.ExposedDropdownMenuDefaults
2731
import androidx.compose.material3.FloatingActionButton
28-
import androidx.compose.material3.HorizontalDivider
2932
import androidx.compose.material3.Icon
3033
import androidx.compose.material3.IconButton
31-
import androidx.compose.material3.MenuAnchorType
32-
import androidx.compose.material3.OutlinedTextField
3334
import androidx.compose.material3.Text
3435
import androidx.compose.material3.TextField
3536
import androidx.compose.material3.TopAppBar
36-
import androidx.compose.material3.VerticalDivider
3737
import androidx.compose.runtime.Composable
38-
import androidx.compose.runtime.LaunchedEffect
3938
import androidx.compose.runtime.getValue
4039
import androidx.compose.runtime.mutableStateOf
4140
import androidx.compose.runtime.remember
4241
import androidx.compose.runtime.setValue
4342
import androidx.compose.ui.Alignment
4443
import androidx.compose.ui.Modifier
45-
import androidx.compose.ui.text.font.FontWeight
46-
import androidx.compose.ui.text.input.KeyboardType
47-
import androidx.compose.ui.text.style.TextAlign
4844
import androidx.compose.ui.tooling.preview.Preview
4945
import androidx.compose.ui.unit.dp
50-
import androidx.compose.ui.unit.sp
5146

5247
@Composable
5348
fun MenusExamples() {
5449
var currentExample by remember { mutableStateOf<(@Composable () -> Unit)?>(null) }
5550

5651
// Display the current example and the button to close it.
5752
Box(modifier = Modifier.fillMaxSize()) {
58-
currentExample?.let{
53+
currentExample?.let {
5954
it()
6055
FloatingActionButton(
6156
onClick = { currentExample = null },
@@ -114,7 +109,7 @@ fun TextFieldDropdownMenu() {
114109
var selectedText by remember { mutableStateOf("") }
115110
val options = listOf("Option 1", "Option 2", "Option 3")
116111

117-
Box (modifier = Modifier.fillMaxWidth()) {
112+
Box(modifier = Modifier.fillMaxWidth()) {
118113
TextField(
119114
value = selectedText,
120115
onValueChange = { selectedText = it },

0 commit comments

Comments
 (0)