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
Move the code on to onResume.
System calls this method every time your activity comes into the foreground, including when it's created for the first time. Read details for Pausing and Resuming an Activity
@Override
protected void onResume() {
super.onResume();
MyMethod();
}
Read more at Android activity life cycle - what are all these methods for?