Good evening friends puej the truth I do not know what is wrong I'm drowning in a small problem because I tell you that an attempt to open another activity does not work for me not that it is wrong but the other intents if: here the code:
@Override
public void onClick(View v) {
if(v.getId() == R.id.btnAgregarSoporte){
Intent abrirAgregarSoporteActivity = new Intent(this,AgregarSoporteActivity.class);
startActivity(abrirAgregarSoporteActivity);
}
if(v.getId() == R.id.btnPublicarAnuncio){
Intent abrirAgregarUbicacionYProdInm = new Intent(getApplicationContext(),AgregarUbicacionYproductoInmueble.class);
startActivity(abrirAgregarUbicacionYProdInm);
}
if(v.getId() == R.id.btnVerAnuncios){
Intent AbrirAnuncios = new Intent(this,AnunciosActivity.class);
Toast.makeText(getApplicationContext(),"Pero llega",Toast.LENGTH_LONG).show(); // inclusive llega hasta aqui cuando quito la linea de abajo
startActivity(AbrirAnuncios); // cuando quito esta linea funciona pero obviamente no abre la otra activity si no que muestra el mensaje de la anterior linea
}
}
As you see all the intents here work except the frame with comment the truth is not what happens I have set everything and nothing can help me, because the application is closed by pressing that button see ads. thanks.
In case you need something else, I can modify the question and add more code or whatever you need.