1
I’d like to know the following, I have: ImageButton btneditarusuario;
and a TextView editarusuario;
, by clicking on either of the two starts the startActivity
.
You can group the ImageButton
with the TextView
to avoid having to repeat the code?
The code:
editarusuario.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getApplicationContext(), EditarUsuario.class));
}
});
btneditarusuario.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getApplicationContext(), EditarUsuario.class));
}
});