zoukankan      html  css  js  c++  java
  • 弹出输入框后,将listview内容遮住,解决方案

    转自http://blog.csdn.net/silence_cdsn/article/details/7987063

    更改listview的布局属性

    之前的布局:

    [html] view plaincopy
     
    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" />  
    [html] view plaincopy
     
    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" />  


    更改后的

    [html] view plaincopy
     
    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" />  
    [html] view plaincopy
     
    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" />  

    正常图片:

    弹出keyboard后,非正常图片:

    弹出keyboard后正常图片:

     

  • 相关阅读:
    octotree神器 For Github and GitLab 火狐插件
    实用篇如何使用github(本地、远程)满足基本需求
    PPA(Personal Package Archives)简介、兴起、使用
    Sourse Insight使用过程中的常使用功能简介
    Sourse Insight使用教程及常见的问题解决办法
    github 遇到Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts问题解决
    二叉查找树的C语言实现(一)
    初识内核链表
    container_of 和 offsetof 宏详解
    用双向链表实现一个栈
  • 原文地址:https://www.cnblogs.com/kobe8/p/4338796.html
Copyright © 2011-2022 走看看