在我在XOOM设备中运行的Android应用程序中,当我单击Edittext时,键盘会打开并隐藏操作栏.我不希望这种情况发生,我该如何解决这个问题?例如,这可以通过平板电脑的Google通讯录应用来完成.
编辑:我有几个edittexts用户需要填充.首先,当用户点击底部的一个edittext时,键盘显示并隐藏用户正在键入的编辑文本,因此他无法看到他正在键入的内容.我发现它真的很糟糕,为了解决它我只是添加到清单中:android:windowSoftInputMode="stateVisible|adjustPan"
但在那之后,现在屏幕调整自己并隐藏操作栏.
Google通讯录应用程序也是如此,但它神奇地不会隐藏操作栏.他们是如何做到的呢?
android android-layout android-3.0-honeycomb xoom android-actionbar
我有一个布局,代码如下
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--some stuff here-->
<LinearLayout
android:id="@+id/layout1"
android:layout_alignParentBottom="true"
android:layout_above="@+id/layout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
/>
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitStart"
android:layout_marginLeft="5dp"
style="@style/Base.Widget.AppCompat.Button.Borderless"
android:src="@drawable/ic_menu_send"/>
</LinearLayout>
<LinearLayout
android:id="@+id/layout2"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--some stuff here-->
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
在上面的代码时,键盘秀,我想layout2留在bottom并layout1到go up with keyboard.如果我添加android:windowSoftInputMode="adjustPan|adjustResize"两个布局保持在底部.请帮忙
android android-layout android-softkeyboard android-xml android-studio