How do I stop Android's On-Screen Keyboard to keep me awake at night?

0 favourites
  • 9 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hello guys,

    I only found very spare results when looking for fellows with the same problem :(

    The Android On-Screen Keyboard does not like my "scale outer" full-screen mode. Used when focusing a Text Input Field.

    How it should look (scale):

    IOS

    How Android scales to fit the whole height of the game, which I don't want:

    ANDROID

    when the native back button is used, the Android phone does this:

    Anybody else who runs into that kind of issue?

    Any help or advice is greatly appreciated!!!

    Have a great week everyone!

    Best,

    Chris

  • I haven't tried it, but you can zoom-in the layout when keyboard is open, and zoom-out, when it closes. For example, save ViewportHeight on start of the layout in a variable. And then when it suddenly becomes much smaller, you can assume that the keyboard is on the screen, so you can change layout scale to (OldViewportHeight/NewViewportHeight).

  • uuuh dop2000, very outside the box thinking :) I like that. First I thought this will never work for "android only" / still work for IOS but I think its worth a try!

    I'll let you know of the outcome.

    Have a great day!

  • I gave it a try:

    dropbox.com/s/1996k09wn6j8oy8/MobileKeyboardTest.c3p

    Seems to work, but only in Scale Outer mode, and may require more work for proper scrolling etc.

  • dop2000 thank you soo much for putting that together! I very much appreciate this commitment to help =O

    I will post a quick summarizing report of my findings as soon as I can.

    But so far, thank you :)

  • Hello dop2000!

    Thanks again for your help!!!

    I tried using the scaling. But it is really hard to control on multiple devices and ratios etc.

    But I was able to get a reliable result (a little bit brute-forcing it) by resizing my input UI on every tick the Input Mode is active. This is due to the fact that especially Android is "readjusting" the app on multiple occasions (when opening the keyboard, sometimes when the input field is focused, etc.)

    I feel ok doing so because everything else in this mode is not really performance heavy - it gave me the most reliable results.

    I will post a screenshot from my code, but it won't be very representative. It just shows my responsive scaling:

    But here is how it looks on IOS

    vs Anroid

    I will most likely share the whole file once the app is finished and maybe do quick tutorials on certain aspects of the project if people are interested in it.

    Good night everybody ;)

    Best,

    Chris

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Create your own keyboard in the game and no need to worry about any of this

  • Hiho BadMario,

    thanks for your input ... pun intended :D

    That is true indeed. But

    1. only if I also create my own "Text Input field" as well (supporting scroll and break and all that stuff) and

    2. most importantly: I think all users of this target audience at least prefer to use their own familiar OS's keyboard. Imagine WhatsApp had its own keyboard.

    3. And since I got it working, I don't have to worry about it anymore too.

    Have you had good experiences building your own on-screen keyboard?

    I'm stoked to learn more!

    Have a great day,

    Chris

  • Have you had good experiences building your own on-screen keyboard?

    Here is a nice tutorial:

    construct.net/en/tutorials/mobile-keyboard-and-hall-of-fame-for-all-mobile-devices-738

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)