Câu hỏi của tôi tương tự như "How to put a CardView attribute in a style", nhưng tôi cần phải đi sâu hơn.Cách thêm thuộc tính CardView vào chủ đề ứng dụng?
Tôi đang sử dụng theme AppCompat, và phong cách của tôi trông giống như
style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/toolbar_color</item>
<item name="android:listViewStyle">@style/CustomListView</item>
</style>
và tôi có thể tạo phong cách riêng cho CardView
<style name="CustomCardView" parent="CardView">
<item name="cardBackgroundColor">@color/card_background</item>
<item name="cardCornerRadius">@dimen/card_corner</item>
</style>
Tôi có thể gắn nó vào phong cách chính?
Vui lòng kiểm tra [câu trả lời này] (http://stackoverflow.com/a/36005912/2826147). –