Experiment 3 use of color, string resources

Source: Internet
Author: User

Lab Report

Course Name

Mobile Internet development based on Android platform

Date of experiment

March 25, 2016

Name of the experimental project

Experiment 3 use of color, string resources

Location of the experiment

S3010

Type of experiment

-Verification Type √ design type-comprehensive type

Hours

2

The purpose and requirements of the experiment (the knowledge points which are involved in this experiment and are required to be mastered)

Purpose

  1. Learn how to use color and string resources in Android.
  2. Understand how size and layout resources are used in Android.

Requirements

  1. Use color resources for activity and view in project;
  2. Use string resources and understand the reference mechanism of string resources;
  3. Set the dimensions for the view components in Android;
  4. Use layout resources to place components on the interface at the specified location.

second, the experimental environment (the hardware equipment and related software used in this experiment)

(1) PC Machine

(2) Operating system: Windows XP

(3) Software: Eclipse, jdk1.6,android Sdk,adt

Third, the contents and steps of the experiment

  1. 1. Create Project: excercise
  2. 2. Modify the string resource:/res/values/strings.xml
  3. 3. New Color Resource Color.xml
  4. 4. Using resource colors and string resources
  5. 5. Create a new gzcc.xml under layout
  6. 6. Create a new Gzccactivity.java and write the relevant code in Mainactivity.java and Gzccactivity.java
  7. 7. Modify the Androidmanifest.xml file

Four, the experimental results (the experimental source program list and operating results or experimental conclusions, experimental design drawings)

Code:

Activity_main.xml Code:

Gzcc.xml Code:

Mainactivity.java Code:

Gzcc.java Code:

Androidmanifest.xml part of the code:

Run Result: ()

Use of dimensions and layout resources:

Five, Experimental summary (analysis of the results of the experiment, experience and improvement of experimental ideas)

This experiment feels good, the experiment process did not encounter any difficulty or do not understand, very successful practice.

Experimental reviews

Experimental results

Guide Teacher Signature: Date

Experiment 3 use of color, string resources

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.