written 7.4 years ago by | • modified 7.4 years ago |
Mumbai University > Information Technology > Sem 5 > Open Source Technology
Marks: 5M
Year: Dec 2015
written 7.4 years ago by | • modified 7.4 years ago |
Mumbai University > Information Technology > Sem 5 > Open Source Technology
Marks: 5M
Year: Dec 2015
written 7.4 years ago by |
Creating Activity
We can create an activity by creating a java class that extends Activity class.
Each activity needs to create window for which user components are loaded. For this SetContentView() method is used.
Activities are displayed as full screen, but you can set different views such as floating by using WindowIsFloating or embedded by using ActivityGroupClass.
Startind an activity
Android API provides startActivity(Intent) method to start a new activity.
When new activity is invoked it is placed at the top of activity stack by pushing other activities.
StartActivity() method accepts single argument.