android - 具有两个列表的 ListActivity

标签 android listview

我需要在同一 Activity 中插入来自两个列表(从游标填充)的数据。

布局必须是:

-TextView1- 从 table1 游标列表

-TextView2- 从 table2 游标列表

这可能吗?

最佳答案

是的,这是可能的。使用带有两个 ListView 的自定义布局的简单 Activity

它比调整 ListActivity 做一些不是为它设计的事情更容易。

关于android - 具有两个列表的 ListActivity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6360455/

相关文章:

android - 尝试在空对象引用上调用虚拟方法 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)'

Android ListView 在滚动时重复编辑文本值

android - Android布局中的Listview

android - Android 媒体播放器是否在 HTTP 请求 header 中提供 session ID?

android - 简单的 Android 广播不显示 toast

java - Android 根据内容更改 ListView 子文本颜色

android - 使用 smoothScrollToPosition() 函数时如何使 ListView 的滚动变慢?

android - 如何在 ScrollView 中将 LinearLayout 高度设置为匹配父级

android - 在 android 中使用 Retrofit 和 LiveData 执行一系列异步 Web 请求

java - Android ListView 不再突出显示选择 onclick