Android new project and activity steps

Source: Internet
Author: User

New projects for Android

First step: Right click on the left, appear new-->android project--> fill in three name

Step two: The new first class file automatically inherits a parent class and then overrides the parent class's method

Step three: R.java is relative to the project name

Android Project Structure

Src:java the folder where the source code resides

Gen: The folder where the R.java is automatically generated

Android Developer Kit: Android.jar

Res: Resource folder with 3 types of

drawable: Picture Resources

Layout: The folder where the layouts files are located

Values: The folder where the string resource resides

Androidmanif.xml: Project List

Develop activity steps
First step: Write a class to inherit activity
Step two: Overriding the OnCreate method
Step three: Register the activity in the master configuration file
<activity android:name= ". Class name"
Android:label= "@string/app_name" >
<intent-filter>
<!--app's population--
<action android:name= "Android.intent.action.MAIN"/>
<!--desktop display--
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

Android new project and activity steps

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.