Improve player bottom sheet, in particular fling support
Fixes #101 #141
The current bottom sheet have usability problems. In particular, support of fling gesture is atrocious. This is an attempt to improve the situation using standard Google's Material BottomSheetBehavior
. It also converts most of the layout to ConstraintLayout
to lighten it up and uses databinding + ViewModel
that is less error-prone than manually updating the views.
It also enables ladscape mode in AndroidManifest.xml
because, weirdly some layouts for landscape did exists but the app was forced to portrait.
(Sorry for the size of the MR. It seems I'm unable to keep them them small
Merge request reports
Activity
added 29 commits
-
53e332d7...61ab3a91 - 28 commits from branch
funkwhale:develop
- c799f833 - Improve player bottom sheet, in particular fling support
-
53e332d7...61ab3a91 - 28 commits from branch
added 1 commit
- 7a4849fc - Improve player bottom sheet, in particular fling support
added 1 commit
- 1fc72e75 - Improve player bottom sheet, in particular fling support
added 1 commit
- 2eb5ab45 - Improve player bottom sheet, in particular fling support
added 3 commits
-
2eb5ab45...95dcbf46 - 2 commits from branch
funkwhale:develop
- b7e592b9 - Improve player bottom sheet, in particular fling support
-
2eb5ab45...95dcbf46 - 2 commits from branch
added 7 commits
-
b7e592b9...04a659cc - 6 commits from branch
funkwhale:develop
- bef6b63d - Improve player bottom sheet, in particular fling support
-
b7e592b9...04a659cc - 6 commits from branch
Hello @christophehenry,
sorry for such a long time with no reaction. We are currently low on Android developers, but this should be an extra motivation to get new people involved.
I will take care for review and testing as soon as possible!
assigned to @georgkrause
- Resolved
First off, I do not speak for the project. I'm just some rado on the internet.
I like this submission. I have pulled it and tested it locally. I ran into a few crashes testing on Android 11. I patched those up as best I could in the three commits at the tip of https://dev.funkwhale.audio/hdasch/funkwhale-android/-/commits/bottom-sheet.
The second patch (Fix "Not allowed to start service..." exception) is only a partial fix. If I start the app with an empty queue, I get a different exception:
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground
. If I am fast enough to start a new track, I avoid the exception. SeemsudateNotifications
inMediaControlManager
does not callstartForeground
ifnotification == null && !playing
.It is not clear to me why
startService
inMainActivity
fails with your changes. Maybe because it has been moved to into a different scope byapply
?I am not an Android developer by trade. So I may have missed the mark. Would you take a look?
I also noticed an anomaly. The increased size of the BottomSheet obscures the bottom of the RecyclerView in (at least) Artists and Albums tabs. For example, if I select an Artist with six albums, the album list above the BottomSheet displays just the first four and a half album items.
You obviously understand layout better than I do. Is that a simple fix?
In addition to the two issues identified above, this may also address #45 and #46.
Looking forward to a merge.
added 19 commits
-
bef6b63d...f8838bae - 17 commits from branch
funkwhale:develop
- a9421391 - Improve player bottom sheet, in particular fling support
- bf97e6cb - Fix a few regressions with the new bottom sheet
-
bef6b63d...f8838bae - 17 commits from branch
added 1 commit
- 0db3c45c - Fix overlap between main fragment and player bottom bar