There is such a code:

CursorAdapter listAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2, cursor, new String[]{"NAME", "DESC"}, new int[]{android.R.id.text1, android.R.id.text2}, 0); listView.setAdapter(listAdapter); 

But I need the code to be like this:

 CursorAdapter listAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2, cursor, new String[]{getString(R.string.name) + "NAME", getString(R.string.description) + "DESC"}, new int[]{android.R.id.text1, android.R.id.text2}, 0); listView.setAdapter(listAdapter); 

Those values ​​are taken from the values, connected together with the value from the database (cursor) and the list already had the form: Π‘Ρ‚Ρ€ΠΎΠΊΠ° ΠΈΠ· рСсурсов + имя ΠΈΠ· Π±Π΄ Π‘Ρ‚Ρ€ΠΎΠΊΠ° ΠΈΠ· рСсурсов + описаниС ΠΈΠ· Π±Π΄

ps 2 code does not work, the cursor thinks that this is the name of the column (a line from the resources + "NAME")

  • Looks like you have to make your adapter ... - Vladimir Saleev

0