As soon as the layout is created I want a button to be clicked automatically and I use button.performClick()
for that.
The problem is that it doesn't work. It looks like I can't do that during the onCreate, onStart, onResume
method. At what point is the button and its events created, so I can perform a click on it?
This
@Override
protected void onResume() {
super.onResume();
mybutton.performClick();
}
doesn't work.