android-fullscreen

Android Activity using navigation view in full screen mode shows at the bottom a grey translucent area

不想你离开。 提交于 2019-12-12 03:02:28
问题 I have an activity which is using the following method to enable fullscreen mode. protected void hideSystemUI() { View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } In this activity I am also using the NavigationView and when the

Android. Hiding navigation bar sometimes fails

泄露秘密 提交于 2019-12-11 11:08:31
问题 The code below intended to toggle navigation bar visibility every time user clicks on screen. And it works fine except one scenario - very fast tap on screen. In some cases, when user clicks really fast, navigation bar stays on screen despite onClick event triggered. Here is the code of MainActivity : package com.example.ui_test; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android

onBackPressed function not working under IMMERSIVE STICKY mode

吃可爱长大的小学妹 提交于 2019-12-11 02:45:37
问题 I'm using Immersive Mode for an activity with videoView inside. My goal is when touch on screen, the media controller and the system control bar show or disappear together. Everything works fine now. The problem is I can't leave activity properly. When I press the back button once, the system bar just hide again and nothing happens. I have to press twice to exit the activity. I don't know why. Here's my code. I use an FullScreenActivity() activity to define IMMERSIVE MODE: @TargetApi(Build

How to exit fullscreen (show Action Bar) programmatically on Android 4.0+?

喜你入骨 提交于 2019-12-10 23:41:44
问题 If I have an Activity with a fullscreen theme , set up like this: <activity android:name=".FullscreenActivity" android:theme="@style/MyTheme.FullScreen"/> With MyTheme.FullScreen defined as: <style name="MyTheme.FullScreen" parent="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"> </style> ... is it possible to exit fullscreen mode programmatically ? I specifically want to show the Action Bar (with its navigation options) in certain situations, while usually having the activity in

Immersive like feature in JB and ICS

无人久伴 提交于 2019-12-10 15:52:52
问题 I am developing an Application where I need to go completely full screen. In kitkat its very easy by using Immersive tag. But since not all devices support kitkat I need to take JB and ICS (atleast) into consideration. Well although there is a way of hiding navigation bar and status bar in JB and ICS it becomes visible as soon as the user interacts. This certainly does not looks good. It also takes one extra touch. I did a lot of searching on net and was surprised that there is no way we can

Smooth transition between full-screen-activity and one with notification-bar and action bar

怎甘沉沦 提交于 2019-12-10 03:12:22
问题 Background I have an app that has 2 activities : splash activity, which is shown in full screen (no action bar, no notification bar) main activity, which has both action bar (uses actionBarSherlock) and notification bar. The problem For some reason, when going from the first activity to the second, there is a "jumpy" layout process , which shows the content of the second activity without the action bar and notification bar, and a moment later it shows them both. This causes the content below

YouTube Player Support Fragment crashes when user selects to view in full screen

南楼画角 提交于 2019-12-08 09:25:55
问题 I have implemented YouTubePlayerSupportFragment API inside my own fragment instead of in an activity. The video does play normally, but when the user selects to view the video in full screen from YouTube's provided media controls, the app orients to landscape, shows a black loading screen and then immediately crashes. ExpandedItem.layout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res

Youtube video played in WebView shows black screen when taken to fullscreen

孤街醉人 提交于 2019-12-08 02:45:00
问题 Short Version: To play YouTube video, I'm using a WebView like this, webView.loadData("<style> body{margin:0; background-color:black;}div{width:100%; height:100%; background-color:black}iframe{ width:100%; height:100%; border:none; overflow:hidden; }</style><div><iframe src=\"http://www.youtube-nocookie.com/embed/4eO9SS3wvLY?autoplay=1&rel=0&app=youtube_gdata&fs=1" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" webkitallowfullscreen=\"webkitallowfullscreen\"></iframe></div>", "text

Android floating window with hidden statusbar Accessibility problems

ぃ、小莉子 提交于 2019-12-07 19:33:03
问题 I am working on android 4.4.2 building an application with a system overlay/floating window created by an accessibility service. Edit: I want to be able to hide the status bar GLOBALLY (in any app) (made possible by the code below) however when the overlay is shown i stop receiving acessibilityEvents from the listener and the software/hardware back button When the floating view is injected into windowmanager: AccessibilityEvent listener does not receive updates Soft/hardware back key does not

Youtube video played in WebView shows black screen when taken to fullscreen

元气小坏坏 提交于 2019-12-06 14:08:41
Short Version: To play YouTube video, I'm using a WebView like this, webView.loadData("<style> body{margin:0; background-color:black;}div{width:100%; height:100%; background-color:black}iframe{ width:100%; height:100%; border:none; overflow:hidden; }</style><div><iframe src=\"http://www.youtube-nocookie.com/embed/4eO9SS3wvLY?autoplay=1&rel=0&app=youtube_gdata&fs=1" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" webkitallowfullscreen=\"webkitallowfullscreen\"></iframe></div>", "text/html", "utf-8"); Everything works fine except when clicking on [ ] icon to take the video to full screen,