I have a very simple problem. I have a invisible button in my Main Activity, and I have a second Activity that makes that button visible. In the second activity I don´t have a p
Solve the problem. In the second Activity a have a static boolean variable that begins false. Once the oncreate() in the second Activity is call, the boolean variable is change to true. onresume() in MainActivity i check if the boolean variable is true, and change the visibility of the button.
SecondActivity
public static boolean showButton = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showButton = true;
}
MainActivity
@Override
protected void onResume() {
if ( Display.showButton){
mMyButtonToBeHidden.setVisibility(View.VISIBLE);
}
super.onResume();
}