2011-11-24 102 views
0

在横向模式下键盘未正确对齐(请参见下文)。即使我注释掉除edittext以外的所有控件,问题仍然存在,这导致我认为问题不在布局中。有关我如何纠正此问题的任何想法?键盘在横向模式下不能正确显示

在肖像中正常工作。

这里是我的清单文件

<application 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" > 
    <activity 
     android:label="@string/app_name" 
     android:name=".MainActivity" 
     android:screenOrientation="landscape" 
     > 
     <intent-filter > 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
</application> 

和简化的布局文件的好办法

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="horizontal" > 
<EditText 
    android:id="@+id/editText1" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_weight="1"> 
    <requestFocus /> 
</EditText> 
</LinearLayout> 

enter image description here

回答

0

我认为这是模拟器的问题。您可以在真实设备上测试它并查看结果。

+0

谢谢。它是。有关它为什么这样做以及如何缓解的任何见解? – Nav

相关问题