I have silly problem please follow the below pics

And when i clicked on Enter Email it saw like below pic,

Now the problems are coming inspite of using android:windowSoftInputMode="adjustPan" android Lollipop theme and toolbar,
Suggest some solution.
First of all make sure you have provided a ScrollView in your xml layout.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
...
...
</ScrollView>
Then inside your activity make sure you are doing something like this(this code is just to demonstrate where to use getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);) :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.temp);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
final EditText time = (EditText)findViewById(R.id.timeET);
time.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
time.requestLayout();
MyActivity.this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED);
return false;
}
});
final EditText date = (EditText)findViewById(R.id.dateET);
date.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
date.requestLayout();
MyActivity.this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED);
return false;
}
});
}
Set the configChanges attribute in your manifest as follows
<activity
android:name="com.xyz.activityName"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"/>
No need to add adjustPan anywhere -neither in the manifest, nor with the individual views and neither programmatically.
It never lets the input field hide behind the softkeyboard.
Make sure windowFullscreen isn't included in the theme. Check values\Styles.xml for the same.
If you need the full screen, then create another theme with same attributes except windowFullscreen and use it for the required activity.
In Manifest.xml use adjustResize instead of adjustPan
Source
I also add "adjustNothing". My activity in AndroidManifest.xml is something like this:
...
<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateHidden|adjustPan|adjustNothing">
</activity>
...
It worked for me. Please try yourself.
just add in android manifest.xml
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustPan|adjustNothing">
</activity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With