Skip to content

Commit 4d7e4ab

Browse files
jakerosemangithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent 87326be commit 4d7e4ab

File tree

1 file changed

+19
-5
lines changed
  • compose/snippets/src/main/java/com/example/compose/snippets/components

1 file changed

+19
-5
lines changed

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

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
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

319
import androidx.compose.foundation.clickable
@@ -15,6 +31,7 @@ import androidx.compose.material.icons.Icons
1531
import androidx.compose.material.icons.filled.MoreVert
1632
import androidx.compose.material.icons.filled.Search
1733
import androidx.compose.material.icons.filled.Star
34+
import androidx.compose.material3.Button
1835
import androidx.compose.material3.ExperimentalMaterial3Api
1936
import androidx.compose.material3.Icon
2037
import androidx.compose.material3.ListItem
@@ -37,8 +54,6 @@ import androidx.compose.ui.semantics.semantics
3754
import androidx.compose.ui.semantics.traversalIndex
3855
import androidx.compose.ui.tooling.preview.Preview
3956
import androidx.compose.ui.unit.dp
40-
import androidx.compose.foundation.rememberScrollState
41-
import androidx.compose.material3.Button
4257

4358
@Preview
4459
@Composable
@@ -56,10 +71,10 @@ fun SearchBarExamples() {
5671
"basic" -> SearchBarBasicFilterList()
5772
"advanced" -> AppSearchBar()
5873
else -> {
59-
Button(onClick = { currentExample = "basic" }){
74+
Button(onClick = { currentExample = "basic" }) {
6075
Text("Basic search bar with filter")
6176
}
62-
Button(onClick = { currentExample = "advanced" }){
77+
Button(onClick = { currentExample = "advanced" }) {
6378
Text("Advanced search bar with filter")
6479
}
6580
}
@@ -227,4 +242,3 @@ fun AppSearchBar(modifier: Modifier = Modifier) {
227242
modifier
228243
)
229244
}
230-

0 commit comments

Comments
 (0)