Update refresh layout
This commit is contained in:
4 files changed
+8
-16
No files matched your search
+1
-1
@@ -94,7 +94,6 @@ dependencies {
|
||||
implementation 'com.github.seven332:glview:0.1.0'
|
||||
implementation 'com.github.seven332:glview-image:0.1.0'
|
||||
implementation 'com.github.seven332:hotspot:0.1.0'
|
||||
implementation 'com.github.seven332:refreshlayout:0.1.0'
|
||||
implementation 'com.github.seven332:streampipe:0.1.0'
|
||||
implementation 'com.github.seven332:tuxiang:0.1.6'
|
||||
implementation 'com.github.seven332:unifile:9ec57bcd8f'
|
||||
@@ -112,6 +111,7 @@ dependencies {
|
||||
implementation 'com.github.NekoInverter:DrawerLayout:6ba992f8d4'
|
||||
implementation 'com.github.NekoInverter:Image:8fd6c1e1df'
|
||||
implementation 'com.github.NekoInverter.preferencex-android:preferencex-simplemenu:88f93154b2'
|
||||
implementation 'com.github.NekoInverter:RefreshLayout:7241e04739'
|
||||
implementation 'fadeapp.widgets:scrollless-recyclerView:1.0.2'
|
||||
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
|
||||
implementation 'org.greenrobot:greendao:2.2.1'
|
||||
|
||||
@@ -266,6 +266,7 @@ public class FavoritesScene extends BaseScene implements
|
||||
mHelper.setEmptyString(resources.getString(R.string.gallery_list_empty_hit));
|
||||
contentLayout.setHelper(mHelper);
|
||||
contentLayout.getFastScroller().setOnDragHandlerListener(this);
|
||||
contentLayout.setFitPaddingTop(paddingTopSB);
|
||||
|
||||
mAdapter = new FavoritesAdapter(inflater, resources, mRecyclerView, Settings.getListMode());
|
||||
//mRecyclerView.setSelector(Ripple.generateRippleDrawable(context, !AttrResources.getAttrBoolean(context, R.attr.isLightTheme), new ColorDrawable(Color.TRANSPARENT)));
|
||||
@@ -280,8 +281,6 @@ public class FavoritesScene extends BaseScene implements
|
||||
fastScroller.setPadding(fastScroller.getPaddingLeft(), fastScroller.getPaddingTop() + paddingTopSB,
|
||||
fastScroller.getPaddingRight(), fastScroller.getPaddingBottom());
|
||||
|
||||
refreshLayout.setHeaderTranslationY(paddingTopSB);
|
||||
|
||||
mLeftDrawable = new DrawerArrowDrawable(context, AttrResources.getAttrColor(context, R.attr.drawableColorPrimary));
|
||||
mSearchBar.setLeftDrawable(mLeftDrawable);
|
||||
mSearchBar.setRightDrawable(DrawableManager.getVectorDrawable(context, R.drawable.v_magnify_x24));
|
||||
|
||||
@@ -550,7 +550,6 @@ public final class GalleryListScene extends BaseScene
|
||||
ContentLayout contentLayout = (ContentLayout) ViewUtils.$$(mainLayout, R.id.content_layout);
|
||||
mRecyclerView = contentLayout.getRecyclerView();
|
||||
FastScroller fastScroller = contentLayout.getFastScroller();
|
||||
RefreshLayout refreshLayout = contentLayout.getRefreshLayout();
|
||||
mSearchLayout = (SearchLayout) ViewUtils.$$(mainLayout, R.id.search_layout);
|
||||
mSearchBar = (SearchBar) ViewUtils.$$(mainLayout, R.id.search_bar);
|
||||
mFabLayout = (FabLayout) ViewUtils.$$(mainLayout, R.id.fab_layout);
|
||||
@@ -564,6 +563,7 @@ public final class GalleryListScene extends BaseScene
|
||||
mHelper = new GalleryListHelper();
|
||||
contentLayout.setHelper(mHelper);
|
||||
contentLayout.getFastScroller().setOnDragHandlerListener(this);
|
||||
contentLayout.setFitPaddingTop(paddingTopSB);
|
||||
|
||||
mAdapter = new GalleryListAdapter(inflater, resources,
|
||||
mRecyclerView, Settings.getListMode());
|
||||
@@ -574,8 +574,6 @@ public final class GalleryListScene extends BaseScene
|
||||
fastScroller.setPadding(fastScroller.getPaddingLeft(), fastScroller.getPaddingTop() + paddingTopSB,
|
||||
fastScroller.getPaddingRight(), fastScroller.getPaddingBottom());
|
||||
|
||||
refreshLayout.setHeaderTranslationY(paddingTopSB);
|
||||
|
||||
mLeftDrawable = new DrawerArrowDrawable(context, AttrResources.getAttrColor(context, R.attr.drawableColorPrimary));
|
||||
mRightDrawable = new AddDeleteDrawable(context, AttrResources.getAttrColor(context, R.attr.drawableColorPrimary));
|
||||
mSearchBar.setLeftDrawable(mLeftDrawable);
|
||||
@@ -785,7 +783,7 @@ public final class GalleryListScene extends BaseScene
|
||||
final QsDrawerAdapter qsDrawerAdapter = new QsDrawerAdapter(inflater);
|
||||
qsDrawerAdapter.setHasStableIds(true);
|
||||
final GeneralItemAnimator animator = new DraggableItemAnimator();
|
||||
mRecyclerView.setItemAnimator(animator);
|
||||
recyclerView.setItemAnimator(animator);
|
||||
recyclerView.setAdapter(dragDropManager.createWrappedAdapter(qsDrawerAdapter));
|
||||
dragDropManager.attachRecyclerView(recyclerView);
|
||||
mQuickSearchList = EhDB.getAllQuickSearch();
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ContentLayout extends FrameLayout {
|
||||
private EasyRecyclerView mRecyclerView;
|
||||
private FastScroller mFastScroller;
|
||||
|
||||
private ContentHelper mContentHelper;
|
||||
private ContentHelper<?> mContentHelper;
|
||||
|
||||
private int mRecyclerViewOriginTop;
|
||||
private int mRecyclerViewOriginBottom;
|
||||
@@ -129,7 +129,7 @@ public class ContentLayout extends FrameLayout {
|
||||
return mRefreshLayout;
|
||||
}
|
||||
|
||||
public void setHelper(ContentHelper helper) {
|
||||
public void setHelper(ContentHelper<?> helper) {
|
||||
mContentHelper = helper;
|
||||
helper.init(this);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class ContentLayout extends FrameLayout {
|
||||
// RecyclerView
|
||||
mRecyclerView.setPadding(mRecyclerView.getPaddingLeft(), mRecyclerViewOriginTop + fitPaddingTop, mRecyclerView.getPaddingRight(), mRecyclerView.getPaddingBottom());
|
||||
// RefreshLayout
|
||||
mRefreshLayout.setProgressViewOffset(false, fitPaddingTop, fitPaddingTop + LayoutUtils.dp2pix(getContext(), 32)); // TODO
|
||||
mRefreshLayout.setHeaderProgressViewOffset(true, 0, fitPaddingTop + LayoutUtils.dp2pix(getContext(), 32)); // TODO
|
||||
}
|
||||
|
||||
public void setFitPaddingBottom(int fitPaddingBottom) {
|
||||
@@ -310,12 +310,7 @@ public class ContentLayout extends FrameLayout {
|
||||
mRecyclerView.addOnScrollListener(mOnScrollListener);
|
||||
mRefreshLayout.setOnRefreshListener(mOnRefreshListener);
|
||||
|
||||
mTipView.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
mTipView.setOnClickListener(v -> refresh());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user