Android Series--1, first knowledge of Android

Source: Internet
Author: User

1. Why to learn Android

First the exclamation point, the beginning of contact with Android should be a few years ago, when work first came into contact with the need to do the app. At that time with great interest to learn, but later did not persist (here despise yourself). With the popularity of mobile Internet, the importance of smartphones is increasingly strong, the company's projects have gradually begun to shift to the mobile side, prompting themselves to master the relevant knowledge.

2. Develop a Learning Plan

People are forced out, give themselves one months, a day at least two hours of study. Goal: Mastering the essentials of Android development

3, don't say much nonsense

Starting with the simple Hello program, haha, looks like a little old routine.

First recognize the following list file: Androidmanifest.xml

1 <?XML version= "1.0" encoding= "Utf-8"?>2 <Manifestxmlns:android= "Http://schemas.android.com/apk/res/android"3  Package= "Com.example.rocky.hello" >4 5     <Application6         Android:allowbackup= "true"        7 Android:icon= "@mipmap/ic_launcher"/ * Specify icon * /8 Android:label= "@string/app_name"/ * Specify label * /9 Android:theme= "@style/apptheme" >/ * Theme style * /Ten         <Activity One             Android:name=". Mainactivity " A Android:label= "@string/app_name" >/ * Define an Activity component * / -             <Intent-filter> -                 <ActionAndroid:name= "Android.intent.action.MAIN" />/ * Specifies that the activity is the program entry * / the  -                 <categoryAndroid:name= "Android.intent.category.LAUNCHER" /> -             </Intent-filter> -         </Activity> +     </Application> -  + </Manifest>

The difference between android:icon= "@mipmap/ic_launcher" and android:icon= "@drawable/icon" is that the MIPMAP system provides some performance optimizations on scaling

Official Introduction:

Mipmapping for Drawables

Using a mipmap as the source for your bitmap or drawable are a simple-to-provide a quality image and various image scal ES, which can is particularly useful if you expect your image to being scaled during an animation.

Android 4.2 (API level) added, mipmaps in the Bitmap class-android swaps the MIP images in your Bitmap when You ' ve supplied a mipmap source and has the enabled Sethasmipmap (). Now on Android 4.3, you can enable mipmaps for a Bitmapdrawable object as well, by providing a mipmap asset and setting th e android:mipmap attribute in a bitmap resource file or by calling Hasmipmap ().

Android Series--1, first knowledge of Android

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.