【发布时间】:2013-04-07 12:45:32
【问题描述】:
我有一个仅包含编辑文本视图的相对布局。但是当edittext的内容增加时,我的标题栏会向上移动。我经历的大多数解决方案都解决了键盘弹出时标题栏移动的问题。但是我没有发现任何内容以防其内容增加。我还使用了 android:isScrollContainer="false",正如这篇文章 How to avoid soft keyboard pushing up my layout? 中所建议的那样,但仍然是同样的问题。有没有办法防止它?这是我的xml文件
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:isScrollContainer="false"
android:background="@drawable/background" >
<EditText
android:id="@+id/hidden_edit_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:inputType="textMultiLine"
android:singleLine="false"
android:paddingLeft="10sp"
android:paddingTop="5sp"
android:paddingRight="5sp"
android:scrollbars="vertical"
android:background="@android:color/transparent"
android:textSize="26sp" >
</EditText>
</RelativeLayout>
【问题讨论】:
标签: android layout android-edittext titlebar