fix fullscreen button on popup
This commit is contained in:
parent
ec8fff421a
commit
9f5d4034e3
3 changed files with 17 additions and 1 deletions
|
@ -44,6 +44,7 @@ import android.view.Gravity;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageButton;
|
||||||
import android.widget.PopupMenu;
|
import android.widget.PopupMenu;
|
||||||
import android.widget.RemoteViews;
|
import android.widget.RemoteViews;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
|
@ -401,6 +402,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
|
|
||||||
protected class VideoPlayerImpl extends VideoPlayer {
|
protected class VideoPlayerImpl extends VideoPlayer {
|
||||||
private TextView resizingIndicator;
|
private TextView resizingIndicator;
|
||||||
|
private ImageButton fullScreenButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleIntent(Intent intent) {
|
public void handleIntent(Intent intent) {
|
||||||
|
@ -418,6 +420,13 @@ public final class PopupVideoPlayer extends Service {
|
||||||
public void initViews(View rootView) {
|
public void initViews(View rootView) {
|
||||||
super.initViews(rootView);
|
super.initViews(rootView);
|
||||||
resizingIndicator = rootView.findViewById(R.id.resizing_indicator);
|
resizingIndicator = rootView.findViewById(R.id.resizing_indicator);
|
||||||
|
fullScreenButton = rootView.findViewById(R.id.fullScreenButton);
|
||||||
|
fullScreenButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
onFullScreenButtonClicked();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -75,7 +75,13 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
||||||
* @author mauriciocolli
|
* @author mauriciocolli
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"WeakerAccess", "unused"})
|
@SuppressWarnings({"WeakerAccess", "unused"})
|
||||||
public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.VideoListener, SeekBar.OnSeekBarChangeListener, View.OnClickListener, Player.EventListener, PopupMenu.OnMenuItemClickListener, PopupMenu.OnDismissListener {
|
public abstract class VideoPlayer extends BasePlayer
|
||||||
|
implements SimpleExoPlayer.VideoListener,
|
||||||
|
SeekBar.OnSeekBarChangeListener,
|
||||||
|
View.OnClickListener,
|
||||||
|
Player.EventListener,
|
||||||
|
PopupMenu.OnMenuItemClickListener,
|
||||||
|
PopupMenu.OnDismissListener {
|
||||||
public static final boolean DEBUG = BasePlayer.DEBUG;
|
public static final boolean DEBUG = BasePlayer.DEBUG;
|
||||||
public final String TAG;
|
public final String TAG;
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:background="#00ffffff"
|
android:background="#00ffffff"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/ic_fullscreen_white"
|
android:src="@drawable/ic_fullscreen_white"
|
||||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||||
|
|
Loading…
Reference in a new issue