Experiment 4 use of color, string resources

Source: Internet
Author: User

Course Name

Mobile Internet development based on Android platform

Date of experiment

2015.3.25

Name of the experimental project

Experiment 4 use of color, string resources

Location of the experiment

S30010

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)

1. Learn how to use color and string resources in Android.

2, understand how to use the size and layout resources in Android.

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. Create a project
  2. modifying string resources
  3. New Color Resource Color.xml
  4. Working with resource colors and string resources
  5. Use of dimensions and layout resources

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

Code:

String.xml

<?xml version= "1.0" encoding= "Utf-8"?>
<resources>

<string name= "App_name" >shudu</string>
<string name= "Action_settings" >Settings</string>
<string name= "Hello_world" >hello world!</string>
<string name= "Main_title" >android shudu</string>
<string name= "Continue_label" >Continue</string>
<string name= "New_game_label" >new game</string>
<string name= "About_label" >About</string>
<string name= "Exit_label" >Exit</string>
<string name= "Setting_title" >shudu setting</string>
<string name= "Setting_label" >Setting...</string>
<string name= "Setting_shorcut" >Shortcut</string>
<string name= "Music_title" >Music</string>
<string name= "music_summary" >play background music</string>
<string name= "Hints_title" >Hints</string>
<string name= "hints_summary" >show hints druing play</string>


<string name= "New_game_title" >Difficulty</string>
<string name= "Easy_label" >Easy</string>
<string name= "Medium_label" >Medium</string>
<string name= "Hard_label" >Hard</string>
<string name= "Game_title" >Game</string>
<string name= "No_moves_label" >no moves</string>
<string name= "Keypad_title" >Keypad</string>
<string name= "About_title" >about Android shudu</string>
<string name= "About_text" >\
Shudu is a logic-based number placement puzzle.
Starting with a partially completed 9x9 grid, the
Objective is to fill the grid so, each
row, each column, and each of the 3x3 boxes
(also called <i>blocks</i>) contains the digits
1 to 9 exactly once.
</string>
<string name= "Login" > Login </string>
<string name= "Register" > Registration </string>

</resources>

Color.xml

<?xml version= "1.0" encoding= "Utf-8"?>
<resources>

<color name= "Background" > #ff2f4f4f </color>

<color name= "Puzzle_background" > #ffe6f0ff </color>
<color name= "Puzzle_hilite" > #ffffffff </color>
<color name= "Puzzle_light" > #64c6d4ef </color>
<color name= "Puzzle_dark" > #6456648f </color>
<color name= "Puzzle_foreground" > #ff000000 </color>
<color name= "Puzzle_hint_0" > #64ff0000 </color>
<color name= "puzzle_hint_1" > #6400ff80 </color>
<color name= "Puzzle_hint_2" > #2000ff80 </color>
<color name= "puzzle_selected" > #64ff8000 </color>


</resources>

Run:

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

The overall experiment is still very smooth, because can be skilled in the construction of Color.xml documents, but also add a picture, although the effect is general, but still very good.

Experimental reviews

Experimental results

Guide Teacher Signature: Date

Experiment 4 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.