mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 20:57:25 +01:00
Continue adding Card Layout 2.
This commit is contained in:
parent
8d53a5e273
commit
6c67fda7cf
@ -865,6 +865,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
} else {
|
||||
Post.Preview preview = getSuitablePreview(post.getPreviews());
|
||||
if (preview != null) {
|
||||
((PostCard2WithPreviewViewHolder) holder).imageView.setVisibility(View.VISIBLE);
|
||||
if (preview.getPreviewWidth() <= 0 || preview.getPreviewHeight() <= 0) {
|
||||
int height = (int) (400 * mScale);
|
||||
((PostCard2WithPreviewViewHolder) holder).imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
@ -1783,6 +1784,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
((PostTextTypeViewHolder) holder).contentTextView.setVisibility(View.GONE);
|
||||
} else if (holder instanceof PostCard2WithPreviewViewHolder) {
|
||||
mGlide.clear(((PostCard2WithPreviewViewHolder) holder).imageView);
|
||||
((PostCard2WithPreviewViewHolder) holder).imageView.setVisibility(View.GONE);
|
||||
((PostCard2WithPreviewViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE);
|
||||
((PostCard2WithPreviewViewHolder) holder).noPreviewImageView.setVisibility(View.GONE);
|
||||
((PostCard2WithPreviewViewHolder) holder).progressBar.setVisibility(View.GONE);
|
||||
|
Loading…
Reference in New Issue
Block a user