Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – 使用adjustPan时软键盘隐藏ActionBar大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要设置所有这三个项目
1. ActionBar
2. ListView
3. EditText(底部)
当我点击EditText时,它会按下背景图像并将其挤压.我看了一些教程并使用了 android:windowSofTinputMode =“adjustPan”解决了压缩问题,但创建了一个新的.出现SoftKeyboard时,它还会隐藏ActionBar.我访问过很多问题,但其中没有一个问题确实有用.有没有办法设置ActionBar始终可见屏幕上发生的任何事情……

EDITED

用于显示ListView和EditText的片段的xml是:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://scheR_551_11845@as.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>@H_403_11@ 
 

编辑(第二)

快照是:

解决方法

我在与相对布局中的EditText之前遇到了同样的问题,在搜索了几个线程后,我已经失败了,但是我通过在修复它的EditText中添加bottom_padding来试验它.

大佬总结

以上是大佬教程为你收集整理的android – 使用adjustPan时软键盘隐藏ActionBar全部内容,希望文章能够帮你解决android – 使用adjustPan时软键盘隐藏ActionBar所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。