【发布时间】:2023-06-11 02:34:01
【问题描述】:
如果可能,如何在分配给 SimpleCursorAdapter 的布局上方添加“标题”(“ondemandandautomatic_authorize”),并在 ListView 下方添加按钮?
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this,
R.layout.ondemandandautomatic_authorize, mContacts,
new String[] { ContactsContract.Contacts.DISPLAY_NAME },
new int[] { R.id.contactLabel });
setListAdapter(mAdapter);
我现在在我的 Activity 中显示的是:
<AppName>
<ckbx1><ckbx2><ckbx3><TextView (ContactName)>
...(repeating the line above for each contact)
但我想要的是:
<AppName>
<TextView1><TextView2><TextView3><TextView4>
<ckbx1> <ckbx2> <ckbx3> <TextView (ContactName)>
...(repeating the line above for each contact)
<Button>
可能吗?
【问题讨论】:
标签: android android-layout android-widget android-activity android-view