1 / 19

Android: HelloWorld App

Android: HelloWorld App. CIT 49900 Senior Project By: Ryan Seymour. Android HelloWorld App: Creating the Project. In this power point you will develop your first Android application for a tablet. You will set up a Android project. View the programming environment .

happy
Download Presentation

Android: HelloWorld App

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android: HelloWorld App CIT 49900Senior Project By: Ryan Seymour

  2. Android HelloWorld App:Creating the Project In this power point you will develop your first Android application for a tablet. You will set up a Android project. View the programming environment . Add the code for a text box and button. Run the emulator to view your HelloWorld app.

  3. Android HelloWorld App:Creating the Project Open Eclipse then select File->New-> Project

  4. Android HelloWorld App:Creating the Project In the New Project Window select the folder Android then the Android Project.

  5. Android HelloWorld App:Creating the Project Name the Project HelloWorld the select Next.

  6. Android HelloWorld App:Creating the Project Check the SDK target of Android 3.0 for this example. (Example was build w/Android 3.0 so to avoid conflicting errors this SDK will be used instead of the latest one.)

  7. Android HelloWorld App:Creating the Project Name the package using recommended convention of using your domain name in reverse order followed by the project name. For example a domain of johndoe.net would be converted as follows: Supplied text: your.package.namespaceMeans: extension.domain name .application nameExample: net.johndoe.HelloWorld

  8. Android HelloWorld App:Creating the Project Set the minimum SDK to 11 since for this example and select Finish to create the HelloWorld Project.

  9. Android HelloWorld App:Environment First thing is to clean up your work environment by closing unneeded windows. Expand the HelloWorld folder in the Package Explorer on the left side of the IDE. Also take note in the top right corner you are viewing the Java perspective.

  10. Android HelloWorld App:Environment

  11. Android HelloWorld App:Coding Expand the res/layout folder inside the HelloWorld folder to find main.xml. Open it by double clicking. Add the following code before the end of the </LinearLayout> <TextView android:layout_width="fill_parent“ android:layout_height="wrap_content" android:text="This is my first Android Application!" /> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="And this is a clickable button" />

  12. Android HelloWorld App:ViewGroups/ Layouts There are six different ViewGroups/layouts that can be used to setup the User Interface (UI). They are as follows: LinerarLayout, Absolute layout, TableLayout, RelativeLayout, FrameLayout, & ScrollView The LinearLayout is the one you will use the most often during these PowerPoints. When creating a project LinearLayout is the proper way to code it, not linearlayout or linear layout. A misspelled layout/file will crash the project.

  13. Android HelloWorld App:Coding

  14. Android HelloWorld App:Emulator Save your project if you haven’t by pressing Ctrl+s. To test your HelloWorld app select the project name in the Package Explorer then press F11. Select Android Application as the way to debug.

  15. Android HelloWorld App:The Waiting Again the waiting for the emulator to load…

  16. Android HelloWorld App:The HelloWorld App The HelloWorld App you just created. The button is clickable but doesn’t do an logic yet.

  17. Android HelloWorld App:The HelloWorld App If you hit the tablets home button then the Apps icon you will now see a icon for the HelloWorld app.

  18. Android HelloWorld App:What to Turn In Compress the HelloWorld folder where you defined your workspace for Eclipse.

  19. Android HelloWorld App:Conclusion Congratulations, you created your first Android app. You have modified the apps layout to include a button and a text field. From here you will modify this app for the next assignment.

More Related