Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Hiding Navigation and Status bar when button or spinner is clicked

Xammy10Xammy10 Member ✭✭✭

I'm using this code to hind the navigation and status bar of my appplication:

var uiOpTions =
                    SystemUiFlags.HideNavigation |
                    SystemUiFlags.LayoutHideNavigation |
                    SystemUiFlags.LayoutFullscreen |
                    SystemUiFlags.Fullscreen |
                    SystemUiFlags.LayoutStable |
                    SystemUiFlags.ImmersiveSticky;
            Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOpTions;

its working, but when I click button or spinner, the navigation and status bar will appear again.
I also try putting this code on my event handler but it will only work when I already picked an item on a spinner.

My question is, how to ignore the clicks, so the focus wont change but the event will still run.
Or if you have any codes on how to hide the navigation and status bar, pls share it to :)

Thanks in advance :)

Answers

  • seanydaseanyda GBMember ✭✭✭✭✭

    I had this issue too, I don't think the StatusBarVisibility is made to be hidden completely, I utilise hiding it when I don't want the users so have access to the software buttons (for example taking a photo in my app), but as soon as an alert is available or Picker is in focus the buttons return.

    You could attempt to call hiding it again or just do what I do is as soon as the Picker or Alert is back out of focus, change the visibility to hidden again.

  • Xammy10Xammy10 Member ✭✭✭

    @seanyda said:
    I had this issue too, I don't think the StatusBarVisibility is made to be hidden completely, I utilise hiding it when I don't want the users so have access to the software buttons (for example taking a photo in my app), but as soon as an alert is available or Picker is in focus the buttons return.

    You could attempt to call hiding it again or just do what I do is as soon as the Picker or Alert is back out of focus, change the visibility to hidden again.

    I don't want user to see it because I'm gonna use it for an application in a kiosk, and it will be displayed so software buttons and status bar should be hidden

Sign In or Register to comment.