Merge pull request #6086 from ByteHamster/fix-loading-views
Fix loading views inconsistently showing cover
This commit is contained in:
commit
8426e32fe8
|
@ -70,7 +70,10 @@ public class EpisodeItemListAdapter extends SelectableAdapter<EpisodeItemViewHol
|
|||
@Override
|
||||
public final void onBindViewHolder(EpisodeItemViewHolder holder, int pos) {
|
||||
if (pos >= episodes.size()) {
|
||||
beforeBindViewHolder(holder, pos);
|
||||
holder.bindDummy();
|
||||
afterBindViewHolder(holder, pos);
|
||||
holder.hideSeparatorIfNecessary();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -199,6 +199,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
|
|||
}
|
||||
|
||||
public void bindDummy() {
|
||||
item = new FeedItem();
|
||||
container.setAlpha(0.1f);
|
||||
secondaryActionIcon.setImageDrawable(null);
|
||||
isInbox.setVisibility(View.VISIBLE);
|
||||
|
@ -215,12 +216,13 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
|
|||
size.setText("");
|
||||
itemView.setBackgroundResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.selectableItemBackground));
|
||||
placeholder.setText("");
|
||||
new CoverLoader(activity)
|
||||
.withResource(ThemeUtils.getDrawableFromAttr(activity, android.R.attr.textColorSecondary))
|
||||
.withPlaceholderView(placeholder)
|
||||
.withCoverView(cover)
|
||||
.load();
|
||||
hideSeparatorIfNecessary();
|
||||
if (coverHolder.getVisibility() == View.VISIBLE) {
|
||||
new CoverLoader(activity)
|
||||
.withResource(ThemeUtils.getDrawableFromAttr(activity, android.R.attr.textColorSecondary))
|
||||
.withPlaceholderView(placeholder)
|
||||
.withCoverView(cover)
|
||||
.load();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDuration(PlaybackPositionEvent event) {
|
||||
|
|
Loading…
Reference in New Issue