开发者

one textview and one imageview inside a list view, how is it possible?

开发者 https://www.devze.com 2023-03-24 06:19 出处:网络
I want to make code for a listview. In listview there will be a textview and an imageview both in one line of the listview. How is it possible. I开发者_开发技巧 am using that code in my TabHost contro

I want to make code for a listview. In listview there will be a textview and an imageview both in one line of the listview. How is it possible. I开发者_开发技巧 am using that code in my TabHost control.


You need to write your own list view item layout, which includes a text view and an image view. Here's a good guide on writing a custom list view.


Create a layout that is specific to each line. In your case, it will contain the textview and imageview wrapped in either a relative or linearlayout. Then just inflate that view for each line

0

精彩评论

暂无评论...
验证码 换一张
取 消