문제

I'm developing an Android app using MonoDroid. I'm developing against a Motorola Xoom running Android 3.0 Honeycomb.

It seems that MonoDroid only binds against Android up to 2.3... Not really a problem, my app still runs great on the tablet.

The issue is: Honeycomb displays a status bar along the bottom of the screen, which I can't work out how to hide (my app is a full screen, 'kiosk')

I see the API to use here: Where is API call to do "lights out mode" in honeycomb?

Unfortunately, it's not available to me in MonoDroid (presumably, because the highest API target I can set is 2.3)

Any way for me to call this function on MonoDroid?

Thank you for any help

도움이 되었습니까?

해결책

You can use Mono for Android's JNI support to invoke methods that aren't currently bound. A quick (and completely untested) "port" to call setSystemUiVisibility:

View v = FindViewById(R.Id.view_id)
IntPtr View_setSystemUiVisibility = JNIEnv.GetMethodID(v.Class.Handle,
        "setSystemUiVisibility", "(I)V");
// from: http://developer.android.com/reference/android/view/View.html#STATUS_BAR_HIDDEN
int STATUS_BAR_HIDDEN = 1;
JNIEnv.CallVoidMethod(v.Handle, View_setSystemUiVisibility,
        new JValue (STATUS_BAR_HIDDEN));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top