use of android.support.v7.widget.DividerItemDecoration in project u2020 by JakeWharton.
the class TrendingView method onFinishInflate.
@Override
protected void onFinishInflate() {
super.onFinishInflate();
ButterKnife.bind(this);
AnimationDrawable ellipsis = (AnimationDrawable) ContextCompat.getDrawable(getContext(), R.drawable.dancing_ellipsis);
loadingMessageView.setCompoundDrawablesWithIntrinsicBounds(null, null, ellipsis, null);
ellipsis.start();
toolbarView.setNavigationIcon(R.drawable.menu_icon);
toolbarView.setNavigationOnClickListener(v -> drawerLayout.openDrawer(GravityCompat.START));
timespanView.setAdapter(timespanAdapter);
timespanView.setSelection(TrendingTimespan.WEEK.ordinal());
swipeRefreshView.setColorSchemeResources(R.color.accent);
swipeRefreshView.setOnRefreshListener(this);
trendingAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
@Override
public void onChanged() {
animatorView.setDisplayedChildId(//
trendingAdapter.getItemCount() == 0 ? //
R.id.trending_empty : R.id.trending_swipe_refresh);
swipeRefreshView.setRefreshing(false);
}
});
trendingView.setLayoutManager(new LinearLayoutManager(getContext()));
trendingView.addItemDecoration(new DividerItemDecoration(getContext(), VERTICAL_LIST, dividerPaddingStart, safeIsRtl()));
trendingView.setAdapter(trendingAdapter);
}
use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.
the class HeaderTypesFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.recycleview_layout, container, false);
mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
createAdapter(mRecyclerView);
return v;
}
use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.
the class ListenerFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.recycleview_layout, container, false);
mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
createAdapter(mRecyclerView);
return v;
}
use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.
the class MenuFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.recycleview_layout, container, false);
mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
createAdapter(mRecyclerView);
return v;
}
use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.
the class ThemeFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.recycleview_layout, container, false);
mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
createAdapter(mRecyclerView);
return v;
}
Aggregations