6
Chris Banes đã đề cập here rằng thư viện AppCompat hiện có API SearchView được cập nhật của Lollipop. Tôi đang làm theo hướng dẫn trực tiếp từ bài đăng trên blog, nhưng tôi không thấy bất kỳ hiệu ứng nào.Tạo kiểu cho tiện ích SearchView bằng thư viện hỗ trợ v21
Dưới đây là một đoạn trích từ tôi values/styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="searchViewStyle">@style/CustomSearchViewStyle</item>
</style>
<style name="CustomSearchViewStyle" parent="Widget.AppCompat.SearchView">
<item name="queryBackground">@color/orange</item>
<item name="searchIcon">@drawable/test</item>
</style>
Đánh dấu phần này là chính xác. –