From d0041a87ba17d55d160e9f7e6c30cdae9235cca4 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 4 Aug 2018 04:01:06 +0200 Subject: [PATCH] Fix cardview margins for 19-23 SDK --- .../moodl/DataManagers/CurrencyData/CurrencyCardview.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/herbron/moodl/DataManagers/CurrencyData/CurrencyCardview.java b/app/src/main/java/com/herbron/moodl/DataManagers/CurrencyData/CurrencyCardview.java index 917b25d..1c44eeb 100644 --- a/app/src/main/java/com/herbron/moodl/DataManagers/CurrencyData/CurrencyCardview.java +++ b/app/src/main/java/com/herbron/moodl/DataManagers/CurrencyData/CurrencyCardview.java @@ -16,6 +16,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; @@ -181,7 +182,7 @@ public class CurrencyCardview extends CardView implements CurrencyInfoUpdateNoti private void setupCardView() { - ViewGroup.MarginLayoutParams layoutParams = new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT); + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.MarginLayoutParams.MATCH_PARENT, LinearLayout.MarginLayoutParams.WRAP_CONTENT); int margin = (int) MoodlBox.convertDpToPx(10, getResources()); layoutParams.setMargins(margin, margin, margin, 0);