列表视图中一个文本视图和一个图像视图,怎么可能?

发布于 2024-11-26 17:10:54 字数 76 浏览 1 评论 0原文

我想为列表视图编写代码。在列表视图中,列表视图的一行中将有一个文本视图和一个图像视图。怎么可能呢。我在 TabHost 控件中使用该代码。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半枫 2024-12-03 17:10:54

您需要编写自己的列表视图项布局,其中包括文本视图和图像视图。这是关于编写自定义列表视图的好指南。

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.

森罗 2024-12-03 17:10:54

创建特定于每行的布局。在您的情况下,它将包含包装在相对布局或线性布局中的文本视图和图像视图。然后为每行膨胀该视图

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文