Search in sources :

Example 1 with SongAdapter

use of com.kabouzeid.gramophone.adapter.song.SongAdapter in project Phonograph by kabouzeid.

the class GenreDetailActivity method setUpRecyclerView.

private void setUpRecyclerView() {
    ViewUtil.setUpFastScrollRecyclerViewColor(this, ((FastScrollRecyclerView) recyclerView), ThemeStore.accentColor(this));
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    adapter = new SongAdapter(this, new ArrayList<>(), R.layout.item_list, false, this);
    recyclerView.setAdapter(adapter);
    adapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {

        @Override
        public void onChanged() {
            super.onChanged();
            checkIsEmpty();
        }
    });
}
Also used : FastScrollRecyclerView(com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView) ArrayList(java.util.ArrayList) SongAdapter(com.kabouzeid.gramophone.adapter.song.SongAdapter) RecyclerView(androidx.recyclerview.widget.RecyclerView) FastScrollRecyclerView(com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 SongAdapter (com.kabouzeid.gramophone.adapter.song.SongAdapter)1 FastScrollRecyclerView (com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView)1 ArrayList (java.util.ArrayList)1