SlideShare une entreprise Scribd logo
1  sur  10
Android Development
Training for Beginners
SAMPLE PROJECT INSTRUCTIONS: MARK-8!




             By: Joemarie Comeros Amparo
SAVE   CANCEL
Screen 1 :
          Displays both image and its information.
A link that passes and opens SCREEN 2. Changes
from screen 2 must be captured and updates the
displayed information for whatever changes from
screen 2.


Screen 2 :
           Accepts input from user that corresponds
the information from SCREEN 1. All fields must be
correctly filled , if not user must be informed.
Saving changes will end activity and pass data to
screen 1. Cancelling activity will simply closes the
screen and displays previous screen.
Option Menu :

 Create an XML menu file that contains 3 items : Call, SMS
and Exit
 Override onCreateOptionsMenu inside the activity:
  @Override
  public boolean onCreateOptionsMenu (Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.image_details_menu, menu);
   return true;
  }
 Handle selected item :
  @Override
  public boolean onOptionsItemSelected (MenuItem item) {
         switch(item.getItemId())
         {
         case R.id.call:
                        callContact();
                         break;
          }
     return true;
   }
 SMS option opens SCREEN #3 as dialog.
 Create an XML menu file that declare GridView alone.
 Create new class that:
  - extend BaseAdapter
  - accepts context as parameter
  - initialies an array of integer for image resources
  - return image as object for image getter
  - returns View :
   @Override
   public View getView(int position, View convertView, ViewGroup
              parent) {
   ImageView imageView = new ImageView(mContext);
   imageView.setImageResource(mThumbIds[position]);
   imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
   imageView.setLayoutParams(new GridView.LayoutParams(100, 100));
   return imageView;
   }
 Open new activity when item is selected.
 Exit as Option menu
Joemarie Comeros Amparo
               about.me/joemarieamparo
      Skype/Ymail/Gmail : joemarieamparo
     Facebook: joemarieamparo@yahoo.com

Contenu connexe

Similaire à Android Beginner Project Instructions

Create an other activity lesson 3
Create an other activity lesson 3Create an other activity lesson 3
Create an other activity lesson 3Kalluri Vinay Reddy
 
Android animations
Android animationsAndroid animations
Android animationsKumar
 
MenusAnddailogsinandroidddfdadusjsjdjdjs
MenusAnddailogsinandroidddfdadusjsjdjdjsMenusAnddailogsinandroidddfdadusjsjdjdjs
MenusAnddailogsinandroidddfdadusjsjdjdjsomkardolas3
 
Chapt 04 user interaction
Chapt 04 user interactionChapt 04 user interaction
Chapt 04 user interactionEdi Faizal
 
Handling action bar in Android
Handling action bar in AndroidHandling action bar in Android
Handling action bar in Androidindiangarg
 
Local Notification Tutorial
Local Notification TutorialLocal Notification Tutorial
Local Notification TutorialKetan Raval
 
Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesSamsung Developers
 
Android Event and IntentAndroid Event and Intent
Android Event and IntentAndroid Event and IntentAndroid Event and IntentAndroid Event and Intent
Android Event and IntentAndroid Event and Intentadmin220812
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI WidgetsAhsanul Karim
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Ahsanul Karim
 
Session 2 Bai 2 ve winform
Session 2 Bai 2 ve winformSession 2 Bai 2 ve winform
Session 2 Bai 2 ve winformmrtom16071980
 

Similaire à Android Beginner Project Instructions (20)

Notification android
Notification androidNotification android
Notification android
 
Create an other activity lesson 3
Create an other activity lesson 3Create an other activity lesson 3
Create an other activity lesson 3
 
Exercises
ExercisesExercises
Exercises
 
Android action bar and notifications-chapter16
Android action bar and notifications-chapter16Android action bar and notifications-chapter16
Android action bar and notifications-chapter16
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
 
Android animations
Android animationsAndroid animations
Android animations
 
Action Bar in Android
Action Bar in AndroidAction Bar in Android
Action Bar in Android
 
MenusAnddailogsinandroidddfdadusjsjdjdjs
MenusAnddailogsinandroidddfdadusjsjdjdjsMenusAnddailogsinandroidddfdadusjsjdjdjs
MenusAnddailogsinandroidddfdadusjsjdjdjs
 
Android session 3
Android session 3Android session 3
Android session 3
 
Chapt 04 user interaction
Chapt 04 user interactionChapt 04 user interaction
Chapt 04 user interaction
 
Handling action bar in Android
Handling action bar in AndroidHandling action bar in Android
Handling action bar in Android
 
Local Notification Tutorial
Local Notification TutorialLocal Notification Tutorial
Local Notification Tutorial
 
Lab3-Android
Lab3-AndroidLab3-Android
Lab3-Android
 
Advancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and GesturesAdvancing the UI — Part 1: Look, Motion, and Gestures
Advancing the UI — Part 1: Look, Motion, and Gestures
 
Android Event and IntentAndroid Event and Intent
Android Event and IntentAndroid Event and IntentAndroid Event and IntentAndroid Event and Intent
Android Event and IntentAndroid Event and Intent
 
How to create android push notifications with custom view
How to create android push notifications with custom viewHow to create android push notifications with custom view
How to create android push notifications with custom view
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]
 
Session 2 Bai 2 ve winform
Session 2 Bai 2 ve winformSession 2 Bai 2 ve winform
Session 2 Bai 2 ve winform
 
Activity & Shared Preference
Activity & Shared PreferenceActivity & Shared Preference
Activity & Shared Preference
 

Android Beginner Project Instructions

  • 1. Android Development Training for Beginners SAMPLE PROJECT INSTRUCTIONS: MARK-8! By: Joemarie Comeros Amparo
  • 2.
  • 3. SAVE CANCEL
  • 4. Screen 1 : Displays both image and its information. A link that passes and opens SCREEN 2. Changes from screen 2 must be captured and updates the displayed information for whatever changes from screen 2. Screen 2 : Accepts input from user that corresponds the information from SCREEN 1. All fields must be correctly filled , if not user must be informed. Saving changes will end activity and pass data to screen 1. Cancelling activity will simply closes the screen and displays previous screen.
  • 5.
  • 6.
  • 7. Option Menu :  Create an XML menu file that contains 3 items : Call, SMS and Exit  Override onCreateOptionsMenu inside the activity: @Override public boolean onCreateOptionsMenu (Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.image_details_menu, menu); return true; }  Handle selected item : @Override public boolean onOptionsItemSelected (MenuItem item) { switch(item.getItemId()) { case R.id.call: callContact(); break; } return true; }  SMS option opens SCREEN #3 as dialog.
  • 8.
  • 9.  Create an XML menu file that declare GridView alone.  Create new class that: - extend BaseAdapter - accepts context as parameter - initialies an array of integer for image resources - return image as object for image getter - returns View : @Override public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = new ImageView(mContext); imageView.setImageResource(mThumbIds[position]); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); imageView.setLayoutParams(new GridView.LayoutParams(100, 100)); return imageView; }  Open new activity when item is selected.  Exit as Option menu
  • 10. Joemarie Comeros Amparo about.me/joemarieamparo Skype/Ymail/Gmail : joemarieamparo Facebook: joemarieamparo@yahoo.com