use of android.support.v7.widget.DefaultItemAnimator in project SimpleNews by liuling07.
the class NewsListFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_newslist, null);
mSwipeRefreshWidget = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_widget);
mSwipeRefreshWidget.setColorSchemeResources(R.color.primary, R.color.primary_dark, R.color.primary_light, R.color.accent);
mSwipeRefreshWidget.setOnRefreshListener(this);
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycle_view);
mRecyclerView.setHasFixedSize(true);
mLayoutManager = new LinearLayoutManager(getActivity());
mRecyclerView.setLayoutManager(mLayoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mAdapter = new NewsAdapter(getActivity().getApplicationContext());
mAdapter.setOnItemClickListener(mOnItemClickListener);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.addOnScrollListener(mOnScrollListener);
onRefresh();
return view;
}
use of android.support.v7.widget.DefaultItemAnimator in project AdvancedMaterialDrawer by madcyph3r.
the class HeadItemTypesFragment 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.DefaultItemAnimator in project AdvancedMaterialDrawer by madcyph3r.
the class BackPatternFragment 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.DefaultItemAnimator in project AdvancedMaterialDrawer by madcyph3r.
the class DrawerTypesFragment 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.DefaultItemAnimator in project AdvancedMaterialDrawer by madcyph3r.
the class FunctionallyFragment 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