I'm customizing my app to provide a better experience with the Kindle Fire.
in this device, if you do in your Activity
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
the soft bar with the back, home and setting buttons disappear, and only appear when the user presses the "fullscreen handle" the soft button bar is back on screen.
https://developer.amazon.com/sdk/fire/screen-layout.html#StatusSoft
I want to detect devices that have this behaviour, this is, devices that have not a physical back button or a permanent back soft button, so I could set up the window differently in these cases.
I'd like to do it programmatically, and avoid having to declare a config property (and thus maintaining more than one apk).
Thanks.
Related
I have a very simple UI that has one entry control to enter phone number and a button. The entry control has a handler for removing border around it. When the entry control got focus, keyboard pops up. But when I try to tap outside the entry control such as on the screen empty area, the keyboard does not dismiss and the entry control does not lose focus. Also since the button is at the bottom of the screen, therefore, the soft keyboard hides it and there is no way to tap the button. The button can only be tapped if I press the Android device back button.
At present, I have not checked this behavior on an iOS device.
This was not a problem in Xamarin Forms though. I searched a lot on Internet and found that it is currently a bug in MAUI.
I tried to attach a tap gesture on the parent layout control and invoked platform-specific code to hide the keyboard but it seems the entry does not lose focus and in turn the tap gesture event is never called.
However, the entry control should lose focus automatically when I tap outside the entry control (such as on the screen) and the soft keyboard should automatically dismiss.
Please provide a workaround if there is any.
Known bug. Removing the focus sometimes helps. Sometimes you need to do Disable/Enable in sequence. (I go with the second).
If you want, you can read this for example:
https://github.com/dotnet/maui/issues/12002
(Most disturbing part, considering this is know bug for half year+)
We can leave the behavior how this is for now in NET7 and provide an
API in NET8 that lets users toggle this behavior on/off for iOS and
Android
I've written a sidebar app that is always available and draws directly to the window. If the user has a phone without hardware buttons and he starts typing into an EditText the button bar (that is part of the display because of the missing hardware buttons) with the back/home/recent buttons is hidden.
How can I prevent that?
I'm working on a lockscreen widget(not trying to be specific here, but Nexus 7 ) . The widget has a button which would trigger an activity.When the user clicks the button, the unlock slide symbol get's highlighted hinting the user has to slide-unlock his screen before he wants to see the button's activity. Since now, the device is locked,is there a way to bypass this and just display the activity on top of the lock screen? (not in the case of pin/pattern obviously, but only just slide)
Was searching a lot for a way to do it. We need to use flags in while giving an intent to the widget button. More information here.
Android Lock Screen Widget
On a phone without hardware buttons, the soft keys bar looks like:
In some app (e.g. the browser), the soft keys bar is minimized and more screen space is available:
How can this be done?
Set your theme to be fullscreen, then build the controls yourself. The Up/Down arrow toggles the fullscreen mode.
I don't think it's a good idea to try to hide that bar, even if this could be done on some devices. It's obvious on most devices these keys are more like hardward key even accept touch input.
Hello,
I need do fullscreen in android 4.0 (I must hide back button, home...)
I used android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
but it doesn't work.
Homebutton and backbutton cannot be hidden...
Users always need to have access to these buttons, so the black bar will always be on the screen
Like write K_Anas in a relative question, it is not possible hide Homebutton and backbutton in Android 4.0, for security reasons and because is a simply anti-pattern solution.
You can use SYSTEM_UI_FLAG_HIDE_NAVIGATION to hide the system navigation temporarily, but it will always reappear when the user touches the screen. Even the notification bar will reappear when the screen is touched.
You are not allowed to hide the system bar with the home button completely for security reasons.