Increased cover size and added rounded corners

This commit is contained in:
ByteHamster 2020-02-18 12:37:15 +01:00
parent 5d52013e35
commit e43d006a03
2 changed files with 10 additions and 10 deletions

View File

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

View File

@ -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">
<ImageView
android:id="@+id/imgvCover"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_gravity="center_vertical"
android:contentDescription="@string/cover_label"
android:foreground="?attr/selectableItemBackground"
tools:src="@drawable/ic_antenna"
tools:background="@android:color/holo_green_dark" />
tools:src="@tools:sample/avatars" />
<LinearLayout
android:layout_width="match_parent"
@ -57,7 +55,7 @@
android:textColor="?android:attr/textColorPrimary"
android:ellipsize="end"
android:maxLines="5"
tools:text="Episode title"
tools:text="@sample/episodes.json/data/title"
tools:background="@android:color/holo_green_dark" />
<LinearLayout
@ -69,7 +67,7 @@
style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="00:42:23"
tools:text="@sample/episodes.json/data/duration"
tools:background="@android:color/holo_green_dark" />
<TextView