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+
117package com.example.compose.snippets.components
218
319import androidx.compose.foundation.clickable
@@ -15,6 +31,7 @@ import androidx.compose.material.icons.Icons
1531import androidx.compose.material.icons.filled.MoreVert
1632import androidx.compose.material.icons.filled.Search
1733import androidx.compose.material.icons.filled.Star
34+ import androidx.compose.material3.Button
1835import androidx.compose.material3.ExperimentalMaterial3Api
1936import androidx.compose.material3.Icon
2037import androidx.compose.material3.ListItem
@@ -37,8 +54,6 @@ import androidx.compose.ui.semantics.semantics
3754import androidx.compose.ui.semantics.traversalIndex
3855import androidx.compose.ui.tooling.preview.Preview
3956import 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