需要 Android 2.3.3 上的可扩展列表视图的示例代码

发布于 2024-12-12 07:10:06 字数 186 浏览 5 评论 0原文

我需要一个使用可扩展列表视图的应用程序的工作示例。我不知道如何在其中设置数据。我尝试过使用新的 ArrayAdapter(...)。但我不知道如何创建正确的参数。

提前致谢!

PS:我已经使用了一些代码,但它需要 R 中的某种资源,R.layout.simple_list_1。它没有在任何地方宣布,但大多数人似乎都拥有它?

I need a working example of an application that uses an expandableListView. I have no idea how to set data in it. I have tried with the new ArrayAdapter(...). But I can't figure out how to create the correct parameters.

Thanks in advance!

PS: I've used some code already but it needs some kind of resource out of the R, R.layout.simple_list_1. It's not declared anywhere but still most of the people seem to have it?

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

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

发布评论

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

评论(2

眼眸 2024-12-19 07:10:07

API 演示是一个很好的来源 对于这些基本示例

我已经使用了一些代码,但它需要 R 中的某种资源,R.layout.simple_list_1。它没有在任何地方声明

,它是对 Android 操作系统一部分的内置 XML 布局文档的引用。如果无法解决,请使用 android.R.layout.simple_list_item_1

The API demos are a great source for these basic examples

I've used some code already but it needs some kind of resource out of the R, R.layout.simple_list_1. It's not declared anywhere

That is a reference to an built-in XML layout document that is part of the Android OS. Use android.R.layout.simple_list_item_1 if you cannot resolve it.

左秋 2024-12-19 07:10:07

检查这个:

可扩展列表

希望它有帮助!

check this one :

expandable list

hope it helps!

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