2013-02-26 129 views
0

我的应用程序有登录屏幕,它支持风景和portrait.It工作正常。我的问题是键盘显示时点击编辑文本在纵向模式很好。屏幕看起来像,![enter image description here] [1 ]键盘显示时不显示视图?

但风景模式不像人像mode.Screen看起来像在横向模式下,

enter image description here

这是我的清单代码,

<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> 

如何牛逼o在横向模式下显示与肖像模式相同的照片。任何人都可以引导我。

+0

这是一个自定义的键盘? – lokoko 2013-02-26 10:51:27

+0

在scrollview和android:configChanges =“keyboardHidden | orientation”中添加所有视图这将解决您的问题 – 2013-02-26 10:51:35

+0

@lokoko没有默认键盘 – 2013-02-26 10:53:50

回答

1

东西只需添加机器人:imeOptions = “flagNoExtractUi”为编辑文字

0

带环绕你的布局<滚动视图>

添加此行androidmanifest

机器人:windowSoftInputMode = “stateHidden | adjustResize | adjustPan”

+0

我已经添加上面的代码,但我的问题没有解决。 – 2013-02-26 12:29:02

+0

@ chiru,为什么你需要横向模式下的肖像键盘。默认情况下,android操作系统激活用于用户交互的纵向和横向模式的单独键盘。你会强迫改变这一点。它错误地运行你的应用程序。 – AndroidEnthusiastic 2013-02-26 12:58:10

-1

我想你没有实现应用的登录界面为横向模式。因此,它显示默认视图。

创建子文件夹布局,土地资源文件夹实施景观UI也

+0

通过在横向模式下实施它意味着什么? – lokoko 2013-02-26 12:31:08

+0

我有两个文件夹 – 2013-02-26 12:31:15

0

您可以添加以下到您的清单文件:

android:configChanges="orientation|keyboardHidden" 
android:windowSoftInputMode="stateHidden" 

还要添加附上您登录在scrollView下的页面。像

+0

我已经添加了上面的代码,但我的问题没有解决。 – 2013-02-26 12:28:25

+0

您是否将您的布局放在滚动视图中? – lokoko 2013-02-26 12:30:23

+0

亚我已添加滚动视图 – 2013-02-26 12:32:08