Bóng của CardView đã biến mất trên các thiết bị Lollipop sau khi áp dụng Proguard. Tôi đã không định nghĩa bất kỳ quy tắc nào để bảo vệ thư viện này, bởi vì tôi chưa đọc nó là cần thiết.Bóng CardView không xuất hiện trong Lollipop sau khi làm xáo trộn với proguard
Tôi đính kèm một vài ảnh chụp màn hình, trước tiên mà không cần chạy chương trình bảo vệ và sau khi chạy nó.
Và đây là xml tôi
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<android.support.v7.widget.CardView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="4dp"
app:contentPadding="10dp"
app:cardUseCompatPadding="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text 1"/>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="4dp"
app:contentPadding="10dp"
app:cardUseCompatPadding="false">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text 2"/>
</android.support.v7.widget.CardView>
</LinearLayout>
Hoạt động chỉ đặt xml như nội dung và không có gì hơn. Như bạn có thể thấy, tôi đang sử dụng hai khả năng của cardUseCompatPadding
, nhưng nó không giải quyết được sự cố vì nó được xác định trong this thread.
Có ai biết tại sao proguard phá vỡ bóng của tôi không?
Nếu bạn tìm thấy giải pháp của riêng mình, bạn có thể đăng câu trả lời cho câu hỏi của riêng bạn. – Aracthor
Cảm ơn, tôi sẽ sao chép nó xuống đây – Ignasi