Round all the things

This commit is contained in:
ByteHamster 2022-08-07 19:52:58 +02:00
parent a524b81060
commit 2740816bb8
5 changed files with 25 additions and 20 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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())

View File

@ -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

View File

@ -13,10 +13,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="4dp"
android:outlineProvider="bounds"
android:outlineProvider="background"
android:foreground="?android:attr/selectableItemBackground"
squareImageView:direction="width"
tools:src="@android:drawable/sym_def_app_icon"/>
tools:src="@tools:sample/avatars" />
</LinearLayout>