sqlite query loaded in listview

  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 {

            } while (consulta.moveToNext());


        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.

asked by longo 30.12.2018 в 16:35

0 answers