Android hardkey keyboard - android

I have hardkey dialpad through which I want to enter number as well as alphabets, like a old dial pad mobile phone.
Now I want is, that when I enter text in edittext, a small keyboard or fragment should pop up showing all options possible right next to the edit text.
For ex. if I press 2, it should show |2|A|B|C| right next to edit text.
Any ideas on how to implement this?

I found a solution.
I declared a Linear Layout in my activity_main.xml
after doing that I programatically add required buttons to a dynamically created view and then add that view to the original layout dynamically, along with moving it with the cursor.
That solves my problem

Related

Trying not to show the buttons showing when I click in one of the EditText of the form

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

SoftKeyboard : Switch Keyboard

So my problem is as follows:
I am working on the "Unmodified SoftKeyboard Demo Project" , I created another keyboard (Azerty) with Copy/Paste as the Qwerty. When I call mInputView.setKeyboard(mAzertyKeyboard); by pressing a button , the keyboard is switched, but the layout is big and badly displayed, I mean I can't see all keys just the half of the keyboard on the screen. Does switching a keyboard require another call like Draw?
Thanks.
Check if the number of key in a row is the same as the qwerty keyboard.
Anyway, you should show us the layout here if you want some help

how to show floating widgets(edit text and buttons) in android

I want to show floating edit texts and buttons on screen in android e.g. look below the image, there are 3 edit texts and 2 buttons which are floating on current screen. I searched a lot on net but got nothing. So please anyone suggest how to do this, even some links will be useful.
Its Ok, if the widgets are not transparent, but it should give feel that they are floating on my current screen.
Pop up or custom Alert dialog may solve your problem.
But simple solution is take another layout in xml of the activity. In that layout add those edittexts and buttons. Set its visibility to false. And when you want to show then, make layout's visibility to true.

set Keyboard coordination: How to set the keyboard x,y co ordination

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.

Android Floating EditBox

I have an OptionMenu which has single option in it named "Search". When the search option is clicked, it should dynamically add a EditText at the top of Activity window like it has in WebView (browser address bar) so users could search something in my application.
After there would be EditBox, one can write inside it. I also want to have some OnTextChanged like event of that EditBox so do you think it's also available with that View?
I made it myself. I added an EditText on the screen with setting as hidden and on button click made it visible. It worked like a charm.

Categories

Resources