I have an activity contains too many UI controls. I want to execute a method after make the activity visible.
An example i tried:
public class Main extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MyMethod();
}
private void MyMethod(){
Toast.makeText(this, "Hi UI is fully loaded", Toast.LENGTH_SHORT).show();
}
}
But in the above sample, the message shows before the activity is visible.
Is there a way to find out, if the activity is fully visible ?