Getting started with Android Engineers (1)-this week's entrance, time-consuming, light-spraying, and android engineers

Source: Internet
Author: User

Getting started with Android Engineers (1)-this week's entrance, time-consuming, light-spraying, and android engineers

Squeeze time, first.

I. Environment Construction

.

Ii. Project Structure

In studio, project = Module;

Res: all resources applied --The size of the generated APK is basically determined.;

Java: java source program;

Manifests: inventory fileFor all configurations, the first access point for each execution;

-- Res

Drawable: Stores image resources;

Layout: layout;

Menu: exclusive menu layout;

Mipmap: Mipmaps can be used as early as Android2.2 +, but it is not strongly recommended until google 4.3. Placing images on mipmaps can speed up image rendering, improve image quality, and reduce GPU pressure;

Values: stores strings, themes, colors, and styles;

3. Enter and display text on the Interface

3.1 control Overview

TextView: displays text box controls;

EditText: Enter the text box;

-- Common attributes

Android: id -- Control id;

Android: layout_width -- the width of the space;

~ Height;

~ Text -- text content;

~ TextSize -- text size;

~ TextColor;

~ Background;

There are two more EditText :~ Hint input prompt text; inputType input text type

3.2 Implementation

In main. xml of layout

<! -- Wrap_content: contains the actual text content match_parent: the current control is full of the parent class container fill_parent: Same as above, for earlier versions of sdk -->

<TextView android: id = "@ + id/textView1" android: layout_width = "wrap_content" android: layout_height = "match_parent" android: text = "name:" android: textSize = "28sp" android: textColor = "#000000"/> <EditText android: hint = "enter your name" android: id = "@ + id/editText1" android: layout_width = "match_parent" android: layout_height = "match_parent"/>

  

 

Related Article

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.