Showing posts with label java class. Show all posts
Showing posts with label java class. Show all posts

Thursday, June 19, 2014

Week 3: Lesson 5: Creating a Logo in Java, and Connecting the Classes in the Android Manifest

Lesson 5: Creating a Logo in Java, and Connecting the Classes in the Android Manifest
INTRODUCTION
Using a series of four video-based tutorials, this lesson leads you through the following tasks and processes. First, you will understand how icons are integrated into an Android application and a logo image is added to the layout. You will also learn what you will need to know about designing icons for Android applications. Second, you will be introduced to the Java class for integrating the MediaPlayer into the application by creating a new public class. Finally, you will learn how to create a new XML file within the application and then edit the Android Manifest to bring all of these changes together.

LESSON OBJECTIVES
By the end of this lesson, you will be able to:
Section #1: Understanding Icons & Launcher Graphics in Java For Android
1.     Explain the importance of application icons in your application. Reading: Iconography.
Section #2: Working with Classes
1.     Explain what a public class is and how it works within Java.
2.     Define what the MediaPlayer class does in Java for Android.
Section #3: Understanding The Android Manifest
1.     Practice how to link XML to Java class
2.     Determine how to set up buttons in the Java class
Section #4: Video Demonstrations: From Designing Icons to the Android Manifest 

LEARNING SEQUENCE

Required Reading
Read the following:
·      Section #1:

·      Section #2:


·      Section #3:
Resources
View the following: 
·      Sample Code
·      Video Transcripts
Assignments
Complete the following:
·      Explain the importance of Android application icons
·      What is a public class? What are some of the different class instances?
·       How does the Android Manifest address the concept of “hierarchy” within the application?

INSTRUCTION

Section #1: Understanding Icons & Launcher Graphics in Java For Android

In this section you will be introduced to what an icon is and why it is important to the branding and identity of an application. This section will begin to show you how the graphics integrated into your application will be used to represent an app marketplaces.
Step 1.
An icon is a graphic that takes up a small portion of screen real estate and provides a quick, intuitive representation of an action, a status, or an app. Read through the entire website to understand important design principles and understand how and why graphics and icons are central to your app. This reading covers all of the most common kinds of icons that you will need to develop ad use, including the logo, action bar, contextual and notification icons. Consider technical and design issues of size and scale, use of color, focal area, proportions and style.

Step 2.
Complete Assignment #1: Explain the importance of Android application icons

Section #2: Working with Classes
In this section, you will begin to better develop an understanding of what the syntax of a class is in Java. This knowledge will not only make you a better programmer but will assist you in expanding your knowledge of Java beyond Android development.


Step 1.
Read: Class
This resource provides a description directly from the Java for Android website. The definition provided here describes the details of querying class-related information of the three different class instances. Read through the web page to understand the three different class instances: those representing real classes and interfaces, those representing primitive types, and those representing array classes.

Step 2.
This reading extends the metaphor of a bicycle to explain classes. Go through the tutorial to gain a better understanding of additional concepts such as inheritance, an interface and a package. At the end of the reading and tutorial, you can test your knowledge of object-oriented programming concepts. Be sure to check your answers by clicking the Check Answers link.

Step 3.
Complete Assignment #2: What is a public class? What are some of the different class instances?

Section #3: Understanding The Android Manifest
In this section you will learn how to edit and manage the elements of the Android Manifest File. You will learn how this page of code becomes the “heart” of the application.
Step 1.
This is a description of the MediaPlayer class from the Android website. This page provides a summary of the use of the MediaPlayer class and the different states of the MediaPlayer within Java. This page provides a thorough overview of the lifecycle of this class.

Step 2.
This reading provides an overview of the AndroidManifest.xml, which is the root of the project hierarchy in Android applications. This reading will help you understand the importance of the file and learn how to define the components of metadata in your application.

Step 3.
Complete Assignment #3: How does the Android Manifest address the concept of “hierarchy” within the application?

Section #4: Video Demonstration on Designing Icons, to the Android Manifest 

This series of four video tutorials will guide you through the following processes and tasks as outlined below. Please pause and review the video, as necessary, to complete tasks. Transcripts are provided.

Step 1.
View & Practice: Lesson 5, Part 1 [11:18]
Demonstrates how to edit application icons and logos. In this video you will learn how to edit the icon and logo for the application and learn which folders they should be saved within (res folder). You will also be prompted to edit all the icons in the folders. You will also understand the difference in resolution between the icons based on the devices that they may be shown on. You will then create the logo page graphic for the application and placed this into the same folder as the other graphic. At the conclusion of this video, you will add an mp3 file into the raw folder (created earlier in the lesson) and then locate that folder into the res folder.

Step 2.
View & Practice: Lesson 5, Part 2 [6:28]
Shows how to prepare a new XML file for the layout of the logo. Within the Eclipse IDE, you will create an XML file for logo in layout folder. You will add the logo.png in the new XML file and save your project. Sample code will be used to introduce the public class and you will be shown where to add this code to continue in the next video.

Step 3.
View & Practice: Lesson 5, Part 3 [9:20]
Demonstrates how the class for the MediaPlayer and logo works in the Application. You will review how the MediaPlayer class is placed into the Java code and will walk through how to create the necessary overrides to make the music in the application play.

Step 4.
View & Practice: Lesson 5, Part 4 [3:30]
In this video-based tutorial, you will demonstrate how to create a new Class and a new XML file. You will begin editing the Java and Android Manifest of your application. You will also learn how to integrate the MediaPlayer class into the application and then you will learn how to edit the code of the Android Manifest to work with the other Java files created.

SUMMARY
In this lesson you have been introduced to the application icon and how to integrate the logo graphic which will represent the application on the home screen of the device. You have also learned about the public class in Java and some of the variety of different instances and the “object orientated” approach of the Java language in Android applications. This lesson draws together the variety of graphics, media and layout components that will make your application unique and provide a base for understanding how the XM layout, Java programing and manifest will work together.

ASSIGNMENTS
·      Explain the importance of Android application icons
·      What is a public class? What are some of the different class instances?

·      How does the Android Manifest address the concept of “hierarchy” within the application?

Week 2: Lesson 4: Introduction to the Java Language

Lesson 4: Introduction to the Java Language
INTRODUCTION
In this lesson you will be learning how to understand and use Java and how it will make your Android app work. The basic concepts of the Java language will set you on your way to becoming a proficient programmer, and you will be able to apply these concepts and skills as you work within the Eclipse IDE to create a mobile app for Android.

LESSON OBJECTIVES
By the end of this lesson, you will be able to:
Section #1: Introduction to Java for Android
1.     Develop a basic understanding of programming languages, including concepts and the terminology used to describe what programmers need to know and are able to do
2.     Identify central components of the Java language in order to use this language to develop your app for Android
3.     Describe how the Java language can be used to develop an app for Android
Section #2: Using Java for Android with Eclipse
1.     Practice using the Java language with the Eclipse IDE to create a mobile application for Android.
Section #3: Video Tutorial: Practice with the Java Language
1.     Practice how to link XML to Java class
2.     Determine how to set up buttons in the Java class

LEARNING SEQUENCE

Required Reading
Read the following:
·      Section #1:


·      Section #2:


Resources
View the following: 
·      Sample Code
·      Video Transcripts
Assignments
Complete the following:
·      The Five Basic Concepts in Programming
·      Starting a Project Using Java with the Eclipse IDE to Create Basic Components of an Android App


INSTRUCTION

Section #1: Introduction to Java for Android

In this section, you will gain insight into what most programmers know and do. While programming concepts may not be easy to initially grasp, you will understand them better in time and with practice. With knowledge of the Java language, you can develop both simple and sophisticated Android applications.

Step 1.
Read through this entire website and use it as a resource to develop your basic knowledge of programming for any language. The 5 central topics introduced in this reading will assist you in better understanding the central components of the Java Language. Read through each section which will cover Variables, Control Structures, Data Structures, Syntax, Tools for programming.  

Step 2.
This reading provides an overview of the Java language. Read through the concepts presented: Constructors, Inheritance, Static and Instance Variables, Interfaces, Imports, ”main” method, Inner Classes, Packages, Build Path, Jar Files, API’s, Comments and JavaDoc. This reading can become a resource to build your knowledge of the Java language and become a guide as you move through this course.

Step 3.
This reading will provide you with an introduction to Java programming but in the context of Android mobile development. This is important in this course as you will be learning the Java language but it will be used to develop mobile applications for the Android platform with development environment specific to this purpose. Starting from the Introduction and Getting Started, read all the way to the section on Wrapping Up. This reading provides descriptions of the necessary downloads, overview of Java and object orientated programming (OOP).

Step 4.
Complete Assignment #1: The Five Basic Concepts in Programming

Section #2: Using Java for Android with Eclipse
In this section you will understand more about how to work with the Eclipse software. Basic components of the Eclipse UI will be explained. This should set you on your way to creating your Android project with ease.

Step 1.
This resource offers a step-by-step guide on how to set up the SDK and Eclipse. With the ADT (Android Developer Tools) plugin, Eclipse provides an environment in which you can build, code, design, and run your Android apps.

Step 2.
Complete Assignment #2: Starting a Project Using Java with the Eclipse IDE to Create Basic Components of an Android App

Section #3: Video Demonstration on Developing an Understanding of Java

This video tutorial will guide you through the process of how to link XML to a Java class. You will also determine how to set up buttons in the Java class. Please pause and review the video, as necessary, to complete tasks. Transcripts are provided.

Step 1.
View & Practice: Lesson 4 [6:52]

SUMMARY
While the Java language and the concepts behind it may take some time for you to understand and use, the five concepts presented in this lesson will set you on your way to becoming more proficient with the language. Now that you know a bit more about basic concepts in programming and with the Java language in specific, you can determine how to best develop your Android app using the Eclipse IDE. In the next lesson you will be introduced to new Java classes as you create a logo for your app.

ASSIGNMENTS
·      The Five Basic Concepts in Programming
·      Starting a Project Using Java with the Eclipse IDE to Create Basic Components of an Android App