[mono-android] Honeycomb 3.1 / Mono for Android persist 'LightsOut'
thenextman
richard at ayudasystems.com
Mon Feb 27 21:00:27 UTC 2012
Cross post of my SO question here:
http://stackoverflow.com/questions/9472185/honeycomb-3-1-mono-for-android-persist-lightsout
(I hope that is acceptable...)
I developed my app using Mono for Android. I have the latest version 4.0.3.
My AndroidManifest.xml specifies:
<uses-sdk android:targetSdkVersion="11" android:minSdkVersion="8" />
The app runs on tablets, so in Honeycomb I need to hide the status bar at
the bottom of the screen. This is how I do that (with a simple extension
method):
internal static void LightsOut(this View view)
{
try
{
IntPtr view_setSystemUiVisibility =
JNIEnv.GetMethodID(view.Class.Handle, "setSystemUiVisibility", "(I)V");
JNIEnv.CallVoidMethod(view.Handle,
view_setSystemUiVisibility, new JValue(1));
}
catch
{ }
}
I call this on every view that I instantiate. On my Motorola Xoom, running
3.0.1, this works great.
On my Samsung Galaxy Tab running 3.1, it works; but the status bar comes
back after some short period of time. In the Android Log I see that
LightsOn() is getting called...
How can I prevent the status bar from coming back in 3.1? I saw this event:
http://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener.html
And thought I could use it to hide the status bar, if it comes back. But I
don't see how I can subscribe to it (it doesn't show in Intellisense).
Thanks in advance for any help.
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Honeycomb-3-1-Mono-for-Android-persist-LightsOut-tp5520050p5520050.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list