Creating Activity class:
We have following steps to create Activity class
1) Create a subclass of Activity
2) Override onCreate method of Activity
3) Call super class onCreate method
4) Attach layout by calling setContentView(layout_file)
Ex: class MyActivity extends Activity{
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}