use of org.videolan.vlc.gui.helpers.SwipeDragItemTouchHelperCallback in project vlc-android by videolan.
the class VideoPlayerActivity method initPlaylistUi.
private void initPlaylistUi() {
if (mService.hasPlaylist()) {
mHasPlaylist = true;
mPlaylistAdapter = new PlaylistAdapter(this);
mPlaylistAdapter.setService(mService);
final LinearLayoutManager layoutManager = new LinearLayoutManager(this);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mPlaylist.setLayoutManager(layoutManager);
mPlaylistToggle.setVisibility(View.VISIBLE);
mHudBinding.playlistPrevious.setVisibility(View.VISIBLE);
mHudBinding.playlistNext.setVisibility(View.VISIBLE);
mPlaylistToggle.setOnClickListener(VideoPlayerActivity.this);
final ItemTouchHelper.Callback callback = new SwipeDragItemTouchHelperCallback(mPlaylistAdapter);
final ItemTouchHelper touchHelper = new ItemTouchHelper(callback);
touchHelper.attachToRecyclerView(mPlaylist);
}
}
use of org.videolan.vlc.gui.helpers.SwipeDragItemTouchHelperCallback in project vlc-android by GeoffreyMetais.
the class VideoPlayerActivity method initPlaylistUi.
private void initPlaylistUi() {
if (mService.hasPlaylist()) {
mHasPlaylist = true;
mPlaylistAdapter = new PlaylistAdapter(this);
mPlaylistAdapter.setService(mService);
final LinearLayoutManager layoutManager = new LinearLayoutManager(this);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mPlaylist.setLayoutManager(layoutManager);
mPlaylistToggle.setVisibility(View.VISIBLE);
mHudBinding.playlistPrevious.setVisibility(View.VISIBLE);
mHudBinding.playlistNext.setVisibility(View.VISIBLE);
mPlaylistToggle.setOnClickListener(VideoPlayerActivity.this);
final ItemTouchHelper.Callback callback = new SwipeDragItemTouchHelperCallback(mPlaylistAdapter);
final ItemTouchHelper touchHelper = new ItemTouchHelper(callback);
touchHelper.attachToRecyclerView(mPlaylist);
}
}
Aggregations