use of androidx.interpolator.view.animation.LinearOutSlowInInterpolator in project Slide by ccrama.
the class SubredditListView method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), new ColorPreferences(inflater.getContext()).getThemeSubreddit(where));
View v = LayoutInflater.from(contextThemeWrapper).inflate(R.layout.fragment_verticalcontent, container, false);
rv = v.findViewById(R.id.vertical_content);
final RecyclerView.LayoutManager mLayoutManager = new PreCachingLayoutManager(getActivity());
rv.setLayoutManager(mLayoutManager);
rv.setItemAnimator(new SlideUpAlphaAnimator().withInterpolator(new LinearOutSlowInInterpolator()));
mSwipeRefreshLayout = v.findViewById(R.id.activity_main_swipe_refresh_layout);
mSwipeRefreshLayout.setColorSchemeColors(Palette.getColors("no sub", getContext()));
// If we use 'findViewById(R.id.header).getMeasuredHeight()', 0 is always returned.
// So, we estimate the height of the header in dp
mSwipeRefreshLayout.setProgressViewOffset(false, Constants.TAB_HEADER_VIEW_OFFSET - Constants.PTR_OFFSET_TOP, Constants.TAB_HEADER_VIEW_OFFSET + Constants.PTR_OFFSET_BOTTOM);
v.findViewById(R.id.post_floating_action_button).setVisibility(View.GONE);
doAdapter();
return v;
}
Aggregations