Android Application Architecture

Source: Internet
Author: User

Overview: What parts are included in Android apps?

Assets

You can set up some files that are packaged with the program, and the application can dynamically read the contents of those files while it is running.

If you use the ability to load local pages into WebView, all Web page related files are stored in that directory.

Bin

Contains compile-time auto-generated files with the current project compiled installation files, such as: helloworld.apk

Libs

Contains the third-party jar packages used in the project, and the jar packages placed in this directory are automatically added to the build path; The Armabi directory is dedicated to storing so files, and so files are written in C + + languages and then compiled with the NDK.

Android 4.0, Android private Libraries, Android Dependencies are all libraries used by the build application, and the jar packages are added to the build path.

Res

Store all the pictures, layouts, strings and other resources used in the project, as well as a lot of subdirectories;

The picture is placed in the drawable directory; The layout is placed in the layouts directory; The string is placed in the values directory ... The folder that starts with Drawable is designed to allow the program to be compatible with more devices (the same image provides several different resolution copies, and the application will automatically load the image according to the current device resolution)

Code, you can find the picture resource in the following ways:

Bitmap Srcbitmap = utiltools.decodesamplebitmatfromresource (        100, 100);

Also in the Res directory can also create a new raw directory for the image resources:

Bitmap Srcbitmap = utiltools.decodesamplebitmatfromresource (        100, 100);

Although you can save the picture resources, there are differences:

project.properties Specifies the version of the SDK that is used at compile time through a single line of code

Android Application Architecture

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.