Comments (11)
The problem is in your AS3 code: you need to change the displayState to normal before calling immersiveMode().
from air-ane-fullscreen.
When i said i tried everything in as3 i also thought about it. I tried this code also:
if (AndroidFullScreen.isImmersiveModeSupported) {
stage.displayState = StageDisplayState.NORMAL;
scW = AndroidFullScreen.immersiveWidth;
scH = AndroidFullScreen.immersiveHeight;
AndroidFullScreen.immersiveMode();
NativeApplication.nativeApplication.addEventListener(AndroidFullScreen.ANDROID_WINDOW_FOCUS_IN, onFocusIn);
} else {
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
scW = stage.fullScreenWidth;
scH = stage.fullScreenHeight;
}
If i place a debugger break-point on immersiveMode() call the stripe disappears...
from air-ane-fullscreen.
This issue has been discussed several times in previous issues and the easiest way to prevent it is to ensure that you set <fullScreen>false</fullScreen>
in your app.xml
and use:
if (!AndroidFullScreen.immersiveMode())
{
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
// full screen code
}
else
{
// immersive mode code
}
The code above won't work if you're starting your app with <fullScreen>true</fullScreen>
in app.xml
because changing stage.displayState
doesn't take effect immediately; it takes ~1 frame, meaning it the display state hasn't actually changed when you call immersiveMode()
.
from air-ane-fullscreen.
Dude, the fullScreen is set to false in the xml (as i stated in my first post).
Your code does not work either... :(
I even tried adding a 5 second timeout after the stage.displayState is set and then call immersiveMode...
Reverted to this commit 0e18f9c (the one before your 1.3.0 release) and it all works fine!
from air-ane-fullscreen.
Can you watch the output from your app via DDMS using Eclipse or Android Studio and let me know if you see any errors?
from air-ane-fullscreen.
I have access to this device only at night :)
The first thing i checked is for errors ... well there aren't any
It seems my hypothesis is right. I have commented this block
window.clearFlags
(
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
| WindowManager.LayoutParams.FLAG_FULLSCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
);
Now everything is working correctly, at least for me...
Excuse me for my ignorance, but why do you need it?
I am forking and pushing my setup here: https://github.com/wastedabuser/air-fullscreen-ane. I have also added a build.xml for quick command line ant build.
from air-ane-fullscreen.
The clearFlags
call is used to ensure the UI is reset correctly when switching between various modes, but if it's causing issues with Samsung devices, I'll revise/move it and add in your build script.
from air-ane-fullscreen.
Well i guess there should be a flag that bypasses the initial call of the resetUi
. I guess you don't need to call resetUI
when calling immersiveMode
for the first time (my tests confirm this also).
Something like:
public void resetUi()
{
if (!allowResetUi){
allowResetUi = true;
return;
}
final View decorView = getDecorView();
final Window window = getWindow();
decorView.setOnFocusChangeListener(getOnFocusChangeListener());
decorView.setOnSystemUiVisibilityChangeListener(null);
window.clearFlags
(
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
| WindowManager.LayoutParams.FLAG_FULLSCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
);
init();
setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
}
Anyway, thank you for your work!
Regards,
from air-ane-fullscreen.
Removing clearFlags
caused problems with showSystemUI
, so I've moved the code around and it looks like it's working as expected on a couple of test devices here. I've also added in your ant script.
Can you give pre-release 1.3.3 a try on your Neo and let me know if it resolves the issues?
from air-ane-fullscreen.
Yes, it works properly on all my devices now!
Thanks!
from air-ane-fullscreen.
:-)
from air-ane-fullscreen.
Related Issues (20)
- I see black strip on my Nexus 5 Android 6 HOT 28
- Some devices crash HOT 8
- Crash on Nexus 7 HOT 1
- Error #3500: The extension context does not have a method with the name init. HOT 11
- Version 1.3.3 works, version 1.4.3 doesn't work for me HOT 7
- Remove navbar while keep transparent topbar. HOT 6
- Event for displaying system UI in immersive mode HOT 5
- ContextLoss on touch HOT 10
- This ANE is now deprecated HOT 21
- Version 1.5.0 quits right after launch HOT 13
- Viewport size incorrect on Simulator HOT 13
- Adobe Air 64 bit support for Android HOT 3
- Xiaomi Note 7 with Android 9 - still black bands on top and bottom HOT 2
- I couldn't open my application with 64 bit.
- does this ane support google 64 bit requirement? HOT 1
- You can give a simple example about this explanation. HOT 2
- Can this ANE fix black bar caused by the notch/cutout? HOT 5
- Seeing black area in system ui
- Android 11 not supported
- Can you show an example of how to use it with the Starling framework? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air-ane-fullscreen.