软键盘,而使用adjustPan隐藏动作条 [英] Soft Keyboard Hiding ActionBar while using adjustPan
问题描述
我需要设置可见所有这三个项目
1。动作条
2。 ListView控件
3。的EditText (底部)
当我点击的EditText
,它推动了背景图像和挤压它。我看到一些教程和使用安卓windowSoftInputMode =adjustPan
的解决了挤压的问题,而是创造一个新的。当 SoftKeyboard
出现的,它也隐藏了动作条
。我曾参观过很多问题,但他们都不是真正有益的。有没有什么办法来设置动作条
总是可见无论发生在屏幕上等等...
I need to set visible all these three items
1. ActionBar
2. ListView
3. EditText (at Bottom)
When i click on EditText
, it pushed the background image and squeezed it. i saw some tutorials and used android:windowSoftInputMode="adjustPan"
that solved the squeezing issue but created a new one. When the SoftKeyboard
appears, it also hides the ActionBar
. I have visited many questions , but none of them was actually helpfull. IS there any way to set ActionBar
always visible whatever happening on screen etc...
EDITED
在 XML
用来显示片段的的ListView
和的EditText
是:
The xml
of fragment used to display the ListView
and EditText
is :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@id/android:list"
style="@style/ContactListView"
android:layout_width="match_parent"
android:layout_height="389dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:isScrollContainer="false" />
<TextView
android:id="@id/android:empty"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_above="@+id/editText1"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="@string/no_contacts"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:background="@android:color/holo_blue_dark"
android:ems="10"
android:imeOptions="flagNoExtractUi"/>
</RelativeLayout>
编辑(2日)
快照是:
推荐答案
我有同样的问题,因为你与的EditText
在相对
布局之前,寻找一些线索遍布互联网之后,我失败了,但我通过添加 bottom_padding
到的EditText
其中固定它。
I have the same problem as yours with EditText
inside a Relative
layout before, after searching several thread all over internet I have failed, but I solve it by experimenting on it through adding bottom_padding
to the EditText
which fixed it.
这篇关于软键盘,而使用adjustPan隐藏动作条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!