码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-03-15 09:22:40      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:

转自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后正常图片:

技术分享 

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

标签:

原文地址:http://www.cnblogs.com/kobe8/p/4338796.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!