0 votes
in Android by
Which method is implemented by all subclasses of an Activity?

1 Answer

0 votes
by

The methods which almost all subclasses of Activity will implement are:

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.

onCreate(Bundle): 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. 

Related questions

0 votes
asked Oct 7, 2019 in Android by pranay jain
0 votes
asked Jan 1 in Android by DavidAnderson
...