Search in sources :

Example 1 with FastScroller

use of com.naman14.timber.widgets.FastScroller in project Timber by naman14.

the class SongsFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_recyclerview, container, false);
    recyclerView = (RecyclerView) rootView.findViewById(R.id.recyclerview);
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    FastScroller fastScroller = (FastScroller) rootView.findViewById(R.id.fastscroller);
    fastScroller.setRecyclerView(recyclerView);
    new loadSongs().execute("");
    ((BaseActivity) getActivity()).setMusicStateListenerListener(this);
    return rootView;
}
Also used : BaseActivity(com.naman14.timber.activities.BaseActivity) FastScroller(com.naman14.timber.widgets.FastScroller) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 BaseActivity (com.naman14.timber.activities.BaseActivity)1 FastScroller (com.naman14.timber.widgets.FastScroller)1