Fix full screen
This commit is contained in:
parent
34ed36f9ae
commit
92a0af8b36
|
@ -28,9 +28,9 @@ import android.graphics.drawable.Drawable;
|
|||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -781,7 +781,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
@Override
|
||||
public void onConfigurationChanged(@NotNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
Log.v(Helper.TAG,"onConfigurationChanged: " + newConfig.orientation);
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (mode != Helper.VIDEO_MODE_WEBVIEW) {
|
||||
openFullscreenDialog();
|
||||
|
@ -1007,6 +1006,10 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
}else {
|
||||
closeFullscreenDialog();
|
||||
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR), 2000);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue