Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Black bar is showing at the bottom of the screen while connecting the external keyboard. #15816

Open
SanthiyaArulsamy opened this issue Sep 12, 2023 · 10 comments

Comments

@SanthiyaArulsamy
Copy link

Description

Black bar is showing at the bottom of the screen while connecting the external keyboard.

Not entry bottom line i am mentioning the screen bottom.

Steps to Reproduce

  1. Add an entry control.
  2. Connect the NKE keyboard to the device.
  3. Focus the entry. Now the black bar is showing at the bottom of the device

Expected Behavior

Black bar should not be shown while connecting the hardware keyboard.

Actual Behavior

Black bar should not be shown while connecting the hardware keyboard.

Hint
This not occurred in Android 9 it is only from Android 10.

Basic Information

Version with issue: 5.0.0.2012
Affected Devices: Android 10( ALMEX device)
Environment
Show/Hide Visual Studio info

Screenshots

Before focusing the entry
image

After focusing the entry.
image

Reproduction Link

Keyboard_BlackBar.zip

Workaround

It will be work in Android 9.

@SanthiyaArulsamy SanthiyaArulsamy added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 12, 2023
@MitchBomcanhao
Copy link

@SanthiyaArulsamy
Copy link
Author

No. It is different. #15812. I am facing the issue while focusing the entry there is black bar is showing bottom of the screen. Please check the screenshot. They wrongly mentioned in the entry. The issue not from the entry control it is from connecting the keyboard. Whenever I focusing the entry from the external keyboard there is a black screen is appearing in the bottom of the screen.

@MitchBomcanhao
Copy link

no, they're the exact same bug, with the same title, same description, same steps to reproduce, same screenshots, same repro project link, everything is the same.

@SanthiyaArulsamy
Copy link
Author

Yes. I just created the same. Previously, my actual issue not addressed so created the same in another ticket. I want the solution or workaround for black screen issue at the bottom of the screen.

@SanthiyaArulsamy
Copy link
Author

Can anyone help me on this?

@Domik234
Copy link

Hey, isn't this just a virtual keyboard without input buttons? I believe that you can try to hide keyboard or look at device settings for an option to disable it.

I believe that this might help or at least is great place to start (SO - Hide keyboard when entry is focused in XF | SO - Hide the android soft keyboard programmatically), but you will propably need to create Android Renderer (base class Entry/EntryRenderer). Just remember to only hide, focus will be still required for input.

May be relevant too:
GadgetHacks.com
MS - XF Entry Custom Renderer

@jfversluis
Copy link
Member

Sorry, it seems I misunderstood your initial issue.

You might want to try playing with this: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/soft-keyboard-input-mode

Or as @Domik234 pointed out, a setting on Android might be at play here as well. When you search for "Android keyboard black bar bottom" there are a lot of hits that also seem to specifically mention Android 10.

@jfversluis jfversluis added p/Android t/question and removed t/bug 🐛 s/unverified New report that has yet to be verified labels Sep 14, 2023
@SanthiyaArulsamy
Copy link
Author

Hi @jfversluis @Domik234 It is working while focusing the entry but keyboard again showing while start typing.

@SanthiyaArulsamy
Copy link
Author

Can you provide any workaround for this?

@Domik234
Copy link

I tried to figure it out universally but this is OS specific behaviour. I believe that there is no chance that Microsoft/Xamarin/MAUI Team can help you to override this but maybe you are.

I was able to hide it using the code until making a change - every change (character, space, etc..) pushed it up for a while (because of repeatedly calling to hide) but only tested on emulator devices. When I tried to use "InputType -> None" then there was no cursor but the black bar was hidden and I was able to enter text. ¯\(ツ)

Your device and peripherals can act differently so there is need of experimenting on your specific device. Many manufacturers are manipulating with the code of specific functions and then it breaks or acts differently than on the origin purpose.
(Example: Sony had problem like 6 years back with usage of camera without flashlight permission. All phones that I've tried worked perfectly without flashlight permission but that one specific showed only colored bars. After adding the flashlight permission all worked also on this specific device.)

I see only 4 ways (better to say ideas) how to solve this:

  1. There may be option in the OS settings to solve this problem.
    https://www.reddit.com/r/oneplus/comments/d6soda/tip_hiding_black_bar_under_keyboard/
  2. Use adb for hiding as here on OnePlus device
    https://www.youtube.com/watch?v=d9sM8ND5oNM&ab_channel=VelianSpeaksTech
  3. Try different keyboard for Android - The bar can be relevant to the keyboard that your OS uses.
    https://www.guidingtech.com/19202/hide-on-screen-keyboard-android-external/
  4. More experiments with calling to native hide / blocking the keyboard and relevant. If you find solution for Java/Kotlin then it will on 99% work on Xamarin exactly the same.
    (I know only one case for encryption classes where .NET/JNI uses different class that breaks functionality but that is completely different topic and also different GIT repo)

I'm not sure how you feel about this situation @jfversluis but I believe that without connection to the .NET, Xamarin (Forms) or MAUI we are not able to help more and this issue can be closed.
There is many people that are trying to solve these (and many different) problems and the best way of what I found was to use StackOverflow or Discord channels that are focusing on these topics (Android?).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants