Hi, I would like you to take a look at my code, the list of the filling from a call in the database where I dump the values in that list. What I want to do is that when you click on an item in the list, the data is displayed on an alert dialog. just take me the first item on the list even if you click on others
lista.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
TextView tx1=adapterView.findViewById(R.id.txt1);
TextView tx2=adapterView.findViewById(R.id.txt2);
String texto1=tx1.getText().toString();
String texto2=tx2.getText().toString();
Toast.makeText(getApplicationContext(), texto1+" "+texto2, Toast.LENGTH_SHORT).show();
}
});