Merge "VV2 & MCV2: Move handling MediaControlView2 visibility logic to VV2"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d11dc140bc
@@ -49,9 +49,8 @@ import java.lang.annotation.RetentionPolicy;
|
||||
* There is no separate method that handles the show/hide behavior for MediaControlView2. Instead,
|
||||
* one can directly change the visibility of this view by calling View.setVisibility(int). The
|
||||
* values supported are View.VISIBLE and View.GONE.
|
||||
* In addition, the following customizations are supported:
|
||||
* 1. Modify default timeout value of 2 seconds by calling setTimeout(long).
|
||||
* 2. Set focus to the play/pause button by calling requestPlayButtonFocus().
|
||||
* In addition, the following customization is supported:
|
||||
* Set focus to the play/pause button by calling requestPlayButtonFocus().
|
||||
*
|
||||
* <p>
|
||||
* It is also possible to add custom buttons with custom icons and actions inside MediaControlView2.
|
||||
@@ -200,23 +199,6 @@ public class MediaControlView2 extends ViewGroupHelper<MediaControlView2Provider
|
||||
mProvider.requestPlayButtonFocus_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new timeout value (in milliseconds) for showing MediaControlView2. The default value
|
||||
* is set as 2 seconds.
|
||||
* @param timeout the
|
||||
*/
|
||||
public void setTimeout(long timeout) {
|
||||
mProvider.setTimeout_impl(timeout);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves current timeout value (in milliseconds) for showing MediaControlView2. The default
|
||||
* value is set as 2 seconds.
|
||||
*/
|
||||
public long getTimeout() {
|
||||
return mProvider.getTimeout_impl();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
mProvider.onLayout_impl(changed, l, t, r, b);
|
||||
|
||||
@@ -152,9 +152,10 @@ public class VideoView2 extends ViewGroupHelper<VideoView2Provider> {
|
||||
* instance if any.
|
||||
*
|
||||
* @param mediaControlView a media control view2 instance.
|
||||
* @param intervalMs a time interval in milliseconds until VideoView2 hides MediaControlView2.
|
||||
*/
|
||||
public void setMediaControlView2(MediaControlView2 mediaControlView) {
|
||||
mProvider.setMediaControlView2_impl(mediaControlView);
|
||||
public void setMediaControlView2(MediaControlView2 mediaControlView, long intervalMs) {
|
||||
mProvider.setMediaControlView2_impl(mediaControlView, intervalMs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user