Keyboard covers up part of edittext - android

I have a numberpicker but my keyboard is not showing up like I want.
Screen:
As you can see, the keyboard covers part of the edittext.
How can I fix this without using a scrollview?
I've already tried setting android:windowSoftInputMode="adjustPan" or "adjustResize".
When I use scrollview I get the following problem :
Screen shifts a bit when change focus to next edittext
Thx :)

in manifest file set activity attribute
android:windowSoftInputMode="adjustResize|stateHidden"
like :
<activity
android:name=".LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustResize|stateHidden" >
it should work

Related

Android - Button on bottom of the screen and Keyboard starting on top of it

Is it possible to have a button on the bottom of the screen and when i use the keyboard keep the button visible on the bottom and the keyboard on top of the button?
I dont need the button being pushed up with the keyboard or the keyboard going over the button.
I need the button usable and visible on the bottom of the screen and the keyboard on top of it.
Edittext -
Keyboard -
Button -
Thanks!
In Manifest.xml. Add this line android:windowSoftInputMode="adjustResize" in activity tag
<activity
android:name=".MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize">
...
Try adding this to your Manifest.xml
<activity
android:name=".ui.messages.ChatActivity"
android:fitsSystemWindows="true"
android:windowSoftInputMode="adjustResize" />

Recyclerview and Cardview I have design problems

> I'm using Recyclerview. The page slides up when I click on EditText. How to fix this.
Please use
android:windowSoftInputMode="stateHidden|adjustPan"
Inside manifest file
- Add Following Code Into AndroidManifest.xml With Specific Activity.
android:windowSoftInputMode="adjustPan"
<activity
android:name=".MainActivity"
android:theme="#style/Theme.Design.NoActionBar"
android:windowSoftInputMode="adjustPan">

windowSoftInputMode=“adjustResize” doesn't work in my Activity

I have form-like editTexts and my softkeyboard is overlapping editText field. In my FragmentActivity I just set windowSoftInputMode=“adjustResize” in my AndroidManifest (or in onCreate()) and it works. But in my regular Activity I set this and it doesnt work at all.
I cant set android:fitsystemwindow="true" because it will destroy my layout with transparent statusBar and not transparent navigationBar.
AndroidManifest
<activity
android:name=".ProfilePackage.EditProfile.EditProfileActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:label="#string/app_name">
</activity>
<activity
android:name=".Activities.CommentActivity"
android:windowSoftInputMode="adjustPan" />
I had the same Problem where the Softkeyboard was covering other views. So I added this line in manifest.

Soft keyboard hide EditText in lollipop version

I have a layout which contain RelativeLayout as Root layout,Relative layoout contain ListView at Top and one Edittext align at the bottom of relative layout.
In Pre lollipop version devices whenever soft keyboard open Edittext pushed up and I am able to see the Editext.
But in lollipop soft keyboard hide the Editext.
I have already set android:windowSoftInputMode="adjustPan|adjustResize" in manifest file.
Please help me
try to give fitsSystemWindows in your main layout( for lollipop versions)
android:fitsSystemWindows="true"
also in the manifest give
android:windowSoftInputMode="adjustResize"
hope this will help
Thanks for your valuable input. Finally I have fixed this issue.
What I found the reason behind this issue is application theme. My application theme was
android:Theme.Light in which I found this issue. I have only changed the theme of my EditText layout activity by setting
android:theme="#android:style/Theme.Black.NoTitleBar"
e.g.
<activity
android:name=".activity.LiveStreamingActivity"
android:label="#string/title_activity_event_performer"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:screenOrientation="portrait" />
This solved my problem !!!
May be your activity is full screen. Try clearing the FULLSCREEN flag.
I too had the same issue and it was because of the usage of a menudrawer library which was not supported by lollipop and when I replace that with default navigation drawer of android the things started working fine.Please check with the libraries if you use any.
The important value is the adjustResize. This will shift the whole UI up to give room for the soft keyboard.
<activity
android:name="com.my.MainActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_main"
android:windowSoftInputMode="adjustResize|stateHidden" >
</activity>

Selectionbar is hidden

I have added adjustPan in Manifest.xml file here is my Activity tag in Manifest.xmlandroid:name=".LoginActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="#style/Theme.Sherlock.NoActionBar"
android:windowSoftInputMode="adjustPan"
Problem is this when I added adjustPan my Selection bar(CAB) is hidden. When I remove adjustPan from Manifest.xml Its showing perfect. Let me know what's wrong with adjustPan?

Categories

Resources