Android 3 exploring apps and the development environment
Download
1 / 44

Android 3: Exploring Apps and the Development Environment - PowerPoint PPT Presentation


  • 112 Views
  • Uploaded on

Android 3: Exploring Apps and the Development Environment. Kirk Scott. Outline. 3.1 Introduction 3.2 The Project Explorer 3.3 / src / com.example.myfirstapp / Main_Activity.java 3.4 /res/layout/activity_main.xml 3.5 / res/values/strings.xml 3.6 /res/ drawable-hdpi

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Android 3: Exploring Apps and the Development Environment' - gayora


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Android 3 exploring apps and the development environment

Android 3: Exploring Apps and the Development Environment

Kirk Scott


Outline
Outline

  • 3.1 Introduction

  • 3.2 The Project Explorer

  • 3.3 /src/com.example.myfirstapp/ Main_Activity.java

  • 3.4 /res/layout/activity_main.xml

  • 3.5 /res/values/strings.xml

  • 3.6 /res/drawable-hdpi

  • 3.7 /res/raw

  • 3.8 Summary



  • This unit surveys some of the aspects of an Android app

  • Its main purpose is to survey how you can find these aspects of an app through the Eclipse project explorer interface

  • Later on, it will be necessary to do certain things through that interface



3 2 the project explorer
3.2 assumption that Java and Eclipse had been installed on a development machine, a pc or a laptopThe Project Explorer



  • In the File menu, there is an Import option environment with nothing open in it

  • This will be covered concretely in a future set of overheads

  • For the time being note that the following overhead shows the first of the set of steps for importing an Android project into the environment



  • The screenshot on the following overhead shows interest, in this case name “My First App”, has been successfully importedMy First App in Eclipse

  • A file associated with the app, a layout, is open in the editing area

  • The key point of interest is the Project Explorer, which is on the left hand side

  • In the explorer, the folder containing the app has been expanded to show the items immediately underneath it


  • Being able to use the explorer will be critical interest, in this case name “My First App”, has been successfully imported

  • If something has happened to cause it to disappear, you can always restore the Project Explorer

  • Take these options in the menu:

  • Window, Show View, Project Explorer


Expanded view of the project in the explorer
Expanded View of the Project in the Explorer interest, in this case name “My First App”, has been successfully imported

  • The screenshot on the following overhead shows the subfolders in the Project Explorer expanded

  • You expand folders and subfolders by double clicking on them with the mouse

  • The following sections of this unit look at items of interest in these expanded folders


  • If all folders are expanded interest, in this case name “My First App”, has been successfully imported, not everything is visible at the bottom of the explorer

  • Using the scroll bars you can move up and down through the explorer


3 3 src com example myfirstapp main activity java
3.3 interest, in this case name “My First App”, has been successfully imported/src/com.example.myfirstapp/Main_Activity.java


  • The screenshot on the interest, in this case name “My First App”, has been successfully importedfollowing overhead shows what you see when you double click on Main_Activity.java in the Project Explorer

  • This is essentially the Java source code for the app

  • We are not interested in the code itself

  • But later on, it will be necessary to be able to find this code when working with the flashcard app


3 4 res layout activity main xml
3.4 interest, in this case name “My First App”, has been successfully imported/res/layout/activity_main.xml



  • The layout is when you double click on stored separately from the code logic

  • But like the code logic, for our purposes, the layout is a predefined given for the flashcard app

  • We will accept the given layout, and simply be interested in providing content to put in it


  • Consider the contents of the screenshot again: when you double click on

  • On the left, there is the Eclipse Project Explorer, with the folders expanded

  • In the center, there is a view of the graphical layout of the app

  • This visible graphical layout is defined by the file activity_main.xml


  • At when you double click on the bottom of the editor are two tabs, one for Graphical Layout and one simply showing the name of the file, activity_main.xml

  • Clicking on the activity_main.xml tab shows you the xml source code, as shown on the following overhead


  • The reason for mentioning this is just so you don’t get confused

  • As a non-technical user of Eclipse and the interface, for one reason or another, at one time you might see a graphical layout while at another you might see an XML file

  • Since we aren’t doing development, it doesn’t matter either way


3 5 res values strings xml
3.5 confused/res/values/strings.xml


  • The screenshot on the confusedfollowing overhead shows the Project Explorer scrolled down to show /res/values/strings.xml

  • It also shows what you see when you double click on strings.xml

  • (Note that of the two tabs at the bottom of the editor screen, you need to be on strings.xml, not Resources, if you want to see the XML source code)


What about strings xml
What about strings.xml? confused

  • The elements in strings.xml are important because they are part of the definition of the content of an app

  • For the flashcard app, some of the content will be predefined and saved in strings.xml



  • The kinds of things that are defined here are: confused

  • The labels on buttons

  • The name of the app as presented on the screen

  • Sentences or phrases which will remain the same even after you have entered your specialized content for a flashcard app for a particular topic


3 6 res drawable hdpi
3.6 / confusedres/drawable-hdpi



3 7 res raw
3.7 / confusedres/raw



3 8 summary
3.8 Summary confused




The end
The End app


ad