In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to learn Android Jetpack". In daily operation, I believe many people have doubts about how to learn Android Jetpack. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to learn Android Jetpack"! Next, please follow the editor to study!
Preface
In 2018, Google Imax OMagol Jetpack was born, the official introduction is as follows:
Jetpack is a set of libraries, tools, and guides that make it easier for developers to write quality applications. These components help you follow best practices, get rid of the task of writing boilerplate code, and simplify complex tasks so that you can focus on the code you need.
Thinking about this introduction will explain our problem just now.
What on earth is Jetpack?
Is a set of libraries, tools, and guides. To put it bluntly, it is a series of libraries or collections of tools, and these tools are used as guides for our high-quality applications, which are equivalent to official recommended practices.
What is the reason why google launched this series?
Standardize developers to develop quality applications faster and better. For a long time, Android development is full of irregular operations and repetitive code, such as life cycle management, repetition of development process, choice of project architecture, and so on. So in order to standardize the development behavior, Google launched this set of guidelines, which aims to enable developers to develop quality applications better, faster and more standardized.
But why is it so difficult for domestic developers to accept? In fact, we can probably analyze several reasons:
The sense of smell of new technology is slow.
JetPack single component does not know how to use, where to use
There is no full Copy source
The old project did not use JetPack before, but now it will lead and start the whole body, lazy change, whoever you love.
Don't know anything about JetPack.
1. Resolved Android architecture issues
Since Google has not issued a standard for the design of Android application architecture before, developers in each enterprise need to work out a set of development solutions that conform to their own projects. But this will cause two obvious problems. The first is that these programs are born in a wild way, there is no official identity, and the second is that it is impossible to find a set of solutions that meet everyone's expectations. To put it bluntly, there is no unified standard and fragmentation is serious. So Google is also aware of this problem and launched JetPack, so that developers can use standard architectural components, without having to struggle with architectural design, and can pay more attention to their own business code.
two。 Improved code quality
Jetpack has a lifecycle-aware ability to reduce memory leaks and NPE crashes, providing a strong guarantee for us to develop robust and smooth programs, while the automatic generation of boilerplate code can reduce artificial legacy BUG.
3. Improve the efficiency of development
Jetpack can reduce boilerplate code and help improve the efficiency of Android development. These components can be used alone or in combination, and run consistently across different Android versions.
Seeing the changes brought about by JetPack, can we still let it go and remain unmoved? Next, let's start from the actual job needs:
Seeing here, you should already understand that JetPack is now clear in many job requirements, which also means that in the future interview process, in addition to the previous knowledge points, there has been a JetPack.
How to learn?
If you are due to the lack of learning materials, and I happen to read that the ten-year technical experts of Ali have jointly created "the latest", "getting started with Jetpack Architecture components to be proficient" and "Jetpack enhanced playbook", which is a sunflower treasure book for you to learn Jetpack. The following text begins:
"getting started with Jetpack Architecture components to mastering" Android Jetpack-Navigation
Navigation direct translation is navigation, which is one of the Android Jetpack components, making a single Activity application the preferred architecture. The jump of Fragment pages in the application is handled by Navigation, and developers do not have to deal with the complexity of FragmentTransaction and related transition animation.
Android Jetpack-Data Binding
Data Binding is a support library that uses a declarative approach instead of coding to bind UI controls and data sources.
Android Jetpack-ViewModel & LiveData
ViewModel separates the view from the logic. Activity or Fragment is only responsible for the UI display. ViewModel is responsible for specific network requests or database operations. Similar to the Presenter layer in MVP mode.
LiveData is an observable data storage class. Unlike regular observable classes, LiveData is lifecycle aware, meaning that it follows the lifecycle of other application components, such as Activity, Fragment, or Service.
Android Jetpack-Room
Room is a member of the Jetpack component library, which belongs to the ORM library. It mainly abstracts Sqlite to simplify the developer's operation on the database. Room supports syntax checking at compile time and supports returning LiveData.
Android Jetpack-Paging
Paging Libray is divided into three parts: DataSource, PagedList, PagedAdapter
Android Jetpack-WorkManger
WorkManager is a component in Android Jetpack that manages background tasks.
Common usage scenarios: 1. Send logs or analysis data to the back-end service 2. Periodically synchronize application data with the server
Background tasks can be easily scheduled using WorkManager API. Tasks that can be delayed (that is, do not need to run immediately) and can be reliably run when the application exits (the process is not closed) or when the application is restarted.
Lifecycle of Android Jetpack architecture components
For the security of the application, there is often a need for security confirmation processing such as software confirmation when switching from the background to the foreground. In the past, this requirement would have been very difficult to achieve. But since Google introduced the Lifecycle component, this requirement has been much simpler. In addition to perceiving switching from the background to the foreground, Lifecycle can use this component to implement complex lifecycle operations more easily.
The most complete user Guide to Android Jetpack Compose
Instead of making one or more advanced UI controls like RecyclerView and ConstraintLayout, Compose directly abandoned the set of View and ViewGroup that we have written for N years, and pulled a whole new UI framework from top to bottom. To put it bluntly, its rendering mechanism, layout mechanism, touch algorithm and specific writing of UI are all new.
Due to the limited space, enter the screenshot to show part of the content, if you need a full version of the study manual, you can go to my [Github] to read and download. "Jetpack enhanced practice Manual" 1. First acquaintance of the ConstraintLayout implementation login page
1. Create Project 2. Immersive layout 3. Rich text 4. Attribute animation
II. The implementation of Navigation practice the main framework of APP and the introduction of Navigation
1. Build Bottom Navigation Activity 2. Navigation interface jump 3.Navigation value 4.Navigation jump animation 5. Navigation file split 6.Deeplink navigation
Third, use Coroutines, Retrofit and Moshi to realize network data request.
1.kotlin-Coroutine protocol 2. Realization of network request with co-program and Retrofit
Fourth, use TabLayout,ViewPager2 and RecyclerView to realize the song list square page.
1.ViewPager2 2.TabLayout 3.RecyclerView 4. Network data request and data fill 5. Optimize the interface
Fifth, the transformation of the MVVM structure of the song list page and the introduction to the use of ViewModel and LiveData.
Introduction of 1.MVC and MVVM 2. Modify playlist page
6. Paging implements load more and drop-down refresh, and request again after error
The advantage of 1.Paging 2.Paging to achieve paging load more 3.Paging and SwipRefreshLayout combination to achieve drop-down refresh 4. Add Footer 5. 0 for loading state to RecyclerView. Retry 6 after a network error occurred. Frame animation
7. Vlayout nesting horizontal RecyclerView and Banner to display the home page and customize the JsonAdapter of Moshi
1.vlayout architecture analysis 2.vlayout layout introduction 3. Basic work preparation for 4.vlayout implementation of carousel Fig. 5. Inconsistent field content types
8. Room database to add, delete, modify, query and transaction processing
1. Adding Room dependent 2.Room details inserting data 4.Room during the creation of 3.DataBase to realize the addition, deletion, modification and query of the playlist label editing interface
9. Room database Migration
1. New Entity 2. New Dao 3. Modify Database 4. Modify HomeViewModel 5.Migration
10. The realization of video playback by ExoPlayer
1.ExoPlayer introduces the simple use of 2.ExoPlayer 3.ExoPlayer simple customization 4.ExoPlayer Advanced customization 5.ExoPlayer reuse in RecyclerView
11. MotionLayout makes animation so simple
1.MotionLayout Foundation 2. Key frame Keyframes 3. 4.MotionLayout case study of Code starting Animation and Monitoring Animation
12. Detailed explanation of basic knowledge of Kotlin Flow
1.Flow introduces the characteristics of 2.Flow the constructor of 3.Flow 4.Flow intermediate operation function 5.Flow ending function 6.Flow error exception handling 7.Flow cancel 8.StateFlow/MutableStateFlow
XIII. Kotlin Flow Project practice-the Application of Network, Database and UI
The place left to Flow in the 1.MVVM architecture 2. Network data request 3.UI related-enter keyword 4 in the input box. Database
View Binding replaces ButterKnife and Kotlin synthetics
1. To solve the sadness of findViewById, the use of 2.View Binding 3. Migrate from Kotlin synthetics to View Binding
At this point, the study of "how to learn Android Jetpack" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.