Improve webtoon reader precaching images. Show a badge for the apk.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package eu.kanade.mangafeed.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
||||
public class PreCachingLayoutManager extends LinearLayoutManager {
|
||||
|
||||
private static final int DEFAULT_EXTRA_LAYOUT_SPACE = 600;
|
||||
private int extraLayoutSpace = -1;
|
||||
|
||||
public PreCachingLayoutManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public void setExtraLayoutSpace(int extraLayoutSpace) {
|
||||
this.extraLayoutSpace = extraLayoutSpace;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getExtraLayoutSpace(RecyclerView.State state) {
|
||||
if (extraLayoutSpace > 0) {
|
||||
return extraLayoutSpace;
|
||||
}
|
||||
return DEFAULT_EXTRA_LAYOUT_SPACE;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user