Keyboard hides soft buttons (back, home, recent buttons) - 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?

Related

How to hide navigation bar when edittext is focused in immersive mode

I am developing a single-use device with Android. HW has a full keyboard but no main keys (Back, Home, Overview).
Some of the app should be working in immersive mode and they contain EditText fields.
When the app is in immersive mode (I used Lock Task Mode), if I select EditText field, a black bar with the same size of the navigation bar, pops up from the bottom.
I cannot set qemu.hw.mainkeys=1 because it removes nav bar completely but I need it for some other apps.
Is there any way I can hide it for EditText in just some cases?
I have access to a full AOSP source.
You can't, Android does not allow you to focus an EditText without showing the Navigation Bar. (except if you are using an external keyboard)
Probably because some people don't know how to unfocus it and need to press the back button.

Clicking on soft home button in navigation bar also triggers underlying click listener for a view

Some newer Android devices have removed the hard Home Button and replaced it with a soft pop up navigation bar at the bottom of the screen that appears when the user swipes up. I've found that the Home Button can also be accessed by hard pressing (not just long clicking, kind of like iOS force touch) the area where the Home Button would appear if navigation bar is visible. This action triggers an onClick event within the current application before navigating to the device home screen. How can I prevent the onClick event within the application?
You can see in the image below how the navigation bar Home Button overlays the app button. Thanks for any help, I feel like i'm missing something really obvious.

Edittext selection menu and soft keyboard

In my activity, I have a multiline EditText that takes a big space on the screen. When I click on it, I enter the edit mode and the soft keyboard shows up. So far so good
Now I want to select the text. So I long press on it, and the selection handles appear. The problem is that when I select multiple lines, the whole layout of the activity will be pushed up to be able to see the selection above the keyboard. But it also pushes up the selection menu that allows to interact with the selection (like Copy, Search, etc.), so the selection is useless!
So best solution would be to make sure the menu stays visible, alternative solution would be to hide the keyboard when selection happens so that nothing is being pushed up.!
As you can see on the screenshot, the menu is almost gone because the selection is right on top of the keyboard, but without the keyboard it should appear just fine

Detect device has not permanent back button

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.

Android 4.0+ software back button style

I have handled back button to close activity instead of hiding keyboard. It works just fine.
But if device has no hardware buttons software button will show hide keyboard (arrow down instead of back) image when keyboard is open. Of course clicking that down ("back") does close my activity.
This is what i have:
This is what i would like to have instead:
Is it possible to force software back button look like back button (instead of close keyboard) when keyboard is opened?

Categories

Resources