In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the characteristics of Android". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the characteristics of Android"?
1. What is Android?
Android is a platform, including Linux microkernel, middleware (SQLite, etc.), key applications (phonebook, email, short message, GoogleMap, browser, etc.), Java framework provided, and JVM in Android.
Key classes of 2.Android characteristics
View, ContentProviders (application interaction management class), ResourceManager non-coding resource management class, NotificationManager (notification management class), ActivityManager (lifecycle management class).
Interface Development with 3.Android characteristics
This section mainly discusses the interface development mechanism of Android, which can be extracted from the initialization of the component and put into the configuration file, and the component update can be handled by coding.
4. Application composition
The application of Android generally consists of the following four key parts: Activity, IntentReceiver, Service and ContentProvider. Activity is a necessary part.
Application situation:
Activity is a must for every application. Activity represents a specific interface management class for an application, which is not displayed in itself.
IntentReceiver enables the application to respond to external events, for example, when the application is executing and suddenly there is an incoming call, the use of IntentReceiver for processing makes the application more robust.
The life cycle of Service Android application is determined by Android system, not by the thread of specific application. When the application is required to run normally without interface display, (background thread is required, and the background thread will not be reclaimed by the system until the thread ends), Service is required.
ContentProvider can be said that ContentProvider encapsulates contexts in many Android, including SQLite, which makes it possible to interact between different applications.
Layout Management of 5.Android characteristics
FrameLayout: only one component is shown in the upper left corner.
LinearLayout: linear layout manager, divided into horizontal and vertical, can only be used for single-line layout.
TableLayout: table layout manager for any row and column. Where TableRow represents a row, and each view component of TableRow represents a cell.
AbsoluteLayout: absolute layout manager, the way of the axis, the upper left corner is the (0jin0) point, incrementing to the right x axis, increasing down the Y axis.
RelativeLayout: the most recent view component, or the top-level parent component, is more likely to determine the location of the next component than the layout manager.
6.Activity interaction
Intent way: Intent is actually used to do interaction between Activity, it needs to be noted that Intent has an intention to explain, it is worth using in-depth study, to take a simple example, there is a kind of called Intent.ACTION_CALL, you can make a phone call directly.
SharedPreferences is a lightweight storage class on the Android platform, mainly to save some commonly used configurations. SharedPreferences is similar to the ini configuration file on the Windows system in the past, but it is divided into a variety of permissions, can be globally shared access, and is finally saved in the way of xml, which is not as efficient as Intent, but because it can be shared, all can interact with each other between Acitivity. But its efficiency is higher than that of SQLite.
SQLite, or database, is not recommended because of its efficiency. If you are interacting between different applications, you can consider SQLite. Or * * storage.
Life cycle of 7.Android characteristics
It is very important to understand the Android life cycle. There are several main points.
Every Android application runs as a process, and its life cycle is not controlled by itself, but determined by the system according to some characteristics of the running application.
It is important to have a good understanding of the Android life cycle for when your application will be recycled by the system.
A good understanding of the life cycle can improve the robustness of applications. For example, the initialization of the application should be placed in the onCreate method, and when the application is paused, the rewrite onPause method should be applied to save the result of the current application operation.
8. SQLite
SQLite is a built-in database provided in Android and is said to be lighter than MySql. SQLite is also an open source product. The database is mainly operated in the following two ways:
SQL statements can be directly operated by inserting, updating and deleting SQL statements. Call execSQL (), and the query needs to be completed using rawQuery (). The query result returns a scrollable result set. Before operating on Cursor, Cursor needs to move its cursor to the * bit, one bit downward for each result.
Sharing of practical development experience of 9.Android
1 the display problem of custom components, when writing custom View, it is often necessary to adjust the X and Y of the view in order to achieve the desired position. You can say that the X and Y coordinate values of each component can be drawn next to the component, which is very intuitive, and you can know how to adjust it at a glance.
2 use Log to print logs and debug.
3 using LogCat view, there is a LogCat view in showView, and the LogCat view will display some stack information printed by Android simulator, which is very helpful for application debugging. In addition, the log printed by Log is also displayed here.
4 using the Emulator Control view, Emulator Control can perform some simple device operations, such as simulating incoming calls and short messages.
5 use the tools in the tools directory, which are available in Android SDK, to operate the Android simulator, for example, to create a virtual SD card and move files from the system to the virtual SD
At this point, I believe you have a deeper understanding of "what are the characteristics of Android?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.