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
14
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
97b402e9
Commit
97b402e9
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Hide option icons on filtering
Leave the whole action bar empty for filter edit text.
parent
8079f20a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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/ContentActivity.java
+20
-5
20 additions, 5 deletions
vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
with
20 additions
and
5 deletions
vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
+
20
−
5
View file @
97b402e9
...
...
@@ -32,7 +32,6 @@ import android.support.annotation.Nullable;
import
android.support.v4.app.Fragment
;
import
android.support.v4.view.MenuItemCompat
;
import
android.support.v7.widget.SearchView
;
import
android.support.v7.widget.SnapHelper
;
import
android.view.DragAndDropPermissions
;
import
android.view.DragEvent
;
import
android.view.Menu
;
...
...
@@ -44,10 +43,13 @@ import org.videolan.libvlc.util.AndroidUtil;
import
org.videolan.medialibrary.media.MediaWrapper
;
import
org.videolan.vlc.R
;
import
org.videolan.vlc.RendererDelegate
;
import
org.videolan.vlc.gui.audio.AudioBrowserFragment
;
import
org.videolan.vlc.gui.audio.EqualizerFragment
;
import
org.videolan.vlc.gui.browser.ExtensionBrowser
;
import
org.videolan.vlc.gui.browser.SortableFragment
;
import
org.videolan.vlc.gui.dialogs.RenderersDialog
;
import
org.videolan.vlc.gui.helpers.UiTools
;
import
org.videolan.vlc.gui.video.VideoGridFragment
;
import
org.videolan.vlc.interfaces.Filterable
;
import
org.videolan.vlc.media.MediaUtils
;
...
...
@@ -197,9 +199,23 @@ public class ContentActivity extends AudioPlayerContainerActivity implements Sea
}
private
void
setSearchVisibility
(
boolean
visible
)
{
Fragment
current
=
getCurrentFragment
();
if
(
current
instanceof
Filterable
)
final
Fragment
current
=
getCurrentFragment
();
if
(
current
instanceof
Filterable
)
{
((
Filterable
)
current
).
setSearchVisibility
(
visible
);
makeRoomForSearch
(
current
,
visible
);
}
}
// Hide options menu items to make room for filter EditText
protected
void
makeRoomForSearch
(
Fragment
current
,
boolean
hide
)
{
final
Menu
menu
=
mToolbar
.
getMenu
();
menu
.
findItem
(
R
.
id
.
ml_menu_renderers
).
setVisible
(!
hide
&&
showRenderers
);
if
(
current
instanceof
SortableFragment
)
{
menu
.
findItem
(
R
.
id
.
ml_menu_sortby
).
setVisible
(!
hide
&&
((
SortableFragment
)
current
).
isSortEnabled
());
}
if
(
current
instanceof
VideoGridFragment
||
current
instanceof
AudioBrowserFragment
)
{
menu
.
findItem
(
R
.
id
.
ml_menu_last_playlist
).
setVisible
(!
hide
);
}
}
public
void
onClick
(
View
v
)
{
...
...
@@ -208,8 +224,7 @@ public class ContentActivity extends AudioPlayerContainerActivity implements Sea
}
public
void
closeSearchView
()
{
if
(
mMenu
!=
null
)
MenuItemCompat
.
collapseActionView
(
mMenu
.
findItem
(
R
.
id
.
ml_menu_filter
));
if
(
mMenu
!=
null
)
MenuItemCompat
.
collapseActionView
(
mMenu
.
findItem
(
R
.
id
.
ml_menu_filter
));
}
public
void
restoreCurrentList
()
{
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
011e872e
·
7 years ago
mentioned in commit
011e872e
mentioned in commit 011e872e746d655c7995b650c95a4166706721ea
Toggle commit list
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