Android development self-study note (Android Studio1.3.1) & mdash; 2. Start the first Android Application, studio1.3.1android

Source: Internet
Author: User

Android development self-study note (Android Studio1.3.1)-2. Start the first Android Application, studio1.3.1android
I. Preface

Using Android Studio to develop Android applications is very simple, because it will help you automatically complete a lot of work. In this article, we mainly complete a simple application of clicking a button to display the current time in the text box.

How to use AS to complete a simple Android Application and tips for using.

Android Studio can be used to develop Android applications in the following three steps:

   

1. Create an Android Studio Project

2. Define the Application User Interface in XML Layout

3. Write Business implementation in Java code

2. Start the first Android Application 1. Create an Android Studio Project
   

In the first article, after the AS is installed, the AS welcome page will appear for the first time when the AS is opened, you can click "Start a new Android Studio project" under item 1 to create an Android Studio project, for example:

! Before talking about the following content, let's insert an AS tips:

We are writing the attribute"Android: onClick = "clickHandler"We didn't create this event before. At this time, we move the mouse to the row title position, and a light bulb icon will appear. We click it, the following four options are displayed:

Now we start to edit the background java logic code, complete functional operations, and find the java directory in the left-side organization tree, which stores our java code, find the MainActivity file corresponding to the package name. java.

Click the green triangle to run the program.

1. We can find the control element we are looking for through findViewById (R. id. show), but what is R ????

2. We know that the Res directory stores all the resources used by the Android Application. But how can we use it ???

3. What is the configuration file AndroidManifest. xml ????

4. How can I set the access permission for an application ??? For example, do I allow it to access WIFI ......

 

 

Coming soon .....

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.