Search in sources :

Example 1 with SlidingQueueAdapter

use of com.naman14.timber.adapters.SlidingQueueAdapter in project Timber by naman14.

the class Timber5 method setupSlidingQueue.

private void setupSlidingQueue() {
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
    adapter = new SlidingQueueAdapter((AppCompatActivity) getActivity(), QueueLoader.getQueueSongs(getActivity()));
    recyclerView.setAdapter(adapter);
    recyclerView.scrollToPosition(MusicPlayer.getQueuePosition() - 3);
}
Also used : SlidingQueueAdapter(com.naman14.timber.adapters.SlidingQueueAdapter) AppCompatActivity(android.support.v7.app.AppCompatActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 2 with SlidingQueueAdapter

use of com.naman14.timber.adapters.SlidingQueueAdapter in project Timber by naman14.

the class Timber4 method setupHorizontalQueue.

private void setupHorizontalQueue() {
    horizontalRecyclerview.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
    horizontalAdapter = new SlidingQueueAdapter(getActivity(), QueueLoader.getQueueSongs(getActivity()));
    horizontalRecyclerview.setAdapter(horizontalAdapter);
    horizontalRecyclerview.scrollToPosition(MusicPlayer.getQueuePosition() - 3);
}
Also used : SlidingQueueAdapter(com.naman14.timber.adapters.SlidingQueueAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 SlidingQueueAdapter (com.naman14.timber.adapters.SlidingQueueAdapter)2 AppCompatActivity (android.support.v7.app.AppCompatActivity)1