在开发过程中使用到了PopupWindow,在PopupWindow中添加了一个ListView组件,而ListViw中Item是创建的一个TextView对象,为了实现出较好的UI效果,需要对TextView设置layout属性以调整组件的上下间距,情况如下
1 将parentView的width和height都设置为fill_parent的时候,在C8500上第一次进入应用管用,但是再次设置的时候TextView就不能fill_parent了。
2 将ParentView的width和height都设置为指定的数值时,重复进入界面,TextView能充满屏幕。
3 将ParentView的width和height分别设置为width为指定的数值,height设置为wrap_content时候,多次进入均能充满父布局。
前提是popupWindow的宽高设置为width为指定的距离,height为wrap_content
目前个人感觉是fill_parent和wrap_content之间的设置有冲突,导致在计算View的大小的时候出错,使fill_parent的设置失效!!!
未完待续!!
分享到:
相关推荐
PopupWindow + ListView + Singleselect
实现在android的popupwindow中显示listview.docx
PopupWindow ListView 单选的简单实现
PopupWindow和ListView配合使用,包含PopupWindow的取消,Back键取消,ListView的点击事件。
在android中显示listview自己适配的方式; 博客链接:blog.csdn.net/zgyulongfei
在PopupWindow中嵌入ListView,ListView中的item可在顶部与底部之间跳跃.
Demo实现了PopupWindow嵌套ListView,使用简单方法解决ListView宽度自适应问题;以及包含使用AndroidStudio制作9.png图片;
实现在android的popupwindow中显示listview.docx
PopupWindow+ListView
Android 单击listview弹出popupwindow弹出框,里面还附带listview右滑删除按钮。博客网址:http://blog.csdn.net/qq_16064871
popupwindow中用listView绑定数据并显示在View上方
Android: PopupWindow 上显示 ListView 并相应 Demo (仿QQ登录界面,待改进)
Android之用PopupWindow实现弹出listview形式菜单.rar
点击ListView弹出PopupWindow仿腾讯新闻
AndroidListView+PopupWindow实现item点击弹出PopupWindow 博客地址:https://blog.csdn.net/dreams_deng/article/details/104618270
PopupWindow+ListView实现Android搜索框
使用PopupWindow + 2个ListView实现仿 美团/淘宝/百度糯米 多级分类菜单效果
在popupwindow中显示listview的自适配方式。 blog.csdn.net/zgyulongfei
大家可自行学习,研究,并补充该demo.
自定义的listview、GridView、 Popupwindow简易demo,适合初学者学习,简单易懂