Added folder spoiler

This commit is contained in:
Karim Abou Zeid 2015-12-31 13:07:38 +01:00
commit 7fdee51fe8
13 changed files with 14 additions and 45 deletions

View file

@ -169,23 +169,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
tabs.setTabTextColors(ColorUtil.getSecondaryTextColorForBackground(this, getThemeColorPrimary()), ColorUtil.getPrimaryTextColorForBackground(this, getThemeColorPrimary()));
tabs.setSelectedTabIndicatorColor(getThemeColorAccent() == Color.WHITE && !ColorUtil.useDarkTextColorOnBackground(getThemeColorPrimary()) ? Color.WHITE : ThemeSingleton.get().positiveColor.getDefaultColor());
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
navigationView.getMenu().getItem(position).setChecked(true);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
pager.setCurrentItem(startPosition);
}
@ -201,6 +184,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
}
private void setUpNavigationView() {
navigationView.setCheckedItem(R.id.nav_library);
final int colorAccent = ThemeSingleton.get().positiveColor.getDefaultColor();
navigationView.setItemTextColor(new ColorStateList(
new int[][]{
@ -231,21 +215,11 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
drawerLayout.closeDrawers();
switch (menuItem.getItemId()) {
case R.id.nav_songs:
menuItem.setChecked(true);
pager.setCurrentItem(PagerAdapter.MusicFragments.SONG.ordinal(), true);
case R.id.nav_library:
// TODO
break;
case R.id.nav_albums:
menuItem.setChecked(true);
pager.setCurrentItem(PagerAdapter.MusicFragments.ALBUM.ordinal(), true);
break;
case R.id.nav_artists:
menuItem.setChecked(true);
pager.setCurrentItem(PagerAdapter.MusicFragments.ARTIST.ordinal(), true);
break;
case R.id.nav_playlists:
menuItem.setChecked(true);
pager.setCurrentItem(PagerAdapter.MusicFragments.PLAYLIST.ordinal(), true);
case R.id.nav_folders:
// TODO
break;
case R.id.support_development:
new Handler().postDelayed(new Runnable() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

View file

@ -5,21 +5,14 @@
android:id="@+id/navigation_drawer_menu_category_sections"
android:checkableBehavior="single">
<item
android:id="@+id/nav_songs"
android:icon="@drawable/ic_audiotrack_white_24dp"
android:title="@string/songs" />
android:id="@+id/nav_library"
android:icon="@drawable/ic_my_library_music_white_24dp"
android:title="@string/library" />
<item
android:id="@+id/nav_albums"
android:icon="@drawable/ic_album_white_24dp"
android:title="@string/albums" />
<item
android:id="@+id/nav_artists"
android:icon="@drawable/ic_person_white_24dp"
android:title="@string/artists" />
<item
android:id="@+id/nav_playlists"
android:icon="@drawable/ic_queue_music_white_24dp"
android:title="@string/playlists" />
android:enabled="false"
android:id="@+id/nav_folders"
android:icon="@drawable/ic_folder_white_24dp"
android:title="Folders (soon)" />
</group>
<group

View file

@ -222,4 +222,6 @@
<string name="open_playing_queue_instruction">Swipe the card in the now playing screen up to reveal the full playing queue.</string>
<string name="rearrange_playing_queue_instruction">Rearrange the playing queue by dragging a song from its track number.</string>
<string name="storage_permission_explaination">The storage permission is required for Phonograph to read your music library.</string>
<string name="library">Library</string>
<string name="folders">Folders</string>
</resources>