From 5d52013e3566051fa80704c7f014424adbb109de Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 18 Feb 2020 12:29:28 +0100 Subject: [PATCH 1/4] Converted to LinearLayout --- app/src/main/res/layout/feeditem_fragment.xml | 199 +++++++++--------- 1 file changed, 103 insertions(+), 96 deletions(-) diff --git a/app/src/main/res/layout/feeditem_fragment.xml b/app/src/main/res/layout/feeditem_fragment.xml index 47460a28f..ce019ee69 100644 --- a/app/src/main/res/layout/feeditem_fragment.xml +++ b/app/src/main/res/layout/feeditem_fragment.xml @@ -1,6 +1,5 @@ - - + android:layout_marginRight="16dp" + android:layout_marginBottom="8dp"> - + - + - + - + - + + + + + + + + + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:id="@+id/butAction1" + android:orientation="horizontal" + android:background="?android:attr/selectableItemBackground" + android:gravity="center"> + + android:layout_width="24dp" + android:layout_height="24dp" + android:id="@+id/butAction1Icon" + android:layout_margin="12dp" + tools:src="@drawable/ic_settings_grey600_24dp" /> + + android:textAppearance="@style/TextAppearance.AppCompat.Button" + android:id="@+id/butAction1Text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="?android:attr/textColorPrimary" + tools:text="Button 1" /> + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:id="@+id/butAction2" + android:orientation="horizontal" + android:background="?android:attr/selectableItemBackground" + android:gravity="center"> + + android:layout_width="24dp" + android:layout_height="24dp" + android:id="@+id/butAction2Icon" + android:layout_margin="12dp" + tools:src="@drawable/ic_settings_grey600_24dp" /> + + android:textAppearance="@style/TextAppearance.AppCompat.Button" + android:id="@+id/butAction2Text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="?android:attr/textColorPrimary" + tools:text="Button 2" /> + android:background="@color/light_gray" /> From e43d006a03335a3e62c98e2060d6dc09d24eabf4 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 18 Feb 2020 12:37:15 +0100 Subject: [PATCH 2/4] Increased cover size and added rounded corners --- .../danoeh/antennapod/fragment/ItemFragment.java | 6 ++++-- app/src/main/res/layout/feeditem_fragment.xml | 14 ++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 5caaa592f..e263d2b3e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -23,6 +23,8 @@ import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.fragment.app.Fragment; import com.bumptech.glide.Glide; +import com.bumptech.glide.load.resource.bitmap.FitCenter; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import com.google.android.material.snackbar.Snackbar; import de.danoeh.antennapod.R; @@ -256,10 +258,10 @@ public class ItemFragment extends Fragment { Glide.with(getActivity()) .load(ImageResourceUtils.getImageLocation(item)) .apply(new RequestOptions() - .placeholder(R.color.light_gray) .error(R.color.light_gray) .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) - .fitCenter() + .transforms(new FitCenter(), + new RoundedCorners((int) (4 * getResources().getDisplayMetrics().density))) .dontAnimate()) .into(imgvCover); diff --git a/app/src/main/res/layout/feeditem_fragment.xml b/app/src/main/res/layout/feeditem_fragment.xml index ce019ee69..35125175d 100644 --- a/app/src/main/res/layout/feeditem_fragment.xml +++ b/app/src/main/res/layout/feeditem_fragment.xml @@ -20,18 +20,16 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" - android:layout_marginBottom="8dp"> + android:layout_marginRight="16dp"> + tools:src="@tools:sample/avatars" /> Date: Tue, 18 Feb 2020 12:47:56 +0100 Subject: [PATCH 3/4] Made separator line thinner --- app/src/main/res/layout/feeditem_fragment.xml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/layout/feeditem_fragment.xml b/app/src/main/res/layout/feeditem_fragment.xml index 35125175d..c755bd122 100644 --- a/app/src/main/res/layout/feeditem_fragment.xml +++ b/app/src/main/res/layout/feeditem_fragment.xml @@ -13,14 +13,14 @@ android:background="?attr/colorPrimary" android:gravity="center_horizontal" android:orientation="vertical" + android:paddingLeft="16dp" + android:paddingRight="16dp" tools:background="@android:color/darker_gray"> + android:layout_marginTop="16dp"> + android:layout_height="1dp" + android:background="?android:attr/dividerVertical"/> From 5070c6cb03d4342220983be7f2c9a5723600d427 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 18 Feb 2020 13:01:32 +0100 Subject: [PATCH 4/4] Removed background difference --- app/src/main/res/layout/feeditem_fragment.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/feeditem_fragment.xml b/app/src/main/res/layout/feeditem_fragment.xml index c755bd122..beabd20b6 100644 --- a/app/src/main/res/layout/feeditem_fragment.xml +++ b/app/src/main/res/layout/feeditem_fragment.xml @@ -10,17 +10,16 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:background="?attr/colorPrimary" android:gravity="center_horizontal" android:orientation="vertical" android:paddingLeft="16dp" - android:paddingRight="16dp" - tools:background="@android:color/darker_gray"> + android:paddingRight="16dp"> + android:layout_marginTop="16dp" + android:orientation="horizontal">