Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CeuiLiSA committed Mar 5, 2021
1 parent 8684245 commit 233ca2e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
8 changes: 0 additions & 8 deletions app/src/main/java/ceui/lisa/adapters/IllustAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
public class IllustAdapter extends AbstractIllustAdapter<ViewHolder<RecyIllustDetailBinding>> {

private int maxHeight;
private FeedBack mFeedBack;

public IllustAdapter(Context context, IllustsBean illustsBean, int maxHeight) {
this(context, illustsBean, maxHeight, false);
Expand Down Expand Up @@ -164,16 +163,9 @@ public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> tar
if (isForceOriginal) {
Shaft.getMMKV().encode(imageUrl, true);
}
if (allIllust.getPage_count() != 1 && mFeedBack != null) {
mFeedBack.doSomething();
}
return false;
}
})
.into(new UniformScaleTransformation(holder.baseBind.illust, changeSize));
}

public void setFeedBack(FeedBack feedBack) {
mFeedBack = feedBack;
}
}
24 changes: 0 additions & 24 deletions app/src/main/java/ceui/lisa/fragments/FragmentIllust.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,30 +254,6 @@ public void onSlide(@NonNull View bottomSheet, float slideOffset) {

recyHeight = baseBind.recyclerView.getHeight();
IllustAdapter adapter = new IllustAdapter(mContext, illust, recyHeight);
//设置图片加载成功的回调
adapter.setFeedBack(new FeedBack() {
@Override
public void doSomething() {
try {
if (baseBind != null && baseBind.recyclerView != null) {
synchronized (this) {
int contentHeight = 0;
//可能图片加载成功的时候这个页面已经退出了
for (int i = 0; i < baseBind.recyclerView.getChildCount(); i++) {
View view = baseBind.recyclerView.getChildAt(i);
contentHeight += view.getHeight();
}


Common.showLog("recyclerView 00 " + contentHeight);
Common.showLog("recyclerView 11 " + recyHeight);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
baseBind.recyclerView.setAdapter(adapter);
baseBind.coreLinear.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
Expand Down

0 comments on commit 233ca2e

Please sign in to comment.