I have an activity contains too many UI controls. I want to execute a method after make the activity visible.
An example i tried:
publi
there is no real callback, which is called, exactly at that time the Activity is Visible. But as you can see in the attached picture, the method onResume()
is just called when Activity should be visible.
Also have a look at the Activity lifecycle and the documentation HERE
So your method should be called like this:
@Override
public void onResume() {
super.onResume();
MyMethod();
}