Skip to content

Commit

Permalink
Force Card: Also use MaterialCardView
Browse files Browse the repository at this point in the history
Signed-off-by: sunilpaulmathew <sunil.kde@gmail.com>
  • Loading branch information
sunilpaulmathew committed Dec 2, 2020
1 parent d303bc3 commit 3223263
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.google.android.material.card.MaterialCardView;
import com.smartpack.kernelmanager.R;
import com.smartpack.kernelmanager.utils.Prefs;

Expand Down Expand Up @@ -90,7 +91,7 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int
}
if (item.cardCompatible()
&& Prefs.getBoolean("forcecards", false, view.getContext())) {
androidx.cardview.widget.CardView cardView = new androidx.cardview.widget.CardView(view.getContext());
MaterialCardView cardView = new MaterialCardView(view.getContext());
cardView.setRadius(view.getResources().getDimension(R.dimen.cardview_radius));
cardView.setCardElevation(view.getResources().getDimension(R.dimen.cardview_elevation));
cardView.setUseCompatPadding(true);
Expand Down

0 comments on commit 3223263

Please sign in to comment.