private void previewAlbum(int position) {
        if (mAlbumFiles == null || mAlbumFiles.size() == 0) {
            Toast.makeText(this, R.string.no_selected, Toast.LENGTH_LONG).show();
        } else {
            Album.galleryAlbum(this)
                    .checkable(true)
                    .checkedList(mAlbumFiles)
                    .currentPosition(position)
                    .widget(
                            Widget.newDarkBuilder(this)
                                    .title(mToolbar.getTitle().toString())
                                    .build()
                    )
                    .onResult(new Action<ArrayList<AlbumFile>>() {
                        @Override
                        public void onAction(@NonNull ArrayList<AlbumFile> result) {
                            mAlbumFiles = result;
                            mAdapter.notifyDataSetChanged(mAlbumFiles);
                            mTvMessage.setVisibility(result.size() > 0 ? View.VISIBLE : View.GONE);
                        }
                    })
                    .start();
        }
    }
private void previewAlbum ( int position ) { if ( mAlbumFiles == null || mAlbumFiles . size ( ) == 0 ) { Toast . makeText ( this , R . string . no_selected , Toast . LENGTH_LONG ) . show ( ) ; } else { Album . galleryAlbum ( this ) . checkable ( true ) . checkedList ( mAlbumFiles ) . currentPosition ( position ) . widget ( Widget . newDarkBuilder ( this ) . title ( mToolbar . getTitle ( ) . toString ( ) ) . build ( ) ) . onResult ( new Action < ArrayList < AlbumFile > > ( ) { @ Override public void onAction ( @ NonNull ArrayList < AlbumFile > result ) { mAlbumFiles = result ; mAdapter . notifyDataSetChanged ( mAlbumFiles ) ; mTvMessage . setVisibility ( result . size ( ) > 0 ? View . VISIBLE : View . GONE ) ; } } ) . start ( ) ; } }
Preview image, to album.