Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android : How to prevent resizing the window when displaying the virtual keyboard

Tags:

I am using a tabbed application. There is an EditText my application. When I click on the EditText, the window is getting resized and the virtual keyboard is displaying at the bottom of the window. But the four tabs are displaying at the top of the keyboard.

I do not want to display my tabs, when the keyborad is displaying. Or I do not want to resize my window. My need is just to hide the tabs and other things below the EditText.

I use all options with 'android:windowSoftInputMode' in my manifest. bUT I can not see any differences.

Please give me the solution.

Thank you..

like image 381
Jomia Avatar asked Mar 03 '11 12:03

Jomia


1 Answers

I found the solution.. for specially "sencha/phonegap/cordova" users.

Edit the main activity in android manifest file add this attribute.

android:windowSoftInputMode="adjustNothing"

  <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"             android:windowSoftInputMode="adjustNothing"               android:label="@string/app_name"              android:launchMode="singleTop"              android:name="com.company.appName.MainActivity"              android:screenOrientation="portrait"             android:theme="@android:style/Theme.Black.NoTitleBar">      <intent-filter>         <action android:name="android.intent.action.MAIN" />         <category android:name="android.intent.category.LAUNCHER" />     </intent-filter>  </activity> 
like image 97
Rupesh Avatar answered Sep 30 '22 19:09

Rupesh