Câu hỏi phỏng vấn Android
Câu hỏi

What’s the difference between onCreate() and onStart() ?

Câu trả lời

The main difference between onCreate() and onStart() in the Android activity lifecycle is:

  • onCreate() is called when the activity is first created. It is used for one-time initialization, such as setting up the user interface and initializing variables[1][4][5].

  • onStart() is called when the activity is becoming visible to the user. It makes the activity visible and prepares it to come to the foreground and become interactive[1][4][5].

In summary, onCreate() sets up the initial state of the activity, while `onStart()...

junior

junior

Gợi ý câu hỏi phỏng vấn

middle

Android Log.v() , Log.d() , Log.i() , Log.w() , Log.e() . When to use each one?

middle

What is the difference between onCreate() and onCreateView() lifecycle methods in Fragment ?

middle

What does LayoutInflater in Android do?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào