Android web project development tutorial! Someone finally sorted out all the knowledge points that Android programmers must learn, the powerful version

Preface

The job-hopping season of gold, nine, silver, and ten in the workplace is in full swing. The difference is that this year's competition will be more intense than in previous years, and the form will be more severe.

For job seekers, the interview is a hurdle. Many people are afraid of interviews. Even veterans who have worked for many years may have interview anxiety.

Everyone may have heard or seen some information, that is, many companies are optimizing layoffs, but there are also many large companies that have released "expansion" information, such as Tencent, such as Bytedance.

The past and present of AndroidX

When the Android system was just launched, maybe even its designers did not expect it to be so successful, so it is impossible to consider its API very well at the beginning. As the Android system version continues to iteratively update, many new APIs will be added to each version, but the new APIs do not exist in the old version of the system, so there is a downward compatibility problem.

For example, when the Android system was released to version 3.0, I suddenly realized the importance of tablets. Therefore, in order to make Android more compatible with tablets, the Android team added the Fragment function to the 3.0 system (API 11). But the role of Fragment is not limited to tablets. What should I do if I want to use this function in the old system? So the Android team launched a well-known Android Support Library to provide backward compatible functions. For example, the support-v4 library and appcompat-v7 library that everyone of us is familiar with belongs to the Android Support Library. I believe that anyone who has done Android development has used these two libraries.

However, many people may not have considered what the name of the support-v4 library actually means. Here is an explanation. 4Here refers to the Android API version number, and the corresponding system version is 1.6. Then support-v4 means that the API provided in this library will be downward compatible to the Android 1.6 system. Its corresponding package name is as follows:

Similarly, appcompat-v7 refers to the downward compatibility of the API provided in the library to API 7, which is the Android 2.1 system. Its corresponding package name is as follows:

It can be found that the package names of the libraries provided in the Android Support Library start with **android.support.***.

But slowly with the passage of time, the 1.6 and 2.1 systems have long been eliminated. Now the minimum system version officially supported by Android is 4.0.1, and the corresponding API version number is 15. The support-v4 and appcompat-v7 libraries no longer support the system that is so long ago, but their names have been retained, although their actual role is no longer suitable for the original name.

Obviously, the Android team also realized that this naming is very inappropriate, so they re-divided the architecture of these APIs and launched AndroidX. Therefore, AndroidX is essentially an upgrade to the Android Support Library, and the upgrade content is mainly in the following two aspects.

First, the package name. The package names of the APIs in the previous Android Support Library are under **android.support.* , while the package names of all APIs in the AndroidX library have become under androidx.* . This is a big change, which means that all the APIs under the android.* package will be released with the Android operating system in the future , and the APIs under the androidx.*** package will be released with the extension library. These APIs Basically does not depend on the specific version of the operating system.

Second, the naming rules. Taking the disadvantages of the previous naming rules, the naming rules of all AndroidX libraries will no longer include the version number of the specific operating system API. For example, libraries like appcompat-v7 become appcompat libraries in AndroidX.

"960 The most complete Android development notes in the entire network"

"379-page Android Development Interview Collection"

"507 pages of Android development related source code analysis"

[External link image is being transferred...(img-lTrbG26J-1614327997619)]

Because there are too many files, all the display will affect the length. For the time being, I will list some of these screenshots first, and you can ** click here ** to get them by yourself.

Guess you like

Origin blog.csdn.net/Sunbuyi/article/details/114138864