Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Remove Status Bar

$
0
0

I'm trying to remove the status bar when my application is running on Android 4.0.4.

The code I'm using is the one below:

`

    public void LightsOut(View view)

    {

        try

        {

            IntPtr view_setSystemUiVisibility = JNIEnv.GetMethodID(view.Class.Handle, "setSystemUiVisibility", "(I)V");

            JNIEnv.CallVoidMethod(view.Handle, view_setSystemUiVisibility, new JValue(1));

        }

        catch

        { }

    }

`

But it's not working. I'm calling it using the VideoView: "LightsOut(videoView);"

I found an reply saying to:

"Figure out why LightsOn() is being invoked and try to work around it (call LightsOut() within every Activity.OnCreate() method?).">

But it didn't solve the problem.

Can someone please help me?

Thank you.

Regards,

Igor Guerra


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>