Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
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
49095163
Commit
49095163
authored
5 years ago
by
Geoffrey Métais
Committed by
Nicolas Pomepuy
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Streams: Fix audio tabs showing
Fix #1088 (cherry picked from commit
38c69b80
)
parent
3d21f01b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+9
-17
9 additions, 17 deletions
...roid/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
with
9 additions
and
17 deletions
vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.kt
+
9
−
17
View file @
49095163
...
...
@@ -50,6 +50,7 @@ import org.videolan.tools.copy
import
org.videolan.tools.coroutineScope
import
org.videolan.vlc.R
import
org.videolan.vlc.databinding.MrlPanelBinding
import
org.videolan.vlc.gui.ContentActivity
import
org.videolan.vlc.gui.MainActivity
import
org.videolan.vlc.gui.dialogs.CtxActionReceiver
import
org.videolan.vlc.gui.dialogs.SavePlaylistDialog
...
...
@@ -111,33 +112,25 @@ class MRLPanelFragment : Fragment(), View.OnKeyListener, TextView.OnEditorAction
binding
.
play
.
setOnClickListener
(
this
)
// dialog?.setTitle(R.string.open_mrl_dialog_title)
return
binding
.
root
}
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
viewModel
.
dataset
.
observe
(
this
,
Observer
{
adapter
.
setList
(
it
as
List
<
AbstractMediaWrapper
>)
})
viewModel
.
loading
.
observe
(
this
,
Observer
{
(
activity
as
?
MainActivity
)
?.
refreshing
=
it
})
viewModel
.
dataset
.
observe
(
requireActivity
(),
Observer
{
adapter
.
setList
(
it
as
List
<
AbstractMediaWrapper
>)
})
viewModel
.
loading
.
observe
(
requireActivity
(),
Observer
{
(
activity
as
?
MainActivity
)
?.
refreshing
=
it
})
}
override
fun
onStart
()
{
super
.
onStart
()
viewModel
.
refresh
()
val
activity
=
activity
as
AppCompatActivity
?
?:
return
if
(
activity
.
supportActionBar
!=
null
)
{
activity
.
supportActionBar
!!
.
setTitle
(
R
.
string
.
open_mrl
)
}
(
activity
as
?
ContentActivity
)
?.
setTabLayoutVisibility
(
false
)
(
activity
as
?
AppCompatActivity
)
?.
supportActionBar
?.
setTitle
(
R
.
string
.
open_mrl
)
}
override
fun
onKey
(
v
:
View
,
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
(
keyCode
==
EditorInfo
.
IME_ACTION_DONE
||
keyCode
==
EditorInfo
.
IME_ACTION_GO
||
event
.
action
==
KeyEvent
.
ACTION_DOWN
&&
event
.
keyCode
==
KeyEvent
.
KEYCODE_ENTER
)
&&
processUri
()
}
override
fun
onKey
(
v
:
View
,
keyCode
:
Int
,
event
:
KeyEvent
)
=
(
keyCode
==
EditorInfo
.
IME_ACTION_DONE
||
keyCode
==
EditorInfo
.
IME_ACTION_GO
||
event
.
action
==
KeyEvent
.
ACTION_DOWN
&&
event
.
keyCode
==
KeyEvent
.
KEYCODE_ENTER
)
&&
processUri
()
private
fun
processUri
():
Boolean
{
if
(!
TextUtils
.
isEmpty
(
viewModel
.
observableSearchText
.
get
()))
{
...
...
@@ -201,8 +194,7 @@ class MRLPanelFragment : Fragment(), View.OnKeyListener, TextView.OnEditorAction
.
show
()
}
override
fun
refresh
()
{
refresh
()
viewModel
.
refresh
()
}
}
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