|
|
@@ -29,7 +29,6 @@ import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
-import me.everything.android.ui.overscroll.OverScrollDecoratorHelper;
|
|
|
|
|
|
/**
|
|
|
* EventRecommendTagFragment
|
|
|
@@ -52,6 +51,7 @@ public class EventRecommendTagFragment extends FragmentBase<EventRecommendTagPre
|
|
|
// private LayoutInflater inflater;
|
|
|
// private HorizontalScrollView scrollTag;
|
|
|
private EventRecommendTagAdapter adapter;
|
|
|
+ private LinearLayout layoutRecyclerViewContainer;
|
|
|
private AppBarLayout appBarLayout;
|
|
|
|
|
|
|
|
|
@@ -69,12 +69,12 @@ public class EventRecommendTagFragment extends FragmentBase<EventRecommendTagPre
|
|
|
layoutNothing = findViewById(R.id.layout_nothing);
|
|
|
layoutTagContents = findViewById(R.id.layout_contents);
|
|
|
ConstraintLayout layoutSelectBucket = findViewById(R.id.layout_select_bucket);
|
|
|
- // scrollTag = findViewById(R.id.scroll_tag);
|
|
|
+ // scrollTag = findViewById(R.id.scroll_tag);
|
|
|
recyclerViewEventList = findViewById(R.id.recycler_view_event_list_detail);
|
|
|
layoutNothing = findViewById(R.id.layout_nothing);
|
|
|
appBarLayout = findViewById(R.id.app_bar_layout);
|
|
|
//inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
-
|
|
|
+ layoutRecyclerViewContainer = findViewById(R.id.layout_recycler_view_container);
|
|
|
recyclerViewEventList.addItemDecoration(new RecyclerView.ItemDecoration() {
|
|
|
@Override
|
|
|
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
@@ -84,7 +84,7 @@ public class EventRecommendTagFragment extends FragmentBase<EventRecommendTagPre
|
|
|
});
|
|
|
recyclerViewEventList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
|
|
layoutSelectBucket.setPadding(0, ResourceUtil.getStatusBarHeightManual(), 0, 0);
|
|
|
- OverScrollDecoratorHelper.setUpOverScroll(recyclerViewEventList, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
|
|
|
+ //.setUpOverScroll(recyclerViewEventList, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -184,11 +184,11 @@ public class EventRecommendTagFragment extends FragmentBase<EventRecommendTagPre
|
|
|
|
|
|
if (isVisible) {
|
|
|
layoutNothing.setVisibility(View.VISIBLE);
|
|
|
- recyclerViewEventList.setVisibility(View.GONE);
|
|
|
+ layoutRecyclerViewContainer.setVisibility(View.GONE);
|
|
|
}
|
|
|
else {
|
|
|
layoutNothing.setVisibility(View.GONE);
|
|
|
- recyclerViewEventList.setVisibility(View.VISIBLE);
|
|
|
+ layoutRecyclerViewContainer.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -205,22 +205,19 @@ public class EventRecommendTagFragment extends FragmentBase<EventRecommendTagPre
|
|
|
}
|
|
|
|
|
|
private void addAppbarLayoutScrollChange() {
|
|
|
- appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
|
|
|
- @Override
|
|
|
- public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
|
|
- if (Math.abs(verticalOffset) > (appBarLayout.getTotalScrollRange() >> 1)) {
|
|
|
- // 줄어든 상태
|
|
|
- textViewEventTitle.setVisibility(View.GONE);
|
|
|
- textViewSelectTitle.setTextColor(getResources().getColor(R.color.CFFFFFF));
|
|
|
- textViewSelectTitle.setTextSize(15);
|
|
|
- }
|
|
|
- else {
|
|
|
- // 커진 상태
|
|
|
- textViewEventTitle.setVisibility(View.VISIBLE);
|
|
|
- textViewSelectTitle.setVisibility(View.VISIBLE);
|
|
|
- textViewSelectTitle.setTextColor(getResources().getColor(R.color.CC3C3C3));
|
|
|
- textViewSelectTitle.setTextSize(14);
|
|
|
- }
|
|
|
+ appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> {
|
|
|
+ if (Math.abs(verticalOffset) > (appBarLayout.getTotalScrollRange() >> 1)) {
|
|
|
+ // 줄어든 상태
|
|
|
+ textViewEventTitle.setVisibility(View.GONE);
|
|
|
+ textViewSelectTitle.setTextColor(getResources().getColor(R.color.CFFFFFF));
|
|
|
+ textViewSelectTitle.setTextSize(15);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // 커진 상태
|
|
|
+ textViewEventTitle.setVisibility(View.VISIBLE);
|
|
|
+ textViewSelectTitle.setVisibility(View.VISIBLE);
|
|
|
+ textViewSelectTitle.setTextColor(getResources().getColor(R.color.CC3C3C3));
|
|
|
+ textViewSelectTitle.setTextSize(14);
|
|
|
}
|
|
|
});
|
|
|
}
|