In RecyclerView, the Adapter converts each item of the data source into each ViewHolder and monitors data changes. The ViewHolder holds the View as its...
Previously, our project framework used Rxjava+Retrofit+ OKHTTP, so it was natural to use RxPermissions for dynamic permission requests. With the introduction of new Google technologies,...
Androidx recyclerview 1.2.0-alpha02 adds a new feature called MergeAdapter to help developers add headers and footers to recyclerview more easily. Use of MergeAdapter using the...
CameraX is a Jetpack support library designed to help you simplify camera application development. It provides a consistent and easy-to-use API interface that works on...
As a new component in Android Jetpack, WorkManager is responsible for managing background tasks. How is it different from an asynchronous task and a Service?...
For Fragments: No need to operate supportFragmentManager, which means goodbye to replace, show, and hide. For Activities: It is possible to drastically reduce activities and...
The new Fragment feature "New ways to transfer data between Fragments" and source code analysis have just been published in the previous article. Several important...
Using the new Fragment APIs for passing between two Frrgament without any references, you can use their common FragmentManager, which acts as a central store...
We're going to modify ViewPager2 first, but it doesn't inherit. Look to SwipeRefreshLayout. Solution 2: Use SmartRefreshLayout instead of SwipeRefreshLayout.
In traditional View architecture, the system provides many component views that developers can use directly, such as TextView, ImageView, RelativeLayout, and so on. We can...
With the popularity of Google's Jetpack single activity app, fragments will be used more and more frequently in the future, and it is increasingly important...
Two-way binding means that when data changes, the UI view is updated. When the UI changes, the data is updated. The @={} notation, which importantly...
This article continues to explain the use of Hilt by introducing the common annotations of Hilt and some of the pitfalls encountered during the implementation...
The Android native development ecosystem is constantly evolving, and working on Android development over the past five years has taught me that. Every two or...
Nice to meet you 👋, I'm Flywith24. The Fragment document has recently been rewritten by Android officials to accommodate the rapid evolution of best practices...
1. Must PagingDataAdapter be inherited to use Paging? 2. Use AsyncPagingDataDiffer to implement the Paging function example 3. Further, Pag is implemented using decorative patterns
Nice to meet you 👋, I'm Flywith24. The Fragment document has recently been rewritten by Android officials to accommodate the rapid evolution of best practices...
In many cases, the fragment lifecycle upper limit should be lower than FragmentManager/Activity. For example, an interface outside of the ViewPager screen should not be...
A Target fragment requires direct access to an instance of another fragment, which is dangerous because you don't know what state the target fragment is...
MediatorLiveData is a subclass of MutableLiveData, the source code is relatively simple, the total is less than one hundred lines. MediatorLiveData can be used either...
A, the overall train of thought: PageKeyedDataSource as data source, for example, first create a new DataSource class PageKeyedDataSourceExtension PageKeyedDataSou inheritance
Life-cycle-aware components perform operations in response to changes in the life-cycle state of another component, such as an Activity or Fragment. These components help you...