public ArrayList consultar() {
ArrayList<String> listado = new ArrayList<>();
bd = bdPaises.getReadableDatabase();
String q = "SELECT * FROM Paises";
Cursor consulta = bd.rawQuery(q, null);
if (consulta.moveToFirst()) {
do {
listado.add(consulta.getString(0)+""+consulta.getString(1)+""+consulta.getString(2)+""+consulta.getString(3));
} while (consulta.moveToNext());
}
bd.close();
return listado;
}
Table sqlite with, name, capital, continent, inhabitants, then I make the query and I am loaded all the data in the listview item, what I want is that only the name data is loaded, and by clicking on the item that another activity opens up with the rest of the data.