I will post an answer here for others with the same problem, as I eventually figured out a method that works.
In the onCreate () method, if you set any specific window flags (FEATURE_NO_TITLE, FLAG_FULLSCREEN, FLAG_KEEP_SCREEN_ON, etc.), then before you call super.onCreate () (or they will be ignored). Then, wherever you usually mark this:
setContentView( whatever );
Do this instead:
getWindow().takeSurface( null ); getWindow().setContentView( whatever );
This is the main way to get content to be controlled by Java. Anywhere in your code where you work with content, use getWindow () instead of this.
Some other things to keep in mind are that the normal onKey and onTouch methods will not be called (they will have their own equivalents instead), so if you need to process input on the Java side, you will need to configure some JNI communication for sending information from native to Java. I believe that everything else is included in the official sample of the XPeria Play-style iPad example (additions to AndroidManifest.xml and something is wrong).
If you want to see my project for reference, it is open source and can be found at:
http://www.paulscode.com/forum/index.php?topic=75.msg1540#msg1540
Just click the “Source Code” link next to “XPEA Play Touch Touch Pad”. Perhaps this is not so useful for you, because it is a rather large project, and it may be difficult for you to find what you are looking for. If you have any problems, send a question to my forum or write me, and I will be happy to help.
paulscode
source share