Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
322
Issues
322
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-Android
Commits
3c139f42
Commit
3c139f42
authored
Feb 20, 2017
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persist FAB visibility on rotation
parent
87f817e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
+6
-0
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
+6
-0
No files found.
vlc-android/src/org/videolan/vlc/gui/InfoActivity.java
View file @
3c139f42
...
...
@@ -37,6 +37,7 @@ import java.io.File;
public
class
InfoActivity
extends
AudioPlayerContainerActivity
implements
View
.
OnClickListener
{
public
final
static
String
TAG_ITEM
=
"ML_ITEM"
;
public
final
static
String
TAG_FAB_VISIBILITY
=
"FAB"
;
private
MediaWrapper
mItem
;
private
MediaInfoAdapter
mAdapter
;
...
...
@@ -60,6 +61,8 @@ public class InfoActivity extends AudioPlayerContainerActivity implements View.O
savedInstanceState
.
getParcelable
(
TAG_ITEM
)
:
getIntent
().
getParcelableExtra
(
TAG_ITEM
));
mBinding
.
setItem
(
mItem
);
final
int
fabVisibility
=
savedInstanceState
!=
null
?
savedInstanceState
.
getInt
(
TAG_FAB_VISIBILITY
)
:
-
1
;
mAdapter
=
new
MediaInfoAdapter
(
this
);
mBinding
.
list
.
setAdapter
(
mAdapter
);
...
...
@@ -76,6 +79,8 @@ public class InfoActivity extends AudioPlayerContainerActivity implements View.O
public
void
run
()
{
ViewCompat
.
setNestedScrollingEnabled
(
mBinding
.
container
,
true
);
mBinding
.
appbar
.
setExpanded
(
true
,
true
);
if
(
fabVisibility
!=
-
1
)
mBinding
.
fab
.
setVisibility
(
fabVisibility
);
}
});
}
else
...
...
@@ -102,6 +107,7 @@ public class InfoActivity extends AudioPlayerContainerActivity implements View.O
protected
void
onSaveInstanceState
(
Bundle
outState
)
{
super
.
onSaveInstanceState
(
outState
);
outState
.
putParcelable
(
TAG_ITEM
,
mItem
);
outState
.
putInt
(
TAG_FAB_VISIBILITY
,
mBinding
.
fab
.
getVisibility
());
}
private
void
noCoverFallback
()
{
...
...
vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
View file @
3c139f42
...
...
@@ -72,6 +72,7 @@ import java.util.List;
public
class
PlaylistActivity
extends
AudioPlayerContainerActivity
implements
IEventsHandler
,
ActionMode
.
Callback
,
View
.
OnClickListener
{
public
final
static
String
TAG
=
"VLC/PlaylistActivity"
;
public
final
static
String
TAG_FAB_VISIBILITY
=
"FAB"
;
private
AudioBrowserAdapter
mAdapter
;
private
MediaLibraryItem
mPlaylist
;
...
...
@@ -96,6 +97,8 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
mBinding
.
songs
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mBinding
.
songs
.
setAdapter
(
mAdapter
);
final
int
fabVisibility
=
savedInstanceState
!=
null
?
savedInstanceState
.
getInt
(
TAG_FAB_VISIBILITY
)
:
-
1
;
if
(!
TextUtils
.
isEmpty
(
mPlaylist
.
getArtworkMrl
()))
{
VLCApplication
.
runBackground
(
new
Runnable
()
{
...
...
@@ -108,6 +111,8 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
@Override
public
void
run
()
{
mBinding
.
appbar
.
setExpanded
(
true
,
true
);
if
(
fabVisibility
!=
-
1
)
mBinding
.
fab
.
setVisibility
(
fabVisibility
);
}
});
}
else
...
...
@@ -154,6 +159,7 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
@Override
public
void
onSaveInstanceState
(
Bundle
outState
)
{
outState
.
putParcelable
(
AudioBrowserFragment
.
TAG_ITEM
,
mPlaylist
);
outState
.
putInt
(
TAG_FAB_VISIBILITY
,
mBinding
.
fab
.
getVisibility
());
super
.
onSaveInstanceState
(
outState
);
}
...
...
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