What is the common way to add a first default item to the listview, which takes it's data from a CursorAdapter? I would like to have a listview with items where the first entry is something like "Add item". Making a custom adapter won't help because it would mess up the 开发者_如何学编程cursor item count.
In your situations the best solution is using the method addHeaderView.
Why do u want taking data from cursorAdapter for the first item? Just set a TextView as a header view.
Try using a select with union
like
select 'Select something' as denominazione, 0 as _id union select denominazione, id as _id from ditta order by id asc
精彩评论