弹出输入框后,将listview内容遮住,解决方案

2023-12-15 19:58

本文主要是介绍弹出输入框后,将listview内容遮住,解决方案,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

更改listview的布局属性

之前的布局:

[html] view plain copy print ?
  1. <ListView android:id="@+id/list_chat"  
  2.                         android:stackFromBottom="true" android:layout_width="fill_parent"  
  3.                         android:layout_height="fill_parent" android:scrollingCache="false"  
  4.                         android:cacheColorHint="@android:color/background_light"  
  5.                         android:layout_weight="1" android:divider="@null"  
  6.                         android:background="@color/chat_bg" android:fadingEdge="none"  
  7.                      android:layout_gravity="bottom" />  
<ListView android:id="@+id/list_chat"
android:stackFromBottom="true" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:scrollingCache="false"
android:cacheColorHint="@android:color/background_light"
android:layout_weight="1" android:divider="@null"
android:background="@color/chat_bg" android:fadingEdge="none"
android:layout_gravity="bottom" />


更改后的

[html] view plain copy print ?
  1. <ListView android:id="@+id/list_chat"  
  2.                         android:stackFromBottom="true" android:layout_width="fill_parent"  
  3.                         android:layout_height="fill_parent" android:scrollingCache="false"  
  4.                         android:cacheColorHint="@android:color/background_light"  
  5.                         android:layout_weight="1" android:divider="@null"  
  6.                         android:background="@color/chat_bg" android:fadingEdge="none"  
  7.                         android:fastScrollEnabled="true" android:transcriptMode="normal"  
  8.                         android:scrollbarStyle="insideInset" android:layout_gravity="bottom" />  
<ListView android:id="@+id/list_chat"
android:stackFromBottom="true" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:scrollingCache="false"
android:cacheColorHint="@android:color/background_light"
android:layout_weight="1" android:divider="@null"
android:background="@color/chat_bg" android:fadingEdge="none"
android:fastScrollEnabled="true" android:transcriptMode="normal"
android:scrollbarStyle="insideInset" android:layout_gravity="bottom" />

正常图片:

弹出keyboard后,非正常图片:

弹出keyboard后正常图片:

 

这篇关于弹出输入框后,将listview内容遮住,解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/497685

相关文章

java.sql.SQLTransientConnectionException连接超时异常原因及解决方案

《java.sql.SQLTransientConnectionException连接超时异常原因及解决方案》:本文主要介绍java.sql.SQLTransientConnectionExcep... 目录一、引言二、异常信息分析三、可能的原因3.1 连接池配置不合理3.2 数据库负载过高3.3 连接泄漏

C#文件复制异常:"未能找到文件"的解决方案与预防措施

《C#文件复制异常:未能找到文件的解决方案与预防措施》在C#开发中,文件操作是基础中的基础,但有时最基础的File.Copy()方法也会抛出令人困惑的异常,当targetFilePath设置为D:2... 目录一个看似简单的文件操作问题问题重现与错误分析错误代码示例错误信息根本原因分析全面解决方案1. 确保

C# LiteDB处理时间序列数据的高性能解决方案

《C#LiteDB处理时间序列数据的高性能解决方案》LiteDB作为.NET生态下的轻量级嵌入式NoSQL数据库,一直是时间序列处理的优选方案,本文将为大家大家简单介绍一下LiteDB处理时间序列数... 目录为什么选择LiteDB处理时间序列数据第一章:LiteDB时间序列数据模型设计1.1 核心设计原则

Java使用正则提取字符串中的内容的详细步骤

《Java使用正则提取字符串中的内容的详细步骤》:本文主要介绍Java中使用正则表达式提取字符串内容的方法,通过Pattern和Matcher类实现,涵盖编译正则、查找匹配、分组捕获、数字与邮箱提... 目录1. 基础流程2. 关键方法说明3. 常见场景示例场景1:提取所有数字场景2:提取邮箱地址4. 高级

SpringBoot3匹配Mybatis3的错误与解决方案

《SpringBoot3匹配Mybatis3的错误与解决方案》文章指出SpringBoot3与MyBatis3兼容性问题,因未更新MyBatis-Plus依赖至SpringBoot3专用坐标,导致类冲... 目录SpringBoot3匹配MyBATis3的错误与解决mybatis在SpringBoot3如果

C#高效实现Word文档内容查找与替换的6种方法

《C#高效实现Word文档内容查找与替换的6种方法》在日常文档处理工作中,尤其是面对大型Word文档时,手动查找、替换文本往往既耗时又容易出错,本文整理了C#查找与替换Word内容的6种方法,大家可以... 目录环境准备方法一:查找文本并替换为新文本方法二:使用正则表达式查找并替换文本方法三:将文本替换为图

C++ vector越界问题的完整解决方案

《C++vector越界问题的完整解决方案》在C++开发中,std::vector作为最常用的动态数组容器,其便捷性与性能优势使其成为处理可变长度数据的首选,然而,数组越界访问始终是威胁程序稳定性的... 目录引言一、vector越界的底层原理与危害1.1 越界访问的本质原因1.2 越界访问的实际危害二、基

Python 字符串裁切与提取全面且实用的解决方案

《Python字符串裁切与提取全面且实用的解决方案》本文梳理了Python字符串处理方法,涵盖基础切片、split/partition分割、正则匹配及结构化数据解析(如BeautifulSoup、j... 目录python 字符串裁切与提取的完整指南 基础切片方法1. 使用切片操作符[start:end]2

Linux部署中的文件大小写问题的解决方案

《Linux部署中的文件大小写问题的解决方案》在本地开发环境(Windows/macOS)一切正常,但部署到Linux服务器后出现模块加载错误,核心原因是Linux文件系统严格区分大小写,所以本文给大... 目录问题背景解决方案配置要求问题背景在本地开发环境(Windows/MACOS)一切正常,但部署到

Java中InputStream重复使用问题的几种解决方案

《Java中InputStream重复使用问题的几种解决方案》在Java开发中,InputStream是用于读取字节流的类,在许多场景下,我们可能需要重复读取InputStream中的数据,这篇文章主... 目录前言1. 使用mark()和reset()方法(适用于支持标记的流)2. 将流内容缓存到字节数组