Just add android:imeOptions="flagNoExtractUi" for Edit Text
View is not displaying when keyboard is displaying?
-
11-03-2022 - |
Question
My app have login screen, it supports landscape and portrait. It is working fine. My problem is that keyboard is displaying when click on edit text in portrait mode is fine. Screen looks like this:
But landscape mode does not look like in portrait mode. Screen looks like in landscape mode:
This is my manifest code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.activities"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<!-- Allow to connect with internet -->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/launcher_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<!-- Add Google Map Library -->
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".SplashActivity"
android:label="@string/app_name"
android:noHistory="true" android:theme="@style/generalNoTitle">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoginActivity" android:theme="@style/generalNoTitle" android:configChanges="keyboardHidden|orientation" />
<activity android:name=".MenuActivity" android:theme="@style/generalNoTitle" />
<activity android:name=".RegularReportsActivity" android:theme="@style/generalNoTitle" android:screenOrientation="landscape"/>
<activity android:name=".StageMaleAndFemaleActivity" android:theme="@style/generalNoTitle" android:screenOrientation="landscape"/>
<activity android:name=".MapViewActivity" android:theme="@style/generalNoTitle" android:screenOrientation="landscape"/>
<activity android:name=".ReportViewActivity" android:theme="@style/generalNoTitle" android:screenOrientation="landscape"/>
</application>
</manifest>
How to display same like portrait mode in landscape mode? also, can any one guide me?
Solution
OTHER TIPS
Could you add the following to your manifest file :
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="stateHidden"
Also add the enclose your login page under a scrollView. Something like
Surround your layout with a < Scroll View >
add this line in androidmanifest
android:windowSoftInputMode="stateHidden|adjustResize|adjustPan"
I think you did not implement app login screen for landscape mode .So, it is showing default view .
create a sub folder layout-land in res folder implement UI for landscape also