use of org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration in project YourAppIdea by Michenux.
the class CityListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.city_fragment, container, false);
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.city_listview);
recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
recyclerView.setAdapter(this.mAdapter);
ItemClickSupport.addTo(recyclerView).setOnItemClickListener(this);
return view;
}
use of org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration in project YourAppIdea by Michenux.
the class FriendListFragment method onCreateView.
/**
* {@inheritDoc}
*
* @see android.support.v4.app.ListFragment#onCreateView(android.view.LayoutInflater,
* android.view.ViewGroup, android.os.Bundle)
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View mainView = inflater.inflate(R.layout.friendlist, container, false);
mRecyclerView = (RecyclerView) mainView.findViewById(R.id.friend_recyclerview);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLongClickable(false);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(this);
fillData();
return mainView;
}
use of org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration in project YourAppIdea by Michenux.
the class AirportListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (BuildConfig.DEBUG) {
Log.i(YourApplication.LOG_TAG, "AirportListFragment.onCreateView");
}
View view = inflater.inflate(R.layout.airport_listfragment, container, false);
mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.airport_swiperefreshlayout);
mSwipeRefreshLayout.setColorSchemeResources(R.color.refresh_progress_1, R.color.refresh_progress_2, R.color.refresh_progress_3);
mSwipeRefreshLayout.setOnRefreshListener(this);
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.airport_recyclerview);
recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
recyclerView.setAdapter(this.mAirportAdapter);
return view;
}
use of org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration in project YourAppIdea by Michenux.
the class TutorialListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.tutorial_list, container, false);
// SwipeRefresh layout
mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.tutorial_swiperefreshlayout);
mSwipeRefreshLayout.setOnRefreshListener(this);
mSwipeRefreshLayout.setColorSchemeResources(R.color.refresh_progress_1, R.color.refresh_progress_2, R.color.refresh_progress_3);
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.tutorial_listview);
recyclerView.setHasFixedSize(true);
recyclerView.setLongClickable(false);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
ItemClickSupport.addTo(recyclerView).setOnItemClickListener(this);
this.getLoaderManager().initLoader(0, null, this);
this.mAdapter = new TutorialRecyclerAdapter();
recyclerView.setAdapter(this.mAdapter);
return view;
}
Aggregations