Training Session 2

1,063 views
1,012 views

Published on

Day 1.
->Program Introduction
->Installation guide
->Creating New Application
->Project Structure
->Basic Application development using Button, Edittext, textView and Toast

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
1,063
On SlideShare
0
From Embeds
0
Number of Embeds
622
Actions
Shares
0
Downloads
46
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Training Session 2

  1. 1. HELLO FELLOW ENTHUSIASTS
  2. 2. @vivekbhusal Vivek Bhusal Mobile Application Developer, YoungInnovations 2 years in mobile application development http://vivekbhusal.com Toastmasters Timer StoresMunk iPaidaBribe Marriage Center Collection
  3. 3. Rakeeb Rajbhandari Jr. Mobile Application Developer, YoungInnovations 6 months in mobile application development Taxi Fare Self Help
  4. 4. Anjan Shrestha UX Lead, YoungInnovations 5+ years in UI design and development http://anjhero.me
  5. 5. Prawesh Shrestha Project Manager, YoungInnovations 3+ years Manager for Mobile Nepal
  6. 6. Mobile Nepal Community Common Platform to share, learn and grow Events Hello Sarkar M2Work Hackathon Pivot Nepal NASA Space Apps http://mobilenepal.net
  7. 7. This is an extensive course that covers the Android Basics and more.
  8. 8. This is an extensive course that covers the Android Basics and more. Aimed to get you STARTED on the right foot.
  9. 9. This is an extensive course that covers the Android Basics and more. Aimed to get you STARTED on the right foot. Know your Android better.
  10. 10. This is an extensive course that covers the Android Basics and more. Aimed to get you STARTED on the right foot. Know your Android better. Develop an Android Application?
  11. 11. INSTALLATION
  12. 12. The official development environment Google recommends for Android Java SDK Android SDK Android Eclipse IDE
  13. 13. The official development environment Google recommends for Android Java SDK Android SDK Installed Together is the ADT Bundle Android Eclipse IDE
  14. 14. Installed Together is the ADT Bundle PREREQUISITES Java SDK and the Java Runtime Environment http://bit.ly/bMkbpo
  15. 15. Download ADT Bundle from http://developer.android.com/sdk/index.html Unzip and Extract Navigate to the “eclipse” folder to launch eclipse
  16. 16. Development demands packages which can be downloaded from SDK Manager
  17. 17. Select these boxes. Also, select -  Doc, Samples, Intel -  Optional -  -  Android Support Library Google USB Driver Select Install Packages
  18. 18. TESTING ON EMULATORS
  19. 19. http:// developer.android.com/tools/ devices/emulator.html We can test apps that we are building on Android Emulator Testing can also be done plugging an Android device For a smoother experience, installation of the Intel x86 HAXM is recommended. http://bit.ly/1aFloCd
  20. 20. Setting up Emulator
  21. 21. AVD Manager
  22. 22. In Eclipse, select window -> Android Virtual Device Manager Select New … on the right menu. Enter values as shown.
  23. 23. Running the Emulator
  24. 24. AVD Manager
  25. 25. TIME TO PROGRAM
  26. 26. SETTING UP THE PROJECT
  27. 27. SETTING UP THE PROJECT
  28. 28. SETTING UP THE PROJECT Checklist Minimum SDK support must be setup Features like the ActionBar is not available in earlier API versions. Target APK The API being targetted Always compile with the latest API Keep clicking on Next untill we end the setup process
  29. 29. 1 Create the UI for our application. xml   2 Make the UI functional java   Getting started
  30. 30. xml   java   UI Instatiation UI Functions
  31. 31. Guidelines
  32. 32. <Button android:id = “@+id/button” android:layout_width = “fill_parent” android:layout_height = “wrap_content” android:text = “Press Me”/> While working with Views/UI elements always give them an id width and height are compulsory to declare. id's are to be declared if they are to be manipulated.
  33. 33. setContentView() : … setContentView(R.layout.file_name); Refer to your layout in your src with this
  34. 34. Button button: … (inside onCreate()) button = (Button) findViewById(R.id.button); Refer to the Button declared earlier
  35. 35. button.setOnClickListener( … ); Manipulating the Button
  36. 36. Toast.makeText(getApplicationContext(), “This is a short popup message”, Toast.LENGTH_SHORT).show(); Displaying the Short Popup
  37. 37. Auto-generated: DO NOT EDIT Contains ID of the project resources Use findViewById and Resources object to get access to the resources: R class found under gen E.g. Button = (Button)findViewById(R.id.button); E.g. getResources().getString(R.string. hello);
  38. 38. THAT’S ALL FOLKS! WE’LL SEE YOU TOMORROW

×