i have a db named: “dbtest.db” , a table named: “mensagens” , a column named: “usuarioorigem”.
in my XML file i have a textview and a button, when button is clicked i want to the value of textview change to the value in the column: “usuarioorigem” .
How do i do it? and can you explain how it works.
i have this code but it doesnt work.
TextView mostrar = (TextView) findViewById(R.id.tvUSUARIO);
mostrar.setText(usuarioorigem.valueOf(returning));
Define a
cursor cto point to your database.The sample given in the documentation is a great way to learn cursors.