i want to up the layout approx 20dip when i click on edit text keyboard appear so my submitt button hide below key board so i want to up layout approx 20 dip ,n also i cant set scroll i have image on background...so how to up whole layout with background when my keyboard launch ...thanks
my xml is for creating layout for that screen.....
There's a very similar question on StackOverflow..
Layout becomes invisible, when keyboard pops up.
Hope this helps!!
Sorry, I had to post this as an answer, rather than comment on the question..
Related
Anyone help to add DONE button on top of soft keyboard like above screenshot shows.
Because I need Enter and Done both button on my Edit Text.
So, please suggest me If anyone have Idea.
Thanks in Advance...
How about just adding a custom Button in the bottom of your UI?
You can observe layout size changes -> find a case when keyboard appears and disappears (Remember its different case from screen rotation, different screen proportion)
Based on keyboard hidden/shown event you can show/hide your custom UI.
I guess only problem is, you don't know what is keyboard view background. But its definitely better than writting your own keyboard, AFAIK you can't add views to keyboards.
You have to create a custom keyboard for that. For custom keyboard you can try here:
https://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615
https://developer.android.com/guide/topics/text/creating-input-method.html
https://inducesmile.com/android/how-to-create-an-android-custom-keyboard-application/
http://www.blackcj.com/blog/2016/03/30/building-a-custom-android-keyboard/
You would like to have an easy solution? Then integrate your "Done" button in your layout. Your layout should look like this (short version):
<LinearLayout orientation="vertical">
<ScrollView layout_weight="1"> <-- if needed, use FrameLayout else
place your Layout here
</ScrollView>
<YourDoneButton/>
</LinearLayout>
Your Button will stack on the top of the keyboard. I assume, that the user should be able to click of the "Done" button even if the keyboard is hidden. If not, you can hide it if your EditText is not focused.
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
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.
I have a little issue with the keyboard on my numberpicker.
It's kinda hard to explain in words so here are some screenshots:
When I click on the numberpicker the keyboard shows up:
When I click on the next button (in this case the 'Volg' button) I implemented that it should focus the next edittext.
But as you can see, the screen shifts a little to the top.
This is not a huge problem but it's kinda annoying.
What can cause this, or how can I fix this ?
Edit: the layout is a scrollview.
try this
In your manifest file under activity tag use attribute
android:windowSoftInputMode="stateUnchanged"
Just like in texting applications, I want the keyboard to push the dialog box up when it raises. The issue I'm currently having is that the keyboard actually raises over my dialog box and the screen does not scroll.
Here's what I want: (Don't have enough reputation to post images)
Image one (Before)
Image two (After)
See how nicely it raises? How do I go about doing that?
Use a RelativeLayout and place your EditText using android:layout_alignParentBottom="true" it should then raise automatically when the keyboard is shown.
//try windowsoftinput mode in your manifest xml file.
android:windowSoftInputMode="adjustResize"
adjustResize 0x10 Always resize the window: the content area of the
window is reduced to make room for the soft input area
.
ref this