while entering first character, soft keypad push layout up - android

I saw many question where programmer are facing problem when soft keypad display or disappear. But my problem seems unique. I do not face any problem at the time of display or when soft keypad goes. I face problem when user enter first character. At that time i think because of Blue preview of character on top of soft keypad it is pushing my layout little bit up. Can some one tell me how can i get rid of it ?

Sounds like you might not have adjustResize set for windowSoftInputMode in your activity declaration. Posting your layout XML and your AndroidManifest would be relevant.

Related

How to disable Keyboard suggestions on EditText and tell the keyboard to show extra number row

I have an EditText in my layout file. When I click(focus) on EditText a soft keyboard appear contains predictive word in keyboard suggestion bar(see figure 1).
Figure 1
But I want that when I will click on my EditText keyboard will appear with no suggestion bar and with an extra number row(see Figure 2).
Figure 2
I already tried some answer saying that adding below attribute will do that but none of them seems worked for me.
inputType="text|textNoSuggestion",inputType="textFilter" not worked.The below code work but also open a secure keyboard.(oppo,vivo phone built in feature)
inputType="textNoSuggestion|textVisiblePassword"
Is there any solution to make it done without opening secure keyboard?
N.B. I don't wanna disable the secure keyboard.
I saw this feature on some code editing application available on playstore.

Android's EditText not receiving keyboard input correctly

Just found myself trying to figure out this strange behavior in for EditText.
Information:
Bug seems to only happen in some devices! for now I've only seen it in Sony Xperia D2303.
App description:
I'm working on an app that has a main activity and navigation is done trough different fragments that are replaced as user moves from one section to another.
At one point I'm showing a DialogFragment with an edit text field, with background set to #null, with a hint text. (I have also tried with a normal edit text, taken from widget list and dragged to the layout and found the same behavior).
Problem:
When clicking on the EditText, software keyboard SHOWS UP but when typing there is no letter input in the EditText! I can long press, to visualize cursor position marker and also the magnifying glass shows up.
Things I've tried:
- I've tried requesting focus with xml, programmatically.
- Setting touchable(in touch mode also)
- Setting descendantFocusability attribute of parent to 'afterDescendants'
- Overriding onTouchListener and showing keyboard programmatically through the InputManager and using the edit text's token
… and maybe other things which I don't remember
There is but a workaround that I've found!!! sending the app to background, and bringing it to foreground again… so it seems something related to focus maybe?? but then why does keyboard show up, and cursor marker and magnifying glass work?
This solution does not work for me as it depends on the user taking action
Has anyone found this problem? any suggestions?
Thanks in advance!

How to trigger the horizontal orientation keyboard?

Context:
I have a small EditText field in my Activity, and it needs to be small because there is a lot of another View's on this Activity. But the content most of times are very long, and the user have a bad experience typing long texts into a small field.
Question:
How i can always show the "Horizontal Keyboard" when the user click on the EditText, even if the user are at Vertical Orientation(portrait) ?
Example:
Here is a screenshot of the "Horizontal Keyboard" that i'm talking about:
Important:
Setting the orientation to horizontal, is not really necessary. If this same keyboard shown on the image above can be triggered even if you are using vertical orientation, it would be useful too.
Sorry, I don't have 50 reputation points for commenting. But this link is for a question where OP is trying to disable the full screen keyboard. Perhaps if it's possible to disable, probably you are able to force enable it.
Disabling the fullscreen editing view for soft keyboard input in landscape?
EDIT:
So, searching a little more, I came to the conclusion that you can't force the keyboard to enter in fullscreen mode. Unless you make a keyboard app of your own that works only in fullscreen. But still would need the user to activate it on the settings menu.
Anyway, I found this solution by a user: force fullscreen on edittext in android, the answer suggests creating an Activity just for writing (an Activity with only an EditText as it's layout). And calling this Activity with the startActivityForResult method. Thus returning the text entered by the user and placing it on the respective EditText (or whatever widget you are going to use for the text).
Again, hope it helps.

Soft Keyboard Overlapping with EditText Field

I found this old post which definitely helps with my problem, but I'm noticing that it doesn't really seem to solve my problem. I have gathered that I need to set android:windowSoftInputMode="adjustPan" for my activity. But the issue is that it simply doesn't pan ENOUGH.
The text field is toward the bottom of the view, and when the keyboard shows up, the view shifts slightly but only the very top of the EditText. The text field has autocomplete turned on, and when it begins to show autocomplete options, the view pans down slightly more, but actually winds up even further obscured by the autocomplete options. It makes the text input field very difficult to use since you can't see anything you're typing.
It is a multiline input field, and when text rolls to the next line, the view pans farther, so you can actually see the previous line(s) of text. But you cannot see what you're typing, which I think is pretty important.
Does anyone have any thoughts on solving this issue?
So, I've found what appears to be the cause of the issue. In my AndroidManifest.xml I had set
<uses-sdk android:minSdkVersion="3" />
Apparently, using a minSdkVersion below "4" was at the root of the problem. On changing it to "4", the layout appeared as it should have, and the EditText had its first line above the top of the soft keyboard appropriately.
Thanks for the help, Phobos.
Wrap your UI in a ScrollView container. This will allow the user to see the entire UI, albeit by scrolling, if need be. The UI may not be big enough to scroll without the keyboard on screen, but when the keyboard is displayed it effectively reduces the screen size.

Android Phone EditText not updating the display on the device

I've got a small Android app that I am developing and I have an EditText element which does not like to display it's contents while the keyboard is on the screeen.
For example I touch the editTextbox and it brings up the keyboard, pressing a letter, say a displays a in the textbox, but after that no new text shows up so the user is essentially typing blind from that point on.
This only happens on the device and not in the emulator. Vodafone 845 if it makes any difference.
The code I am using for the EditText is this.
<EditText
android:id="#+id/EditAddress"
android:layout_width="200px"
android:singleLine="True"
android:hint="Address or Landmark"/>
I did have a OnKeyListener and an OnClickListener, but removing them from the code makes no changes to the behaviour. The EditText is also inside of a TableLayout which is inside of another TableLayout. This is the only EditText that is behaving badly on the device. (I have not coded any others in the application. But might add some just to find out whats wrong.
EDIT: Ok, it seems to be caused if the keyboard obscures the location of the original editbox such that the view has to scroll down so the editbox will not be covered by the software keyboard. For now I can rearrange my page so the edit box is at the top. But this is a bit of a hacky solution. Anyone know what causes this and/or how to fix it.
I think you need to give it a layout_height as well. Even if it is wrap_content or the like.

Categories

Resources