We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I'm trying to hide the navigation bar when my app is running in Processing for Android. What I mean is the Back, Home and App Switcher icons that appears at the bottom of the Android device. I have tried several methods found on the web but none have worked. Running on latest android 4.4.2.
Any suggestions will be greatly appreciated.
Answers
Have you read the Android Developers lesson about this? If this is what you have tried, then please define "none have worked" more concretely. You probably need to import some of the native Android classes and place the code in
onCreate()
.I have tried this code found in the old Processing forum, it will crash when the app tries to launch.
I am not sure how to implement the example given by Google into my Processing for Android app: https://developer.android.com/training/system-ui/immersive.html
If there's a working example of hiding the navigation in Android for Processing, it will be very helpful.
I have been digging into this and it appears that API 11+ is required; I have not been able to successfully import the compatibility library v7. Anybody had luck with this? It would be very nice to use full screen mode.
--- it s rather simple to hide/show the action bar with P5 --- its (for the moment) impossible (i think!) to hide the navigation bar because immersive sticky mode requires KitKat (API 19) at least. Using the code below shows that; also looking at the very beginning of the compiler message in the console ("Project Target: Android 2.3.3 API level: 10 WARNING: Attribute minSdkVersion in AndroidManifest.xml (19) is higher than the project target API level (10))
the code:
hi akenaton, thanks for your post, I just tested your code, but it did not work. I'm using eclipse to compile and testing on Nexus 4 (phone) and 7 (tablet).
Is your code tested?
Tested with processing and sonyXperia Z: hiding the action bar runs; but of course (see my post) hiding the navigation bar does not run. Tested with eclipse, build project 20, minSdk19, same device but in native android code... Are you using eclipse + processing? - if true i think that the code will not run, for the same reasons. You can look to the java code source for android processing: build project is hard coded for 2.3 gingerbread....
Hi there
I don't know if it is relevant to post my question here, considering the dates of the topic, but lets try
Using the code I found here, I get the immersive mode working with both the action bar and the navigation bar hiding properly
Now the problem is that my Processing canvas is not really full-screen, the space being left void by the navigation bar moving away is left blank
Any Idea on how to take the whole screen ? Or is it impossible due to the fact that Processing is stuck to gingerbread ?
EDIT: I got it to work : ]
In the activity_main xml, I did switch android:fitsSystemWindows to "false"
And now when I run my app, the sketch is really fullscreen