简体   繁体   English

如何在android中的listview中显示四个按钮和一个textview?

[英]How to display four buttons and a textview in listview in android?

This is my first project in android and I want to display something like this in list view Any advice is appreciated 这是我在android中的第一个项目,我希望在列表视图中显示这样的内容。任何建议都表示赞赏

在此输入图像描述

You can go through CustomListView example.it can be done easily. 您可以通过CustomListView example.it轻松完成。 Please go through the Link below how to customize listview row android 请通过下面的链接如何自定义listview行android

For achieving this layout you should use custom listview for that like it. 要实现此布局,您应该使用自定义列表视图。

A row with one text view and four button mean five object in each row but show only two object one is textview and another is one button out or four button. 带有一个文本视图和四个按钮的行表示每行中有五个对象,但只显示两个对象一个是textview,另一个是一个按钮或四个按钮。 If you want to display fourth button then invisible first there button and fourth button in visible state. 如果要显示第四个按钮,则首先看不见,按钮和第四个按钮处于可见状态。 If you want to display second button then first, third and fourth button invisible state only second button in visible state. 如果要显示第二个按钮,则第一个,第三个和第四个按钮不可见状态只有第二个按钮处于可见状态。 Fallow this logic in each row. 在每一行中放弃此逻辑。 I hope you got you answer after using this logic. 我希望你在使用这个逻辑后得到你的回答。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM