小编Mik*_*ike的帖子

如何在 Android 5.0+ 上设置 SearchView 的样式?

我正在为 Android 5.0+ 创建应用程序,所以我正在使用 API 21+。

使用 android.support.v7.widget.SearchView 与 SearchView 有什么好处?

我可以使用 SearchView 还是必须使用 android.support.v7.widget.SearchView?

如何以这种方式设置 SearchView 的样式。我还需要在其他活动中重用这种风格。

在此处输入图片说明

我目前的风格:

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimaryDark">@color/color_primary</item>
    <item name="colorAccent">@color/color_accent</item>
    <item name="android:textColor">@color/white</item>
</style>
Run Code Online (Sandbox Code Playgroud)

android styles styling searchview material-design

1
推荐指数
1
解决办法
1921
查看次数

标签 统计

android ×1

material-design ×1

searchview ×1

styles ×1

styling ×1