I am going to implement a form with jetpack compose and I used a TextField to get the user's mobile number. In order to show the keyboard I used keyboard type NumberPassword
inside the TextField:
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.NumberPassword).
The problem is in widescreen devices the keyboard elements don't cover all widths of the screen and there is padding at the start and end of the keyboard. How can I remove these empty spaces?
The keyboard's view (and its width) is controlled by the keyboard app that is installed on the device (and it will be full-screen if that app is drawing it that way).
Related
I'm building a chat interface and I'm curious how apps like Telegram and iMessage achieve the following:
There's an always-on input bar that stays above the keyboard (or at the bottom of the screen if there's no keyboard). This is most likely a UIInputAccessoryView, and I've got this implemented.
There's a sticker button on the bar that, when tapped, dismisses the keyboard AND keeps the input bar in-place AND reveals another view under it that is some other view (containing stickers, etc.) The input bar basically doesn't move at all. The animation is exactly like the keyboard going away, revealing the view that appears to have always been there.
If the keyboard is hidden, tapping on the sticker button does the same as 2. What's really cool is that the sticker view is always the same height as the keyboard - and note that keyboards of different languages can be of different height (autocomplete bar), and at least in Telegram's case it can always find the right height.
Any pointer to how to achieve this is appreciated!
I have a Textview that's covered partially by the keyboard when it shows. As a result, the text which entered into the space covered by the keyboard can not be seen as it is typed.
How do I make the TextView scroll up when the entered text reached the space covered by the keyboard?
I have scroll enabled on the TextView but since all the text is visible on the screen , the vertical scroll bar is not visible. Can I have the vertical scroll bar visible at all time event when editing?
Best solution use IQKeyboardManager
library.
IQKeyboardManager works on all orientations, and with the toolbar.
There are also nice optional features allowing you to customize the
distance from the text field, add the next/previous done button as a
keyboard UIToolbar, play sounds when the user navigations through the
form and more.
I am putting together a custom keyboard for practice, and I am trying to give the keyboard buttons a greater touch area like they have with the default iOS keyboard.
The image below shows the keyboard buttons and the extended touch area that I want to add:
I have already tried adding contentEdgeInsets but the padding that it creates is not touchable, and it also messes up the alignment of the button labels since the buttons are not images.
Is it possible to display only the part of the keyboard in iOS 7? For example, I would like to display the keyboard, but I do not want the space bar visible. How would I add the keyboard to display the portion of the keyboard above the space bar?
Research has confirmed that it is not possible to adjust the frame of the keyboard.
I have a login screen with some textfields, textboxs, buttons and having the background image to the screen. Now the issue is on touch devices when virtual keyboard is popups, the screen shrinks with its background image and all components alignment get disturbed. I have also enabled the Vertical scroll to the screen but still alignment get disturbed. Please can one help me to sort out this issue.
Thanks,
I guess, you are using Display.getHeight() for the alignment of UI component. And after displaying virtual keyboard, Display.getHeight() not return the actual screen height. It's return the height excluding the keyboard height.