detail: re-add grid view
Not going to do tablet layout right now in favor of shipping faster.
This commit is contained in:
parent
7e6865c6b3
commit
92a07e346b
2 changed files with 21 additions and 4 deletions
|
@ -5,10 +5,9 @@
|
|||
#### What's New
|
||||
- A total user interface refresh based on the latest Material Design specs
|
||||
- New theme palettes
|
||||
- Refreshed playback design
|
||||
- New fluid detail view with a fast scroller
|
||||
- Improved designs for playback and detail views
|
||||
- New app branding and icon
|
||||
- Better round mode support
|
||||
- Refreshed round mode
|
||||
- Less intrusive music loading indicators
|
||||
- **Musikr**, a brand new music loading system
|
||||
- Directly accesses user files rather than unreliable media database
|
||||
|
@ -28,6 +27,7 @@
|
|||
- Hidden audio files can now be loaded
|
||||
- Sorting songs by date now uses songs date first, before the earliest album date
|
||||
- Added working layouts for small split-screen form factors
|
||||
- Added fast scrolling in detail views
|
||||
- Added ability to make issues and make feedback e-mails in-app
|
||||
|
||||
#### What's Fixed
|
||||
|
|
|
@ -22,6 +22,7 @@ import android.os.Bundle
|
|||
import android.view.LayoutInflater
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import kotlin.math.abs
|
||||
|
@ -32,10 +33,13 @@ import org.oxycblt.auxio.databinding.FragmentDetailBinding
|
|||
import org.oxycblt.auxio.detail.list.DetailListAdapter
|
||||
import org.oxycblt.auxio.list.ListFragment
|
||||
import org.oxycblt.auxio.list.ListViewModel
|
||||
import org.oxycblt.auxio.list.PlainDivider
|
||||
import org.oxycblt.auxio.list.PlainHeader
|
||||
import org.oxycblt.auxio.music.MusicViewModel
|
||||
import org.oxycblt.auxio.playback.PlaybackViewModel
|
||||
import org.oxycblt.auxio.util.getDimenPixels
|
||||
import org.oxycblt.auxio.util.overrideOnOverflowMenuClick
|
||||
import org.oxycblt.auxio.util.setFullWidthLookup
|
||||
import org.oxycblt.musikr.Music
|
||||
import org.oxycblt.musikr.MusicParent
|
||||
|
||||
|
@ -79,7 +83,20 @@ abstract class DetailFragment<P : MusicParent, C : Music> :
|
|||
overrideOnOverflowMenuClick { onOpenParentMenu() }
|
||||
}
|
||||
|
||||
binding.detailRecycler.adapter = getDetailListAdapter()
|
||||
binding.detailRecycler.apply {
|
||||
adapter = getDetailListAdapter()
|
||||
(layoutManager as GridLayoutManager).setFullWidthLookup {
|
||||
if (it != 0) {
|
||||
val item =
|
||||
detailModel.artistSongList.value.getOrElse(it - 1) {
|
||||
return@setFullWidthLookup false
|
||||
}
|
||||
item is PlainDivider || item is PlainHeader
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spacingSmall = requireContext().getDimenPixels(R.dimen.spacing_small)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue