简体   繁体   中英

Is there an event to fires when activity run?

在此处输入图像描述

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test); do{ //actions //In this point the elements not shows }while(condicion); } } 
@Override protected void onStart() { super.onStart(); //In this point the elements not shows }

Is there an event to fires after elements appear? (without invoke onPause() event)

Is there an event to fires when activity starts?

Yes, it is called onStart() as you see in the diagram you posted in your question.

Is there an event to fires after elements appear? (without invoke onPause() event)

No, the elements in your event are available immediately after you call setContentView() in onCreate() so there is no need for an event.

This sounds like you are trying to solve a problem that you think requires such an event. Please post a new question explaining what you want to do, including how the user interacts with your app and what you want to appear on the screen. We can point you to the correct way to accomplish this using the Android API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM