I am using Delphi XE 8 to build Android app and I have a form that have two buttons at the bottom like this one
How I make sure these buttons still visible when the virtual keyboard appear and position back to the bottom when the keyboard disappear ?, effect would be like this screen:
Please take a look at Embarcadero example: FMX.Mobile.ScrollableForm Sample
and add an extra TLayout with bottom buttons (cancel/continue) - the position of this layout should be assigned according to bounds from VirtualKeyboardShown event handler. There is also another, similar example called KeyboardToolbar. The examples can be also found in "c:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\User Interface\"
Related
I'm working on an Android app with Android Studio. I have a form with several field and 2 buttons at the bottom to either validate or going back. The problem is that as soon as I click in one of the EditText of the form, the 2 buttons are following the keyboard.
How to prevent these 2 buttons to show up and force them to stay at the bottom of the page, hidden behind the keyboard. The form is in a ScrollView, which is in a ConstraintLayout. I tried many things like having my 2 buttons in the ConstraintLayout. Also outside in a RelativeLayout with constraint at the bottom of the parent... I also tried to use LinearLayout instead of the ConstraintLayout and weight each component but the buttons are still there. The only way I found is to use a vertical LinearLayout without weighting the components. But then I have the problem of not seeing the buttons if the screen is too small. I would like buttons to stay at the bottom.
Is it normal? Do I have to fix it from the code by hiding the buttons when focusing on one of the TextEdit, or by the layouts?
The other thing is that if I click on the last field ("Ville"), the form doesn't move and I still see the first 2 lines...
Thanks a lot for your help
On your manifest.xml you can set android:windowSoftInputMode to adjustPan.
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustPan" />
From Android documentation:
Don't resize the window to make room for the soft input area; instead
pan the contents of the window as focus moves inside of it so that the
user can see what they are typing. This is generally less desireable
than panning because the user may need to close the input area to get
at and interact with parts of the window
I want to make a lock page for my app which should have lock screen with custom keyboard (not soft keyboard) like that in Moto G.
Any pointers in this regards would be helpful.
Seems you don't want to use the 'keyboard' which android provide, if so you can just
place some buttons on your layut
place labels on each buttons
make that buttons to commit texts what you want to commit for each buttons
I am developing an application for android devices, which manages TV channels and shows. In it there is an option for the user to add channels in the system using a custom widget. The widget uses autocompleteTextView. My layout does not adjust itself when the soft keyboard appears.
These are the 2 states of the layout:
The keyboard blocks the user from viewing the options in the dropdown and the field below it. I have already tried the solution here and here. But none of them got it to work.
I want to move the layout of the widget itself, rather then the whole layout behind. How to go about this problem?
I'm using the v16 API and having problems with where the popup is being placed when the onscreen keyboard is displayed.
The first problem is that if the EditText is at the bottom of the screen, when I touch the field to open it for editing the popup is displayed below the control and the immediately covered as the keyboard appears. It doesn't reposition itself above the EditText until a keypress triggers my validation code to fire again on the new value.
The second problem is that when I close the keyboard and the ScrollView containing the text scrolls back down from where it positioned itself to show the EditText above the keyboard the popup remains placed on the upper half of the screen instead of where the EditText is until I touch something else on the screen (triggering the ScrollView to do a redraw???).
Unfortunately that popup has various problems like this :(
Perhaps a simple solution in your case is to forcibly invalidate the UI when the keyboard has displayed and dismissed? Can't recall if the Popup will reposition if the EditText is invalidated, but worth trying as the alternative may be to re-implement.
Checkout my android-formidable-validation lib on github, it re-implements...though has its own problems - if you go down that path, why not give me a hand with some contributions ;)
I have list of products which have EditText in TableLayout.
I want Keyboard in right/left of EditText and it needs to be containing 0-9 ,.(dot) ,Delete,and Done.Don't need other keys.
Each time when the user click EditText, it will show key pad to right of EditText (trigger/onClickListner).
Currently I did Like this:
How we can implement.
And normal list is :
I want keypad right of /left of text-box.Keyboard may be user define/predefine.How we can implement these.
I have created one keyboard.Its always display the bottom of the screen. I need right of textbox or left.
How can i set the keyboard coordination. Please tell me...
I don't have any idea on how to do this. I want to implement this.
My created keyboard width & high is too small than default.
Please advice me / guide me on this.
How can i set the keyboard coordination.
If you are using your custom Keyboard you Can't locate it at your desired position. By Default it will appears at the Bottom only.
So you can try with Custom Pop up window , Another Post for your requirement.
You can try with Quick Action Dialog for you requirement
Also check this Touch Calculator Source for you reference.