mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-01-06 22:10:32 -06:00
animated previews 2
This commit is contained in:
@@ -88,7 +88,7 @@ public class CardPresenter extends Presenter {
|
||||
cardView.setTitleText(video.title);
|
||||
cardView.setContentText(video.description);
|
||||
cardView.setBadgeText(video.badge);
|
||||
cardView.setPreviewUrl(video.previewUrl);
|
||||
//cardView.setPreviewUrl(video.previewUrl);
|
||||
|
||||
if (video.cardImageUrl != null) {
|
||||
// Set card size from dimension resources.
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TextBadgeImageView extends RelativeLayout {
|
||||
}
|
||||
|
||||
mPreviewImage.setVisibility(View.VISIBLE);
|
||||
mMainImage.setVisibility(View.GONE);
|
||||
mMainImage.setVisibility(View.INVISIBLE);
|
||||
|
||||
Glide.with(getContext())
|
||||
.load(mPreviewUrl)
|
||||
@@ -110,7 +110,7 @@ public class TextBadgeImageView extends RelativeLayout {
|
||||
return;
|
||||
}
|
||||
|
||||
mPreviewImage.setVisibility(View.GONE);
|
||||
mPreviewImage.setVisibility(View.INVISIBLE);
|
||||
mPreviewImage.setImageDrawable(null);
|
||||
mMainImage.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
android:id="@+id/main_image"
|
||||
style="?attr/imageCardViewImageStyle"/>
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/preview_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_alignTop="@+id/main_image"
|
||||
android:layout_alignStart="@+id/main_image"
|
||||
|
||||
Reference in New Issue
Block a user