Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
b5777a39
Commit
b5777a39
authored
4 months ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Disable dragging on bottom sheets on ChromeOS
parent
d7f9e28e
No related branches found
No related tags found
1 merge request
!1991
Multiple ChromeOS improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
+13
-0
13 additions, 0 deletions
.../videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
with
13 additions
and
0 deletions
application/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
+
13
−
0
View file @
b5777a39
package
org.videolan.vlc.gui.dialogs
import
android.app.Dialog
import
android.content.DialogInterface
import
android.content.res.Configuration
import
android.os.Bundle
...
...
@@ -14,6 +15,7 @@ import androidx.annotation.LayoutRes
import
androidx.lifecycle.MutableLiveData
import
androidx.lifecycle.lifecycleScope
import
com.google.android.material.bottomsheet.BottomSheetBehavior
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.google.android.material.bottomsheet.BottomSheetDialogFragment
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.launch
...
...
@@ -93,6 +95,17 @@ abstract class VLCBottomSheetDialogFragment : BottomSheetDialogFragment() {
}
override
fun
onCreateDialog
(
savedInstanceState
:
Bundle
?):
Dialog
{
val
bottomSheetDialog
=
super
.
onCreateDialog
(
savedInstanceState
)
as
BottomSheetDialog
if
(
AndroidDevices
.
isChromeBook
)
bottomSheetDialog
.
setOnShowListener
{
bottomSheetDialog
.
findViewById
<
FrameLayout
>(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
)
?.
let
{
bottomSheet
->
BottomSheetBehavior
.
from
(
bottomSheet
).
isDraggable
=
false
}
}
return
bottomSheetDialog
}
private
fun
simulateKeyPress
(
key
:
Int
)
{
view
?.
let
{
val
inputConnection
=
BaseInputConnection
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment