I have a problem with the following code:
public void BotonAceptar (View vista){
Intent intent= new Intent (DadesPersonals.this, EAC1.class);
startActivity(intent);
setContentView(R.layout.activity_eac1);
EAC1 mostrar = new EAC1();
mostrar.MostraryOcultarBotones();
My idea is to change to the EAC1 activity and once the screen is changed, show me the hidden buttons that are there.
But I get an error, can you help me? What do I have to do?
EDITED:
The flow of patanllas is as follows:
EAC page that with a button goes to the page: DADES that on this page there is a button to return to the EAC page. But I need to show hidden buttons when returning to this page.
The question is if I add the buttons () in the EAC1 in the create directly I delete the first screen that is the same but without buttons.
I hope you explained.
Error:
09-26 11: 15: 39.415 1586-1586 /? E / AndroidRuntime: FATAL EXCEPTION: main java.lang.IllegalStateException: Could not execute method for android: onClick at android.support.v7.app.AppCompatViewInflater $ DeclaredOnClick Listener.onClick (App CompatViewInflater.j ava: 293) at android.view.View.performClick (View.java:3511)