SQLite and populating list view, android

前端 未结 2 1878
渐次进展
渐次进展 2021-01-21 10:44

I am populating a text and list view from a SQLite database. The data is populating from the cursor correctly (I see the list filling with text rows), but I\'m not able to see t

相关标签:
2条回答
  • 2021-01-21 11:09

    With ListActivity, the id should be

    android:id="@android:id/list"
    

    without the '+', shouldn't it?

    ... in response to Jason's response.

    0 讨论(0)
  • 2021-01-21 11:22

    I believe you want your "list layout" LinearLayout to be a ListView with the attribute: android:id="@+android:id/list"

    <?xml version="1.0" encoding="utf-8"?>
    <ListView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+android:id/list"
    />
    
    0 讨论(0)
提交回复
热议问题