move playlist fragment as the first one, make Artists the default

This commit is contained in:
tibbi 2020-10-19 23:27:58 +02:00
parent c5cc550119
commit 0295efca3b
3 changed files with 6 additions and 6 deletions

View file

@ -58,7 +58,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.31.4'
implementation 'com.simplemobiletools:commons:5.31.5'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.media:media:1.2.0'

View file

@ -200,7 +200,7 @@ class MainActivity : SimpleActivity() {
}
)
val tabLabels = arrayOf(getString(R.string.artists), getString(R.string.albums), getString(R.string.tracks), getString(R.string.playlists))
val tabLabels = arrayOf(getString(R.string.playlists), getString(R.string.artists), getString(R.string.albums), getString(R.string.tracks))
main_tabs_holder.apply {
setTabTextColors(config.textColor, getAdjustedPrimaryColor())
setSelectedTabIndicatorColor(getAdjustedPrimaryColor())

View file

@ -29,9 +29,9 @@ class ViewPagerAdapter(val activity: SimpleActivity) : PagerAdapter() {
override fun isViewFromObject(view: View, item: Any) = view == item
private fun getFragment(position: Int) = when (position) {
0 -> R.layout.fragment_artists
1 -> R.layout.fragment_albums
2 -> R.layout.fragment_tracks
else -> R.layout.fragment_playlists
0 -> R.layout.fragment_playlists
1 -> R.layout.fragment_artists
2 -> R.layout.fragment_albums
else -> R.layout.fragment_tracks
}
}