Added album multi select and fixed some minor bugs.
This commit is contained in:
parent
8503eb4e36
commit
4e3f75d295
13 changed files with 167 additions and 75 deletions
|
|
@ -559,7 +559,7 @@ public class MainActivity extends AbsFabActivity
|
|||
|
||||
@Override
|
||||
public MaterialCab openCab(final int menu, final MaterialCab.Callback callback) {
|
||||
if (cab != null) cab.finish();
|
||||
if (cab != null && cab.isActive()) cab.finish();
|
||||
cab = new MaterialCab(this, R.id.cab_stub)
|
||||
.setMenu(menu)
|
||||
.setBackgroundColor(PreferenceUtils.getInstance(this).getThemeColorPrimary())
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class AlbumViewFragment extends AbsMainActivityRecyclerViewFragment {
|
|||
|
||||
@Override
|
||||
protected RecyclerView.Adapter createAdapter() {
|
||||
return new AlbumAdapter(getActivity());
|
||||
return new AlbumAdapter(getMainActivity(), getMainActivity());
|
||||
}
|
||||
|
||||
public void setColumns(int columns) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ public class ArtistViewFragment extends AbsMainActivityRecyclerViewFragment {
|
|||
|
||||
@Override
|
||||
protected RecyclerView.Adapter createAdapter() {
|
||||
return new ArtistAdapter(getActivity());
|
||||
return new ArtistAdapter(getMainActivity());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.kabouzeid.gramophone.ui.fragments.mainactivityfragments;
|
|||
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
|
|
@ -41,7 +40,7 @@ public class PlaylistViewFragment extends AbsMainActivityRecyclerViewFragment {
|
|||
|
||||
@Override
|
||||
protected RecyclerView.Adapter createAdapter() {
|
||||
PlaylistAdapter adapter = new PlaylistAdapter((AppCompatActivity) getActivity());
|
||||
PlaylistAdapter adapter = new PlaylistAdapter(getMainActivity());
|
||||
View v = getView();
|
||||
if (v != null) {
|
||||
v.findViewById(android.R.id.empty).setVisibility(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.kabouzeid.gramophone.ui.fragments.mainactivityfragments;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
|
||||
|
|
@ -26,6 +25,6 @@ public class SongViewFragment extends AbsMainActivityRecyclerViewFragment {
|
|||
|
||||
@Override
|
||||
protected RecyclerView.Adapter createAdapter() {
|
||||
return new SongAdapter((AppCompatActivity) getActivity(), getMainActivity());
|
||||
return new SongAdapter(getMainActivity(), getMainActivity());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue