|
|
@@ -32,6 +32,7 @@ import kr.co.zumo.app.lifeplus.helper.ScreenSizeHelper;
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
+import kr.co.zumo.app.lifeplus.view.OverScrollDriver;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.Tutorial;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
|
|
|
@@ -47,7 +48,7 @@ import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
*/
|
|
|
public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWithTagDetailPresenter> implements IBucketListWithTagDetailView {
|
|
|
|
|
|
- private RecyclerView recyclerViewBucketListDetail;
|
|
|
+ private RecyclerView recyclerView;
|
|
|
private BucketListDetailAdapter adapter;
|
|
|
|
|
|
private TextView textTagTitle;
|
|
|
@@ -61,6 +62,7 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
private LinearLayout layoutContainerRecyclerView;
|
|
|
private float textSize = 21f;
|
|
|
private Tutorial tutorial;
|
|
|
+ private OverScrollDriver overScrollDriver;
|
|
|
|
|
|
@Nullable
|
|
|
@Override
|
|
|
@@ -79,9 +81,18 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
layoutTagContents = findViewById(R.id.layout_contents);
|
|
|
layoutContainerRecyclerView = findViewById(R.id.layout_recycler_view_container);
|
|
|
layoutNothing = findViewById(R.id.layout_nothing);
|
|
|
- recyclerViewBucketListDetail = findViewById(R.id.recycler_view_bucket_list_detail);
|
|
|
+ recyclerView = findViewById(R.id.recycler_view_bucket_list_detail);
|
|
|
appBarLayout = findViewById(R.id.app_bar_layout);
|
|
|
|
|
|
+ recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
|
|
|
+ recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
|
|
|
+ @Override
|
|
|
+ public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
+ super.getItemOffsets(outRect, view, parent, state);
|
|
|
+ outRect.bottom = ResourceUtil.dpToPx(21);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
setTagTitle(0);
|
|
|
|
|
|
if (appBarLayout.getLayoutParams() != null) {
|
|
|
@@ -106,6 +117,8 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
}
|
|
|
|
|
|
textBucketTitle.setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.UPDATE).build());});
|
|
|
+
|
|
|
+ overScrollDriver = new OverScrollDriver(recyclerView, appBarLayout);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -127,14 +140,17 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
|
|
|
@Override
|
|
|
protected void onAfterDestroyView() {
|
|
|
- recyclerViewBucketListDetail = null;
|
|
|
+ recyclerView = null;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void onAfterDestroy() {
|
|
|
if (null != tutorial) {
|
|
|
tutorial.cancel();
|
|
|
+ tutorial = null;
|
|
|
}
|
|
|
+
|
|
|
+ overScrollDriver.dispose();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -148,8 +164,6 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
@Override
|
|
|
public void onStart() {
|
|
|
super.onStart();
|
|
|
- ScreenSizeHelper helper = getHelper(ScreenSizeHelper.class);
|
|
|
- tutorial = new Tutorial(helper.getScreenWidth());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -200,16 +214,8 @@ public class BucketListWithTagDetailFragment extends FragmentBase<BucketListWith
|
|
|
// contents event
|
|
|
presenter.onEvent(event);
|
|
|
});
|
|
|
- recyclerViewBucketListDetail.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
|
|
|
- recyclerViewBucketListDetail.addItemDecoration(new RecyclerView.ItemDecoration() {
|
|
|
- @Override
|
|
|
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
- super.getItemOffsets(outRect, view, parent, state);
|
|
|
- outRect.bottom = ResourceUtil.dpToPx(21);
|
|
|
- }
|
|
|
- });
|
|
|
- recyclerViewBucketListDetail.setAdapter(adapter);
|
|
|
- // OverScrollDecoratorHelper.setUpOverScroll(recyclerViewBucketListDetail, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
|
|
|
+ recyclerView.setAdapter(adapter);
|
|
|
+ // OverScrollDecoratorHelper.setUpOverScroll(recyclerView, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
|
|
|
}
|
|
|
else {
|
|
|
// update
|