I would like to know how I can change data from a certain ListView position.
Here I load the database from the ListView:
public void carregarEmails(Cliente cliente) {
ArrayList<Email> listaView = dao.pegarResultListaEmail(cliente);
listaEmail.setAdapter(new ClienteCadEmailBaseAdapter(getActivity(), listaView));
}
Code that retrieves data from selected line:
private void informacaoSelecionadaEmail(View v) {
listaEmail = (ListView) v.findViewById(R.id.lstEmails);
listaEmail.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Object o = listaEmail.getItemAtPosition(position);
objEmail = (Email) o;
posicaoEmail = position;
edtEmail.setText(objEmail.getEmail());
}
});
}
Now to get the changed in EditText and send it to the line again I have no idea how to do it.