Android Development Training for Beginners - Activity

1,109 views

Published on

This is an activity for CCA Java Class Batch 4 Android Development Training for Beginners.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,109
On SlideShare
0
From Embeds
0
Number of Embeds
222
Actions
Shares
0
Downloads
25
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Android Development Training for Beginners - Activity

  1. 1. Android DevelopmentTraining for BeginnersSAMPLE PROJECT INSTRUCTIONS: MARK-8! By: Joemarie Comeros Amparo
  2. 2. SAVE CANCEL
  3. 3. Screen 1 : Displays both image and its information.A link that passes and opens SCREEN 2. Changesfrom screen 2 must be captured and updates thedisplayed information for whatever changes fromscreen 2.Screen 2 : Accepts input from user that correspondsthe information from SCREEN 1. All fields must becorrectly filled , if not user must be informed.Saving changes will end activity and pass data toscreen 1. Cancelling activity will simply closes thescreen and displays previous screen.
  4. 4. Option Menu : Create an XML menu file that contains 3 items : Call, SMSand 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.
  5. 5.  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
  6. 6. Joemarie Comeros Amparo about.me/joemarieamparo Skype/Ymail/Gmail : joemarieamparo Facebook: joemarieamparo@yahoo.com

×