android - How to interact with ActionBar from NativeActivity with Java-side window content (Xperia Play)? -


for xperia play prior ics, way input touchpad through nativeactivity (not plain old activity). unfortunately, drawing in nativeactivity, name suggests, done on native-side, not java-side. in order input on native-side graphics on java-side, following must added nativeactivity's oncreate method:

    getwindow().takesurface( null );     getwindow().setcontentview( r.layout.main ); 

and set couple methods through jni receiving touchpad , touchscreen input native-side. can happily draw through android's java api, while still getting touchpad input. works quite xperia play's running pre-ics. adding menus via oncreateoptionsmenu doesn't cause problem.

the problem comes when xperia play running ics. menu has moved action bar. unfortunately, isn't possible interact action bar (pressing 3 dots ignored, , acts i'm pressing surface behind action bar.)

in case makes difference, creating action bar menu options through oncreateoptionsmenu. using window.feature_action_bar_overlay, , making actionbar visible when user presses "back" button (msingleton nativeactivity instance):

msingleton.runonuithread(     new runnable()     {         public void run()         {             if( msingleton.getactionbar().isshowing() )                 msingleton.getactionbar().hide();             else                 msingleton.getactionbar().show();         }     } ); 

this makes action bar visible, mentioned, can't interact it. there way force action bar have focus or something? fact normal menus work fine on pre-ics versions makes me think should possible interact action bar too, since menu of different type.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -