2013-02-26 132 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