Selasa, 07 Februari 2017

Recognize Activity on Android App

Recognize Activity on Android App

Recognize Activity on Android App. Activity represents one screen with a user interface. example, own activity An email application that shows a list of new emails, and other activity such as writing emails and reading emails.

If we have learned programming languages C, C ++, and Java certainly we see the program starting with function main (). It is very similar, the android application, the program begins with a callback method onCreate (). Sequence callback method from start activiy until the end of the activity can be seen in the diagram lifecycle activity



Callback method defines an event, we do not need to implement all callback method. However, you are important to understand each method Callback, so applications we behave according to expectations of the user.

MethodDescription
onCreate()Method ini pertama kali dipanggil ketika activity pertama dimulai.
onStart()Method ini dipanggil ketika activity sudah terlihat pada user.
onResume()Method ini dipanggil ketika activity mulai berinteraksi dengan user.
onPause()Method ini Dipanggil ketika activity berhenti sementara tidak menerima inputan user dan tidak mengeksekusi kode apapun.
onStop()Method ini dipanggil ketika activity sudah tidak terlihat pada user.
onDestroy()Method ini dipanggil sebelum sebuah activity di matikan.
onRestart()Method ini dipanggil setelah activity berhenti dan ditampilkan ulang oleh user.

 

0 komentar

Posting Komentar