ok, tried this myself and modified
PApplet source, compiled core, made
handler public, overriden
OnCreate, but cant get it working, so far.
i must read more about overriding methods in java, im really a newbie. maybe this is not possible because im trying to override method that already overrides and calls superclass (
http://stackoverflow.com/questions/4595512/java-calling-a-super-method-which-calls-an-overridden-method).
--edit
got it working!!!:) on modified
PApplet, altering few lines of code that allows to switch flag fullscreen from inside processing sketch. im glad that i managed to do it somehow, i will need status bar to be visible in one of my projects:)
and here is how to do it:
1. go to
http://code.google.com/p/processing/wiki/BuildInstructions , get processing source code from svn
2. in PApplet.java (yourLocalCopyOfProcessingRepo/processing/android/core/src/processing/core/PApplet.java) in line 420, just before OnCreate add:
- public boolean FSFLAG = true;
3. again in PApplet.java around line 444 replace
- window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
with:
- if (FSFLAG) window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
4. read link in step 1, compile. its easy. go to yourLocalCopyOfProcessingRepo/processing/android/core/ and type ant in terminal. new file processing-core.zip will land in YourLocalCopyOfProcessingRepo/processing/android/. raname it from .zip to .jar, then copy your new core to your project.
5. in your sketch add this before setup():
- public void onCreate(Bundle savedInstanceState) {
- FSFLAG = false;
- super.onCreate(savedInstanceState);
- };
Thats all, your sketch will run as usual but status bar will be visible all the time.
@tyxiang: if you are in hurry i can send you modified and compiled
processing-core.jar
question to devs - do you think it is reasonable to push this to repo as a feature for those of us who sometimes really needs more native look integration in processing?