Tell us what is an Activity? Which method is implemented by all subclasses of an Activity?
Submitted by: MuhammadAn Activity is the screen representation of an application in Android.
It serves as an entry point for the user's interaction. Each activity has a layout file where you can place your UI. An application can have different activities. For example, Facebook start page where you enter your email/phone and password to login acts as an activity.
Below are the two methods which almost all subclasses of Activity will implement:
onCreate(Bundle): It is a method where your initialization is done. Under this, you will callsetContentView(int) with a layout resource which defines your UI. Also, you can retrieve the widgets in that UI by using findViewById(Int). These are required to interact programmatically.
onPause(): It is a method which deals with the user whenever it leaves the activity. So any changes made by the user should be committed which is done by the ContentProvider that holds the data.
Submitted by: Muhammad
It serves as an entry point for the user's interaction. Each activity has a layout file where you can place your UI. An application can have different activities. For example, Facebook start page where you enter your email/phone and password to login acts as an activity.
Below are the two methods which almost all subclasses of Activity will implement:
onCreate(Bundle): It is a method where your initialization is done. Under this, you will callsetContentView(int) with a layout resource which defines your UI. Also, you can retrieve the widgets in that UI by using findViewById(Int). These are required to interact programmatically.
onPause(): It is a method which deals with the user whenever it leaves the activity. So any changes made by the user should be committed which is done by the ContentProvider that holds the data.
Submitted by: Muhammad
Read Online Sr. Android Developer Job Interview Questions And Answers
Top Sr. Android Developer Questions
☺ | Do you know Android Architecture? |
☺ | Tell me which programming language is used for Android App development? |
☺ | What is intents in Android? What are the different types of intents? |
☺ | Do you know what is the latest version of Android? List all the versions of Android? |
☺ | Do you know what is AAPT? |
Top Mobile Technologies Categories
☺ | Android Interview Questions. |
☺ | Wireless Communication Interview Questions. |
☺ | 3G Interview Questions. |
☺ | iPhone Interview Questions. |
☺ | Mobile App Architect Interview Questions. |