diff options
author | ByteHamster <info@bytehamster.com> | 2022-08-07 19:52:58 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-09-18 19:12:41 +0200 |
commit | 2740816bb85041d4d67fe242bcf0dddb5ad06116 (patch) | |
tree | 41e37c3461cf46adf64cdd835dceeff521c90c65 | |
parent | a524b810603a78afc6503d01e6aeb788ea14401a (diff) | |
download | AntennaPod-2740816bb85041d4d67fe242bcf0dddb5ad06116.zip |
Round all the things
5 files changed, 25 insertions, 20 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedDiscoverAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedDiscoverAdapter.java index 3628b4bee..5e2c091e9 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedDiscoverAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedDiscoverAdapter.java @@ -5,6 +5,8 @@ import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; 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 de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; @@ -65,7 +67,8 @@ public class FeedDiscoverAdapter extends BaseAdapter { .load(podcast.imageUrl) .apply(new RequestOptions() .placeholder(R.color.light_gray) - .fitCenter() + .transform(new FitCenter(), new RoundedCorners((int) + (8 * mainActivityRef.get().getResources().getDisplayMetrics().density))) .dontAnimate()) .into(holder.imageView); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index 286da1e20..29f9d3e44 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -16,6 +16,8 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; +import com.bumptech.glide.load.resource.bitmap.FitCenter; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; @@ -325,7 +327,8 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> .placeholder(R.color.light_gray) .error(R.color.light_gray) .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) - .fitCenter() + .transform(new FitCenter(), + new RoundedCorners((int) (4 * context.getResources().getDisplayMetrics().density))) .dontAnimate()) .into(holder.image); 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 375356c2c..a6f1a96f7 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -296,7 +296,7 @@ public class ItemFragment extends Fragment { .error(R.color.light_gray) .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) .transform(new FitCenter(), - new RoundedCorners((int) (4 * getResources().getDisplayMetrics().density))) + new RoundedCorners((int) (8 * getResources().getDisplayMetrics().density))) .dontAnimate(); Glide.with(getActivity()) diff --git a/app/src/main/res/layout/addfeed.xml b/app/src/main/res/layout/addfeed.xml index 30c1a463d..0b6ede087 100644 --- a/app/src/main/res/layout/addfeed.xml +++ b/app/src/main/res/layout/addfeed.xml @@ -21,7 +21,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" - app:cardCornerRadius="4dp" + app:cardCornerRadius="8dp" app:cardElevation="4dp"> <LinearLayout diff --git a/app/src/main/res/layout/quick_feed_discovery_item.xml b/app/src/main/res/layout/quick_feed_discovery_item.xml index c3a32f019..4407eb2f5 100644 --- a/app/src/main/res/layout/quick_feed_discovery_item.xml +++ b/app/src/main/res/layout/quick_feed_discovery_item.xml @@ -1,22 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:squareImageView="http://schemas.android.com/apk/de.danoeh.antennapod" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="4dp" - android:clipToPadding="false"> + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:squareImageView="http://schemas.android.com/apk/de.danoeh.antennapod" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="4dp" + android:clipToPadding="false"> <de.danoeh.antennapod.ui.common.SquareImageView - android:id="@+id/discovery_cover" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:elevation="4dp" - android:outlineProvider="bounds" - android:foreground="?android:attr/selectableItemBackground" - squareImageView:direction="width" - tools:src="@android:drawable/sym_def_app_icon"/> + android:id="@+id/discovery_cover" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:elevation="4dp" + android:outlineProvider="background" + android:foreground="?android:attr/selectableItemBackground" + squareImageView:direction="width" + tools:src="@tools:sample/avatars" /> </LinearLayout> - |