Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
de5066a8
Commit
de5066a8
authored
May 30, 2018
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AUdioBrowser: Get settings with current context
parent
3531c047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+4
-2
No files found.
vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
View file @
de5066a8
...
...
@@ -88,6 +88,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
private
TextView
mEmptyView
;
private
final
ContextMenuRecyclerView
[]
mLists
=
new
ContextMenuRecyclerView
[
MODE_TOTAL
];
private
FastScroller
mFastScroller
;
private
SharedPreferences
mSettings
;
private
static
final
int
REFRESH
=
101
;
private
static
final
int
UPDATE_LIST
=
102
;
...
...
@@ -107,6 +108,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
final
Resources
res
=
getResources
();
mSettings
=
PreferenceManager
.
getDefaultSharedPreferences
(
getActivity
());
mSongsAdapter
=
new
AudioBrowserAdapter
(
MediaLibraryItem
.
TYPE_MEDIA
,
this
,
true
,
res
);
mArtistsAdapter
=
new
AudioBrowserAdapter
(
MediaLibraryItem
.
TYPE_ARTIST
,
this
,
true
,
res
);
mAlbumsAdapter
=
new
AudioBrowserAdapter
(
MediaLibraryItem
.
TYPE_ALBUM
,
this
,
true
,
res
);
...
...
@@ -435,7 +437,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
getActivity
().
supportInvalidateOptionsMenu
();
mFastScroller
.
setRecyclerView
(
mLists
[
tab
.
getPosition
()]);
VLCApplication
.
getSettings
()
.
edit
().
putInt
(
Constants
.
KEY_AUDIO_CURRENT_TAB
,
tab
.
getPosition
()).
apply
();
mSettings
.
edit
().
putInt
(
Constants
.
KEY_AUDIO_CURRENT_TAB
,
tab
.
getPosition
()).
apply
();
}
@Override
...
...
@@ -607,7 +609,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
VLCApplication
.
runBackground
(
new
Runnable
()
{
@Override
public
void
run
()
{
final
List
<
MediaLibraryItem
>
artists
=
Util
.
arrayToMediaArrayList
(
mMediaLibrary
.
getArtists
(
VLCApplication
.
getSettings
()
.
getBoolean
(
Constants
.
KEY_ARTISTS_SHOW_ALL
,
false
)));
final
List
<
MediaLibraryItem
>
artists
=
Util
.
arrayToMediaArrayList
(
mMediaLibrary
.
getArtists
(
mSettings
.
getBoolean
(
Constants
.
KEY_ARTISTS_SHOW_ALL
,
false
)));
VLCApplication
.
runOnMainThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment