Your SlideShare is downloading. ×
0
Android Application Development Being Active Through Activities & Intents                                             Ahsa...
Today We’re Covering…•   Application Structure•   Android Application Anatomy•   Activity•   Layout•   Using Layouts from ...
Android ActivitiesActivityActivity provides a user generally with an interactive screen to do something like:Dialing the p...
Android Activities (Contd..)Creating ActivityWe have already created Activities. But how did we create it?Let’s revisit…1....
Android Activities (Contd..)Next Step: Implementing User Interface   1. Design res/layout/yourlayout.xml   2. Use Views fr...
Android Activities Exercise 1. We’ll make 2 Activities 2. Registration with basic features and validation:     1. Email ad...
Android Activities Exercise (Contd.) 1. How to add new Activities to the application 2. How to navigate from one Activity ...
Android Activities Exercise (Contd.) How to navigate from one Activity to another                                         ...
Activity Lifecycle
Activity Lifecycle (Contd.)
Upcoming SlideShare
Loading in...5
×

Day 4: Android: Getting Active through Activities

4,623

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
4,623
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
134
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Day 4: Android: Getting Active through Activities"

  1. 1. Android Application Development Being Active Through Activities & Intents Ahsanul Karim ahsanul.karim@sentinelbd.com Sentinel Solutions Ltd. http://www.sentinelbd.com
  2. 2. Today We’re Covering…• Application Structure• Android Application Anatomy• Activity• Layout• Using Layouts from Activity• Activity to Activity Transition• Activity Lifecycle• Exercise
  3. 3. Android ActivitiesActivityActivity provides a user generally with an interactive screen to do something like:Dialing the phone, View a map List of something for user to select or Anything youwant your user to do• An application usually consists of multiple activities.• Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the application for the first time. (which is specified in AndroidMenifest.xml)The <action> element specifies that this is the "main" entry point to the application.The <category> element specifies that this activity should be listed in the systems applicationlauncher (to allow users to launch this activity).
  4. 4. Android Activities (Contd..)Creating ActivityWe have already created Activities. But how did we create it?Let’s revisit…1. We created subclass of Activity base class2. We implemented one callback method onCreate Open Questions:1. What is creating subclass???2. What is callback methods???
  5. 5. Android Activities (Contd..)Next Step: Implementing User Interface 1. Design res/layout/yourlayout.xml 2. Use Views from Activity classNext Step: Implementing User Interface <manifest ... > <application ... > <activity android:name=".ExampleActivity" /> ... </application ... > ... </manifest > Next Step: Starting ActivityWe can start another activity by calling startActivity(), passing it an Intent that describes theactivity you want to start. Intent intent = new Intent(this, ToActivity.class); startActivity(intent);
  6. 6. Android Activities Exercise 1. We’ll make 2 Activities 2. Registration with basic features and validation: 1. Email address 2. First Name, Last Name 3. Date of Birth 4. Password 5. Confirm Password 6. I agree to terms and conditions 7. Buttons: Cancel, Submit 3. Login 1. Email address 2. Password 3. Buttons: New User, Login (To be added: Remember me) Link: http://developer.android.com/guide/appendix/faq/commontasks.html
  7. 7. Android Activities Exercise (Contd.) 1. How to add new Activities to the application 2. How to navigate from one Activity to another How to navigate from one Activity to another Intent Intent intent_1_to_2 = new Intent(this, Activity2.class); startActivity(intent_1_to_2); Intent Intent intent_2_to_1 = new Intent(this, Activity1.class); startActivity(intent_2_to_1);
  8. 8. Android Activities Exercise (Contd.) How to navigate from one Activity to another Intent Intent intent1to2 = new Intent(this, Activity2.class); startActivity(intent1to2); Intent Intent intent2to1 = new Intent(this, Activity1.class); startActivity(intent2to1);
  9. 9. Activity Lifecycle
  10. 10. Activity Lifecycle (Contd.)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×