Renamed a class.
This commit is contained in:
parent
73c81936d7
commit
19f2bb209c
2 changed files with 7 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class PagerAdapter extends FragmentPagerAdapter {
|
||||
public class MusicLibraryPagerAdapter extends FragmentPagerAdapter {
|
||||
|
||||
private final SparseArray<WeakReference<Fragment>> mFragmentArray = new SparseArray<>();
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ public class PagerAdapter extends FragmentPagerAdapter {
|
|||
@NonNull
|
||||
private final String[] titles;
|
||||
|
||||
public PagerAdapter(@NonNull final Context context, final FragmentManager fragmentManager) {
|
||||
public MusicLibraryPagerAdapter(@NonNull final Context context, final FragmentManager fragmentManager) {
|
||||
super(fragmentManager);
|
||||
mContext = context;
|
||||
titles = new String[]{
|
||||
|
|
@ -42,7 +42,7 @@ public class PagerAdapter extends FragmentPagerAdapter {
|
|||
context.getResources().getString(R.string.playlists)
|
||||
};
|
||||
final MusicFragments[] fragments = MusicFragments.values();
|
||||
for (final PagerAdapter.MusicFragments fragment : fragments) {
|
||||
for (final MusicLibraryPagerAdapter.MusicFragments fragment : fragments) {
|
||||
add(fragment.getFragmentClass(), null);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ import com.kabouzeid.appthemehelper.util.NavigationViewUtil;
|
|||
import com.kabouzeid.appthemehelper.util.TabLayoutUtil;
|
||||
import com.kabouzeid.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.adapter.PagerAdapter;
|
||||
import com.kabouzeid.gramophone.adapter.MusicLibraryPagerAdapter;
|
||||
import com.kabouzeid.gramophone.dialogs.ChangelogDialog;
|
||||
import com.kabouzeid.gramophone.dialogs.CreatePlaylistDialog;
|
||||
import com.kabouzeid.gramophone.dialogs.DonationDialog;
|
||||
|
|
@ -91,7 +91,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
|
||||
@Nullable
|
||||
private View navigationDrawerHeader;
|
||||
private PagerAdapter pagerAdapter;
|
||||
private MusicLibraryPagerAdapter pagerAdapter;
|
||||
private MaterialCab cab;
|
||||
|
||||
private boolean blockRequestPermissions;
|
||||
|
|
@ -157,7 +157,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
}
|
||||
|
||||
private void setUpViewPager() {
|
||||
pagerAdapter = new PagerAdapter(this, getSupportFragmentManager());
|
||||
pagerAdapter = new MusicLibraryPagerAdapter(this, getSupportFragmentManager());
|
||||
pager.setAdapter(pagerAdapter);
|
||||
pager.setOffscreenPageLimit(pagerAdapter.getCount() - 1); // => all
|
||||
|
||||
|
|
@ -536,7 +536,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
}
|
||||
|
||||
private boolean isPlaylistPage() {
|
||||
return pager.getCurrentItem() == PagerAdapter.MusicFragments.PLAYLIST.ordinal();
|
||||
return pager.getCurrentItem() == MusicLibraryPagerAdapter.MusicFragments.PLAYLIST.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue