Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
536
Issue boards
Milestones
Wiki
Code
Merge requests
16
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
875b886f
Commit
875b886f
authored
2 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Force collapsing the search view when leaving the activity
Fixes
#2448
parent
ca2c9a63
No related branches found
No related tags found
1 merge request
!1328
Force collapsing the search view when leaving the activity
Pipeline
#207553
passed with stage
in 6 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/ContentActivity.kt
+7
-1
7 additions, 1 deletion
...n/vlc-android/src/org/videolan/vlc/gui/ContentActivity.kt
with
7 additions
and
1 deletion
application/vlc-android/src/org/videolan/vlc/gui/ContentActivity.kt
+
7
−
1
View file @
875b886f
...
...
@@ -50,6 +50,7 @@ import org.videolan.vlc.interfaces.Filterable
open
class
ContentActivity
:
AudioPlayerContainerActivity
(),
SearchView
.
OnQueryTextListener
,
MenuItem
.
OnActionExpandListener
{
private
lateinit
var
searchView
:
SearchView
private
lateinit
var
searchItem
:
MenuItem
private
var
showRenderers
=
!
AndroidDevices
.
isChromeBook
&&
!
RendererDelegate
.
renderers
.
value
.
isNullOrEmpty
()
private
val
searchHiddenMenuItem
=
ArrayList
<
MenuItem
>()
open
fun
hideRenderers
()
=
false
...
...
@@ -77,6 +78,11 @@ open class ContentActivity : AudioPlayerContainerActivity(), SearchView.OnQueryT
UiTools
.
setOnDragListener
(
this
)
}
override
fun
onPause
()
{
super
.
onPause
()
searchItem
.
collapseActionView
()
}
override
fun
onCreateOptionsMenu
(
menu
:
Menu
):
Boolean
{
val
current
=
currentFragment
super
.
onCreateOptionsMenu
(
menu
)
...
...
@@ -88,7 +94,7 @@ open class ContentActivity : AudioPlayerContainerActivity(), SearchView.OnQueryT
}
if
(
current
is
Filterable
)
{
val
filterable
=
current
as
Filterable
?
val
searchItem
=
menu
.
findItem
(
R
.
id
.
ml_menu_filter
)
searchItem
=
menu
.
findItem
(
R
.
id
.
ml_menu_filter
)
searchView
=
searchItem
.
actionView
as
SearchView
searchView
.
queryHint
=
getString
(
R
.
string
.
search_in_list_hint
)
searchView
.
setOnQueryTextListener
(
this
)
...
...
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