Reputation: 687
When i focus on edittext in my application the keyboard open and push my activity layout above the keyboard. The only option i have is to check if the keyboard is open then make the buttons that is pulled above keyboard invisible. I wonder if there is a simple way to disable the layout to get pulled up because this is a common error in every application i build. Also can someone tell me how to check when the keyboard is shown or hide. thanks.
Updates : From my manifest
<activity android:name=".Defi" android:screenOrientation="portrait" android:theme="@style/Theme.Transparent" android:configChanges="keyboardHidden|orientation|screenSize" />
Upvotes: 1
Views: 409
Reputation: 2082
Try to put this in you manifest :
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize" >
</activity>
This will help you and wont pull layout up and also useful in handling configuration change when activity is transferred from Portrait
mode to Landscape
mode.
Upvotes: 0
Reputation: 1
<activity
android:name="Tollywood"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden"></activity>
Upvotes: 0
Reputation: 2446
i think u should change in manifiest
<activity android:name=".yourActivity"
android:windowSoftInputMode="adjustResize|adjustPan">
Upvotes: 2
Reputation: 3523
Please refer this link, re-sizing the app
<activity android:name=".TodoEdit"
android:windowSoftInputMode="adjustResize">
Upvotes: 0
Reputation: 1103
InputMethodManager imm = (InputMethodManager)getSystemService(
Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
this could help
better look at hereenter link description here
Upvotes: 1