Android Development Essay One

Source: Internet
Author: User

First, Android development experience:

1. The project should be created with care:

1) Enter Com.bignerdranch.android.geoquiz at the package name and the package name follows the "DNS inversion" convention.

That is, after the domain name of the enterprise organization or company is reversed, the name is applied on the tail attachment. Adherence to this Convention guarantees the uniqueness of the package name, so that

Different apps from the same device and Google Play Store can be distinguished.

2) named Quizactivity in Activity name, the system automatically generates activity_quiz.xml in Layout name, suggesting

Follow such a good naming habit.

2. User interface Design:

buttons, text input controls, selection boxes, and so on are components

<LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"         
Android:layout_width
= "Match_parent"Match_parent is as much space as the filling unit
Android:layout_height
= "Match_parent"android:gravity= "center" //gravity where the control element appears in the control android:orientation= "vertical" >    <TextView
    
Android:layout_width= "Wrap_content"//wrap_content is automatic layout based on content
Android:layout_height
= "Wrap_content"
Android:padding
= "24DP"//padding Specifies the distance between the element's border and the element's content
Android:text
= "@string/question_text" />    <LinearLayout
Android:layout_width= "Wrap_content"
Android:layout_height
= "Wrap_content"   
Android:orientation
= "Horizontal" > //orientation (directional) is the control of the layout order, vertical (vertical) or horizontal (horizontal)      <Button
Android:layout_width= "Wrap_content"
Android:layout_height
= "Wrap_content"
Android:text
= "@string/true_button" />      <Button
Android:layout_width= "Wrap_content"
Android:layout_height
= "Wrap_content"
Android:text
= "@string/false_button" />    </LinearLayout>
</LinearLayout>

2.MVC:

M stands for model object: Java file, which does not care about the user interface, only exists to store and manage application data

V represents the View object: Everything can be displayed on the screen, that is, the view object, like the XML layout file, etc.

C for Controller (Control object): is a specific instance of the activity class in the Activity,android SDK, which manages the user's interaction with the information screen.

    

2.

Android Development Essay One

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.