This app demonstrates multiple fragments in an activity, a shared ViewModel across fragments, data binding, LiveData, and the Jetpack Navigation component.
Fragment 诞生之初就被定义为一个小型 Activity,因此它代理了 Activity 的许多能力(例如 startActivityForResult等),职责不够单一。随着 Jetpack 各种新组件的出现,Fragment 的很多职责被有效地进行了分担,其本身也可以更好地聚焦在对 UI 的划分和管理上面,早设计的 ...
Abstract: Currently, the majority of apps running on mobile devices are Android apps developed in Java. However, developers can now write Android applications using a new programming language: Kotlin, ...
Fragment 是一个历史悠久的组件,从 API 11 引入至今,已经成为 Android 开发中最常用的组件之一; 在这个专题里,我们将从「使用 & 核心原理 & 面试」三个层面来讨论 Fragment。 Fragment 可以将 Activity 视图拆分为多个区块进行模块化地管理 ,避免了 Activity 视图代码 ...
Was trying to simply pass some data back to Fragment A that navigated to Fragment B, after calling popBackStack() in Fargment B. This proved challenging as it appears there is no built in way using ...
Building an Android app isn’t always easy, and you may find yourself grappling with the same problems, over and over again. How do you manage the application lifecycle so you don’t encounter memory ...
Android is an exciting platform to develop for, but it does have one major limitation: you can only display a single Activity onscreen at any one time (true, the upcoming Multi-Window mode does seem ...
Learn how to use the Fragments API in Mono for Android to create an application UI for multiple screens, such as a handset and tablet. With the release of Android 3.0, Google added support for larger ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果