机器人:是否有可能把在列表视图项的多个布局 [英] android: Is it possible to put multiple layouts in listview items

查看:98
本文介绍了机器人:是否有可能把在列表视图项的多个布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想用一个列表视图(可能)是有可能填补每一个条目以表示两个按键两个文本区域,并让他们与realtive或线性布局奠定了?

hi I want to use a listview (probably) is it possible to fill each entry with say two buttons two text areas, and have them laid out with realtive or linear layouts?

我使用了一个滚动视图与布局充气此刻做到这一点,但我想ListView的效果会更好,也许?

I have used a scroll view with layout inflator to achieve this at the moment, but I'm thinking listview would be better maybe?

推荐答案

当然可以。你需要使用该自定义列表视图。通过加入在其列表视图,然后用AAdapter使得列表视图的每一个元素具有第二xml文件的布局引用另一个XML到列表视图制作的活性。这教程应该帮助你理解的想法。

yes you can. you need to use a custom list view for that. making an activity by adding a listview in it and then referencing another xml to that listview using an AAdapter so that every element of the listview has the layout of the second xml file. this tutorial should help you understand the idea.

这篇关于机器人:是否有可能把在列表视图项的多个布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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