Rounded covers

This commit is contained in:
ByteHamster 2020-02-05 17:14:37 +01:00
parent 164581c598
commit ec21642a8c
2 changed files with 29 additions and 20 deletions

View File

@ -12,6 +12,7 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import com.joanzapata.iconify.Iconify;
import de.danoeh.antennapod.R;
@ -56,7 +57,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder
public final ImageView secondaryActionIcon;
private final CircularProgressBar secondaryActionProgress;
private final TextView separatorIcons;
public final RelativeLayout coverHolder;
public final CardView coverHolder;
private final MainActivity activity;
private FeedItem item;

View File

@ -22,37 +22,45 @@
android:scaleType="center"
android:src="?attr/dragview_background"
tools:src="@drawable/ic_drag_vertical_grey600_48dp"
tools:background="@android:color/holo_green_dark" />
tools:background="@android:color/holo_green_dark"/>
</LinearLayout>
<RelativeLayout
<androidx.cardview.widget.CardView
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
android:layout_marginRight="@dimen/listitem_threeline_textleftpadding"
android:layout_marginEnd="@dimen/listitem_threeline_textleftpadding"
android:id="@+id/coverHolder">
android:id="@+id/coverHolder"
app:cardCornerRadius="4dp"
app:cardElevation="0dp">
<TextView
android:id="@+id/txtvPlaceholder"
<RelativeLayout
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_centerVertical="true"
android:gravity="center"
android:background="@color/light_gray"
android:maxLines="2"
android:ellipsize="end"/>
<ImageView
android:id="@+id/imgvCover"
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_centerVertical="true"
android:contentDescription="@string/cover_label"
tools:src="@tools:sample/avatars" />
android:layout_height="@dimen/thumbnail_length_queue_item">
</RelativeLayout>
<TextView
android:id="@+id/txtvPlaceholder"
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_centerVertical="true"
android:gravity="center"
android:background="@color/light_gray"
android:maxLines="3"
android:padding="2dp"
android:ellipsize="end"/>
<ImageView
android:id="@+id/imgvCover"
android:layout_width="@dimen/thumbnail_length_queue_item"
android:layout_height="@dimen/thumbnail_length_queue_item"
android:layout_centerVertical="true"
android:contentDescription="@string/cover_label"
tools:src="@tools:sample/avatars"/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="0dp"