如何progmmatically更改列表视图的身高..? [英] How to Change list view's height progmmatically..?

查看:202
本文介绍了如何progmmatically更改列表视图的身高..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何改变列表视图编程的高度。

I want to know how to change height of the list view programmatically.

是否有可能改变孩子的项目高度为个别列表项...?

Is it possible to change the child items height for individual list item...?

推荐答案

Noby如果你想改变的子项中的高程为每个孩子增加新item_row布局,并根据需要改变它的高度和使用View getView方法,它充气...........

Noby if you want to change the hight of Child items you add new item_row layouts for each child and change it height as you want and inflate it using View getView method ...........

如果蜉想改变列表视图的高度......

If youi want to change height of listview....

list.setLayoutParams(新RelativeLayout.LayoutParams(155,115));

LayoutParams.fill_parent和LayoutParams.wrap_content

在相对布局paranthases输入您的ListView的宽度和高度。,,,,并在XML文件中只listiew ...........

enter your listview width and height in paranthases.,,,, and in your xml file only listiew in relative layout...........

这篇关于如何progmmatically更改列表视图的身高..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆