【问题标题】:Dynamic List View from database in android来自android中数据库的动态列表视图
【发布时间】:2026-01-07 19:45:01
【问题描述】:
我正在开发一个 android 应用程序,我必须在其中向用户呈现动态变化的列表视图,如下所示
- 当用户第一次打开时,它必须显示“新建”点击它会导致一个新表单。例如,在创建后,它会保存在 SQLite DB(固定 1)中。
2.当用户创建并再次打开应用程序时,它必须显示
1.Stationary 1 重新排序
2.新建
请多提宝贵意见
问候
ChinniKrishna Kothapalli
【问题讨论】:
标签:
java
android
sqlite
android-layout
android-emulator
【解决方案1】:
首先了解如何生成列表视图。然后您可以了解如何使用 SQLite 数据库,以便您可以从数据库中插入和检索。一旦您现在能够执行这些操作,您就可以开始您的任务了。步骤是
Retrieve value from the databse
Populate the UI which has a list populated from the retrieval values and a button with text
create and an EditText.
In onClick method of button retrieve the text from EditText and save it to the Database and
refresh the list(adding the newly created one to the list).