我们在 Android 官方文档里面应该看到过LiveData的介绍,下面摘录一段。 Livedata is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app component
Android Navigation - Explore the various navigation components in Android, including Navigation Drawer, Bottom Navigation, and more for seamless user experiences.
In this article, we will dig into how we can implement a Bottom Navigation Bar in the Android app. Below is the preview of a sample Bottom Navigation Bar. Navigation bar uses in android application: Bottom navigation allows easy switching between different activities or fragments. Users can easi...
我们在 Android 官方文档里面应该看到过 LiveData 的介绍,下面摘录一段。 Livedata is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures L...
the navigation by callingstartActivity(), followed by passing in an Intent that has a direct reference to the Activity class which we were navigating to. However, this approach brings the question of whether or not our activities should have the knowledge of where it is they are navigating to...
Computing device to run multiple activities at the same time, and to provide at least two to interact with the active mode. 用户可以根据要求在这两种模式之间转换. Users can request between these two modes. 在全屏模式下,一个活动基本上占据整个显示屏幕. In full-screen mode, an activity ...
This is great as it allows you to decouple this presentation logic from your activities or other classes. However, when it comes to implementing the BottomNavigationView from the design support library, we're not blessed with the same niceties. This requires your activity (or fragment) that is...
When I just began my Android journey I wrote all the Fragments management logic manually in each place. It was ugly and led to massive code duplication. Then I realized that I can extract most of this code into base classes for my Activities and Fragments, thus reducing duplication. Later ...
We intend to share the data only between Activities, not the other elements.Then how can Single Activity Architecture help us solve this problem? Let's take a look at the below picture.Sharing data in the Single Activity Architecture
We might have noticed that lot of our Android Applications introduced a sliding panel menu for navigating between major modules of our application. This kind of UI was done by using third party libraries where a ListView and swiping gestures used to achieve this type of UI. But now Android ...