# fragments

Published articles for fragments.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Apollo Client 4.1 Adds @stream Support and GraphQL Incremental Delivery Improvements

DevFeed: [Apollo Client 4.1 Adds @stream Support and GraphQL Incremental Delivery Improvements](<https://devfeed.tech/articles/stream-all-the-things-with-apollo-client-4-1-23525.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/stream-all-the-things-with-apollo-client-4-1>)

Author: Jerel Miller

Published: 2026-01-21T12:36:16Z

Content type: release

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [client](<https://devfeed.tech/topics/client.md>)

Tags: [announcement](<https://devfeed.tech/tags/announcement.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [cache](<https://devfeed.tech/tags/cache.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [performance](<https://devfeed.tech/tags/performance.md>), [release](<https://devfeed.tech/tags/release.md>)

### AI overview

Apollo Client 4.1 adds full @stream directive support, compatibility with the latest GraphQL incremental delivery specification, and APIs for watching multiple fragments. The release also includes cache fixes, deduplication improvements, and other updates.

### Source excerpt

Apollo Client 4.1 introduces full @stream directive support, compatibility with the latest GraphQL incremental delivery spec, and powerful new APIs for working with fragments.

## Send RecyclerView's scroll events to a compose parent

DevFeed: [Send RecyclerView's scroll events to a compose parent](<https://devfeed.tech/articles/send-recyclerview-s-scroll-events-to-a-compose-parent-28716.md>)

Original publisher: [Read original article](<https://le0nidas.gr/2025/08/10/send-recyclerviews-scroll-events-to-a-compose-parent/>)

Author: Leonidas Partsas

Published: 2025-08-10T06:58:04Z

Content type: tutorial

Language: en

Sources: [le0nidas](<https://devfeed.tech/sources/le0nidas.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [recyclerview](<https://devfeed.tech/topics/recyclerview.md>), [screen](<https://devfeed.tech/topics/screen.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [compose](<https://devfeed.tech/tags/compose.md>), [enter-always-behavior](<https://devfeed.tech/tags/enter-always-behavior.md>), [featured](<https://devfeed.tech/tags/featured.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [nested-scroll](<https://devfeed.tech/tags/nested-scroll.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [screen](<https://devfeed.tech/tags/screen.md>), [top-app-bar](<https://devfeed.tech/tags/top-app-bar.md>)

### AI overview

This tutorial explains how to send RecyclerView scroll events to a Jetpack Compose parent during a gradual migration from fragment-based Android screens. It describes connecting Compose nested-scroll behavior to a RecyclerView using a NestedScrollDispatcher so a Compose top bar can respond to scrolling.

### Source excerpt

We have an app that relies heavily on fragments. Every screen is an activity that hosts a fragment that hosts a recycler view: We want to start migrating the screens to compose by keeping the screen's content and placing it in a compose environment. This means that our activities will call setContent { } instead ... Continue reading Send RecyclerView's scroll events to a compose parent ->

## Juniper MX Jumbo Frames Can Cause Fragmentation on the PFE-RE Ethernet Link

DevFeed: [Juniper MX Jumbo Frames Can Cause Fragmentation on the PFE-RE Ethernet Link](<https://devfeed.tech/articles/interesting-juniper-mx-and-jumbo-frames-11199.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2025/06/juniper-mx-jumbo-frames/>)

Published: 2025-06-10T05:41:00Z

Content type: opinion

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [Ethernet](<https://devfeed.tech/topics/ethernet.md>), [networking](<https://devfeed.tech/topics/networking.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [ethernet](<https://devfeed.tech/tags/ethernet.md>), [fragmentation](<https://devfeed.tech/tags/fragmentation.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [queue](<https://devfeed.tech/tags/queue.md>), [routing](<https://devfeed.tech/tags/routing.md>), [worth-reading](<https://devfeed.tech/tags/worth-reading.md>)

### AI overview

The article explains that the Ethernet link between the Packet Forwarding Engine and Routing Engine in Juniper MX has a fixed 1500-byte MTU. Jumbo frames can therefore be fragmented, and dropped fragments may remain in the reassembly queue when control-plane policing intervenes.

### Source excerpt

Did you know that there's an Ethernet link between the Packet Forwarding Engine (PFE - data plane) and Routing Engine (RE - control plane) in every Juniper MX? That's why you have to run two VMs to emulate it (sometimes conveniently packed into one larger VM, proving RFC 1925 rule 6a). That Ethernet link happens to have the MTU fixed at 1500 bytes. Guess what happens in the world where everyone uses jumbo frames? Did you say fragmentation? Bingo! And what do you think happens when one of those fragments gets dropped due to control-plane policing, and the rest of them are stuck in the reassembly queue? You'll find the gory details in a lengthy blog post by Nitzan Tzelniker.

## Simplify ViewBinding in Android with ViewBindingPropertyDelegate 2.0

DevFeed: [Simplify ViewBinding in Android with ViewBindingPropertyDelegate 2.0](<https://devfeed.tech/articles/simplify-viewbinding-in-android-with-viewbindingpropertydelegate-2-0-25960.md>)

Original publisher: [Read original article](<https://kirillr.medium.com/whats-new-in-vbpd-2-0-a83565134cff?source=rss-7a0a233f88a2------2>)

Author: Kirill Rozov

Published: 2025-02-04T13:30:45Z

Content type: release

Language: en

Sources: [Stories by Kirill Rozov on Medium](<https://devfeed.tech/sources/stories-by-kirill-rozov-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [recyclerview](<https://devfeed.tech/topics/recyclerview.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-jetpack](<https://devfeed.tech/tags/android-jetpack.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [library](<https://devfeed.tech/tags/library.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [release](<https://devfeed.tech/tags/release.md>), [ui](<https://devfeed.tech/tags/ui.md>), [view-binding](<https://devfeed.tech/tags/view-binding.md>)

### AI overview

This article announces ViewBindingPropertyDelegate 2.0, a release that refactors how the Android library manages ViewBinding lifecycles. It replaces Jetpack Lifecycle-based detection with component lifecycle callbacks for Fragments and Activities, improving the timing of reference clearing and addressing issues related to Fragment animations. The release also supports lazy ViewBinding creation and aims to prevent memory leaks.

### Source excerpt

I'm excited to announce the release of ViewBindingPropertyDelegate 2.0, which introduces significant under-the-hood refactoring to enhance the library's stability and performance. In this article, I'll highlight the most important changes and explain how they improve the library's functionality. Brief Introduction ViewBindingPropertyDelegate(VBPD) is a lightweight library designed to simplify the use of Android's ViewBinding by: Managing the ViewBinding lifecycle and clearing references to prevent memory leaks. Eliminating the need to maintain nullable references to Views or ViewBindings. Creating ViewBindings lazily. The library supports usage in various components, including Activities, Fragments, ViewGroups, and RecyclerView.ViewHolders. class ProfileFragment : Fragment(R.layout.profile) { private val profileBinding: ProfileBinding by viewBinding(ProfileBinding::bind) override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) // ProfileBinding instance will be created lazily on first access profileBinding.name.text = ... } override fun onDestroyView() { super.onDestroyView() // profileBinding reference will be cleared after onDestroyView() } }Changes in 2.0Transition from Lifecycle to Component Callbacks In previous versions (1.x), VBPD relied on Jetpack's Lifecycle to detect when a View was being destroyed. This approach had a limitation: the Lifecycle callback methods could be invoked before Fragment.onDestroyView(), while the ViewBinding reference was still needed. To address this, VBPD postponed clearing the ViewBinding reference using an Android Handler after onDestroyView(), when the Fragment's View LifecycleOwner transitioned to the DESTROYED state. In version 2.0, VBPD now utilizes FragmentManager.FragmentLifecycleCallbacks to detect when a Fragment's view is destroyed. The key difference lies in the timing of these callbacks, allowing for more precise management of the ViewBinding lifecycle. // Sou

## How a transitive dependency caused unexpected Android behavior

DevFeed: [How a transitive dependency caused unexpected Android behavior](<https://devfeed.tech/articles/watch-out-for-transitive-dependencies-an-obvious-rant-25585.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2025/rant-transitive-deps/>)

Author: Marco Gomiero

Published: 2025-01-14T00:00:00Z

Content type: opinion

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [issue tracker](<https://devfeed.tech/topics/issue-tracker.md>), [navigation](<https://devfeed.tech/topics/navigation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [issue-tracker](<https://devfeed.tech/tags/issue-tracker.md>), [libraries](<https://devfeed.tech/tags/libraries.md>)

### AI overview

The author recounts debugging a crash affecting some Android users and tracing unexpected behavior to a change introduced by an external library. The article advises checking library changes and transitive dependencies during updates.

### Source excerpt

This article is just a short "rant" and a "therapy session" to remind and warn my future self. I was recently debugging a weird crash affecting some users. The issue was related to navigation, fragments, and backstacks. After weeks spent trying to reproduce it, reading online reports, and cross-referencing previous libraries and SDK updates, I finally had an illuminating moment after reading about a similar behavior in the Google Issue Tracker. It made me wonder: Could something have changed in the Android Manifest?

## More resilient code with data masking in Apollo Client 3.12

DevFeed: [More resilient code with data masking in Apollo Client 3.12](<https://devfeed.tech/articles/more-resilient-code-with-data-masking-in-apollo-client-3-12-23460.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/more-resilient-code-with-data-masking-in-apollo-client-3-12>)

Author: Jerel Miller

Published: 2024-12-10T09:47:59Z

Content type: release

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [React](<https://devfeed.tech/topics/react.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [react](<https://devfeed.tech/tags/react.md>), [release](<https://devfeed.tech/tags/release.md>)

### AI overview

Apollo Client 3.12 introduces data masking, using GraphQL fragments to expose only the fields requested by each component. The article explains how this reduces implicit dependencies between components and describes colocated fragments, the useFragment hook, and enabling data masking.

### Source excerpt

We are excited to announce the release of Apollo Client 3.12, which primarily focuses on data masking. When building complex applications today, Apollo Client users are leveraging GraphQL fragments to make their applications more maintainable. Data masking leverages fragments to help you write more resilient and performant code. What is data masking? Data masking enforces that only the fields requested by a component in a query or fragment are available to it.

## Optimizing Data Fetching with Apollo Client: Leveraging useFragment and Colocated Fragments

DevFeed: [Optimizing Data Fetching with Apollo Client: Leveraging useFragment and Colocated Fragments](<https://devfeed.tech/articles/optimizing-data-fetching-with-apollo-client-leveraging-usefragment-and-colocated-fragments-23477.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/optimizing-data-fetching-with-apollo-client-leveraging-usefragment-and-colocated-fragments>)

Author: Tyler Goelz

Published: 2024-05-10T10:50:08Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [client](<https://devfeed.tech/topics/client.md>), [React](<https://devfeed.tech/topics/react.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [cache](<https://devfeed.tech/tags/cache.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [performance](<https://devfeed.tech/tags/performance.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

This article explains how Apollo Client's useFragment hook and colocated fragments can reduce over-fetching while keeping data requirements close to the components that use them. It discusses separating responsibility for declaring data needs from accountability for fetching data, and notes that useFragment accesses fragment data from Apollo Client's normalized cache.

### Source excerpt

When building complex applications today, Apollo Client users typically reach for to get data to their components. This is no surprise as this is considered a best practice by the Apollo Client documentation. However, this can cause challenges while trying to minimize over-fetching while maintaining a clear separation of concern.

## Jetpack Compose: A use case for view interop migration strategy - Jigar Brahmbhatt

DevFeed: [Jetpack Compose: A use case for view interop migration strategy - Jigar Brahmbhatt](<https://devfeed.tech/articles/jetpack-compose-a-use-case-for-view-interop-migration-strategy-jigar-brahmbhatt-38227.md>)

Original publisher: [Read original article](<https://touchlab.co/jetpack-compose-a-use-case-for-view-interop-migration-strategy>)

Published: 2023-02-08T12:00:26Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [migration](<https://devfeed.tech/topics/migration.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [interop](<https://devfeed.tech/tags/interop.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [layout](<https://devfeed.tech/tags/layout.md>), [migration](<https://devfeed.tech/tags/migration.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [redesign](<https://devfeed.tech/tags/redesign.md>), [sample](<https://devfeed.tech/tags/sample.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article describes using Jetpack Compose with existing Android views and fragments during a sample app redesign for an SDK. It explains a Fragments-in-Compose approach, Compose navigation, SharedPreferences reuse, and adjustments needed for UI testing.

### Source excerpt

We had an opportunity to redesign the sample app for an SDK we're developing, using Jetpack Compose as part of our interop migration strategy.

## ViewLifecycleLazy and other ways to avoid View memory leaks in Android Fragments

DevFeed: [ViewLifecycleLazy and other ways to avoid View memory leaks in Android Fragments](<https://devfeed.tech/articles/viewlifecyclelazy-and-other-ways-to-avoid-view-memory-leaks-in-android-fragments-25885.md>)

Original publisher: [Read original article](<https://bladecoder.medium.com/viewlifecyclelazy-and-other-ways-to-avoid-view-memory-leaks-in-android-fragments-4aa982e6e579?source=rss-54910f05af37------2>)

Author: Christophe Beyls

Published: 2022-09-28T06:12:25Z

Content type: tutorial

Language: en

Sources: [Stories by Christophe Beyls on Medium](<https://devfeed.tech/sources/stories-by-christophe-beyls-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architecture-components](<https://devfeed.tech/tags/architecture-components.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [view-binding](<https://devfeed.tech/tags/view-binding.md>)

### AI overview

This article presents ViewLifecycleLazy, a Kotlin delegated property for Android Fragments that lazily initializes values tied to the current Fragment view lifecycle and clears them when the view hierarchy reaches the DESTROYED state. It explains how this approach helps prevent view-related memory leaks and compares it with AutoClearedValue and manual clearing in onDestroyView().

### Source excerpt

Yet another take on AutoClearedValueAre your Fragments leaking? Handling the lifecycle of Android Fragments is difficult. I already covered this topic in an article I wrote in 2017, before Google added a View-specific Lifecycle to Fragments in an attempt to solve some issues. Until now, the number one cause of memory leaks when using Fragments remains the same: not properly clearing all direct and indirect View references in onDestroyView(). Tools like Leak Canary can help detecting some of these cases. And of course, Jetpack Compose represents a big paradigm change which completely removes the need to keep View references but hey, we still have our legacy codebases to maintain! I recently came across a Medium blog post from Gabor Varadi describing an issue he encountered with a custom Kotlin delegated property he created to simplify managing view bindings in Fragments. His solution is based on a class named AutoClearedValue from the architecture components samples. The purpose of AutoClearedValue is to provide a delegate that will automatically clear a value tied to one or more Views when the Fragment View hierarchy gets destroyed, in order to avoid the aforementioned memory leaks. This is an elegant alternative to declaring a Fragment property as nullable and manually setting it to null in onDestroyView(), which can be easily forgotten. It turns out I had already come up with my own solution to do the exact same thing. And since my version is simpler and generates more optimized bytecode compared to AutoClearedValue and what Mr Varadi published, I decided to share it with you. I named this delegate ViewLifecycleLazy. Like the name implies, the delegated property value is computed lazily and the Fragment's current view lifecycle is observed in order to automatically clear the value when it moves to the DESTROYED state. https://medium.com/media/17c61e41a0f2d3e17c63e3bcf8f6376c/href This is how it's used in Fragments, for example with View Binding: class MyFragment :

## Introducing Navigation-Material 

DevFeed: [Introducing Navigation-Material ](<https://devfeed.tech/articles/introducing-navigation-material-25967.md>)

Original publisher: [Read original article](<https://jossiwolf.medium.com/introducing-navigation-material-%EF%B8%8F-a19ed5cc33fd?source=rss-8efc0359e234------2>)

Author: Jossi Wolf

Published: 2021-08-04T19:01:30Z

Content type: release

Language: en

Sources: [Stories by Jossi Wolf on Medium](<https://devfeed.tech/sources/stories-by-jossi-wolf-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Library](<https://devfeed.tech/topics/library.md>), [releases](<https://devfeed.tech/topics/releases.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bottomsheet](<https://devfeed.tech/tags/bottomsheet.md>), [compose](<https://devfeed.tech/tags/compose.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [extension](<https://devfeed.tech/tags/extension.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [library](<https://devfeed.tech/tags/library.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [navigation-component](<https://devfeed.tech/tags/navigation-component.md>), [new-feature](<https://devfeed.tech/tags/new-feature.md>), [releases](<https://devfeed.tech/tags/releases.md>)

### AI overview

This article introduces Navigation Material, an Accompanist library that adds modal bottom sheet destinations to Navigation Compose. It explains the library's experimental status and provides setup steps using BottomSheetNavigator, NavController, ModalBottomSheetLayout, and the bottomSheet function.

### Source excerpt

Illustration by Ana Teresa Silva from the lovely We Are Systematic. Thank youuuuuu❤✨ Navigation-Compose (well, kinda) has an exciting new feature: Support for bottom sheet destinations! Over the past (almost) 6 months, I worked on a library in collaboration with the Navigation team that offers support for Modal Bottom Sheets in Navigation Compose. Navigation with Fragments has long supported DialogFragments, and with today's release of the Navigation Material library, we are providing the same feature for composable bottom sheets with Navigation Compose. Since modal bottom sheets are still an experimental Compose-Material API, the library will be released as part of Accompanist, a collection of extension libraries for Jetpack Compose. All AndroidX libraries, Navigation and Compose included, follow strict semantic versioning as explained on the AndroidX releases page. This means that any API that isn't experimental is set in stone once a library goes to its Release Candidate (RC) phase. It would take a major version bump (i.e., a '2.0') to make breaking API changes to these stable APIs. - Ian Lake about the versioning system of AndroidX libraries Because of the versioning requirements for AndroidX libraries, Navigation Material will be offered as part of Accompanist, just like navigation-animation. Think of it as an incubator until the bottom sheet APIs are fully grown up! Enough of the talking -- let's look at how you can use it! Getting started! Navigation Material is fresh out of the oven, built off today's release of Navigation 2.4.0-alpha06! There are a few easy steps to get started: Create a BottomSheetNavigator using the rememberBottomSheetNavigator() function Add the BottomSheetNavigator to your NavController Wrap your existing NavHost in the ModalBottomSheetLayout composable provided by Navigation Material. If you don't have a NavHost yet, we'll create one! Now you're ready to define bottom sheet destinations using the new bottomSheet function! Let's go thro

## Using Kotlin Delegated Properties to Nullify Android References and Reduce Memory Leaks

DevFeed: [Using Kotlin Delegated Properties to Nullify Android References and Reduce Memory Leaks](<https://devfeed.tech/articles/let-your-delegates-auto-nullify-references-25733.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/let-your-delegates-auto-nullify-references/>)

Author: Shreyas Patil

Published: 2021-03-12T13:39:24Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Android](<https://devfeed.tech/topics/android.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [delegates](<https://devfeed.tech/tags/delegates.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginner](<https://devfeed.tech/tags/kotlin-beginner.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [mobile-development](<https://devfeed.tech/tags/mobile-development.md>), [properties](<https://devfeed.tech/tags/properties.md>)

### AI overview

This tutorial explains how Kotlin property delegates can automatically nullify references in Android components. It focuses on clearing Fragment and RecyclerView.Adapter references according to lifecycle events to reduce memory leaks and boilerplate.

### Source excerpt

Learn how to use Kotlin property delegates to automatically nullify references in Android, preventing memory leaks in Fragments and Activities.

## Creating a BottomNavigation Multi-Stack using child Fragments with Simple-Stack

DevFeed: [Creating a BottomNavigation Multi-Stack using child Fragments with Simple-Stack](<https://devfeed.tech/articles/creating-a-bottomnavigation-multi-stack-using-child-fragments-with-simple-stack-25935.md>)

Original publisher: [Read original article](<https://zhuinden.medium.com/creating-a-bottomnavigation-multi-stack-using-child-fragments-with-simple-stack-c73c1ca3bbd4?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2021-01-25T17:03:22Z

Content type: tutorial

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [navigation](<https://devfeed.tech/topics/navigation.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [bottom-navigation](<https://devfeed.tech/tags/bottom-navigation.md>), [bottomnavigationview](<https://devfeed.tech/tags/bottomnavigationview.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-navigation](<https://devfeed.tech/tags/jetpack-navigation.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [simple-stack](<https://devfeed.tech/tags/simple-stack.md>)

### AI overview

A tutorial on implementing bottom navigation with a separate navigation history stack for each tab using child fragments and Simple-Stack. It explains fragment attachment and detachment, lifecycle management, and keeping back stacks alive across configuration changes.

### Source excerpt

It's been a recurring question, regardless of navigation framework of choice: how is it possible to create a screen with a bottom navigation view, that would host a navigation history stack per each tab? Each framework has its own unique ways. For example, Jetpack Navigation provides NavigationExtensions as a sample, there's FragNav, but how would you do it with Simple-Stack? How bottom navigation with child fragments normally works If you intend to create a BottomNavigationView that is hosted by a Fragment (and that Fragment hosts each tab as a child fragment), there's a bit of work needed to be done. To keep the fragments alive while switching between them, they must all be added. However, to make sure that the fragments are in the correct lifecycle (stopped while not showing), it makes sense to detach them (and attach the one that is meant to be showing). https://medium.com/media/1667d9733c198c3ae611fd45504f6bd0/href This example is also available here. Please note that there is nothing specific to Simple-Stack in this snippet, this is how a fragment can manage its child fragments and keep only one of them attached, while the rest are detached. In fact, the NavigationAdvancedSample works the same way. We will use this knowledge later in the article. What Simple-Stack normally does When you use Simple-Stack, you typically install a Navigator using Navigator.install(). This allows a single global Backstack instance to be accessible through the Activity's context (and thus making it available to all views within the Activity), and provides automatic lifecycle management to ensure that navigation is handled correctly. https://medium.com/media/03bde713eca4e7ef47d7dae31f6e095d/href This is important to know, because if we want to create a Backstack for each Fragment within our BottomNavigationView, we must manage the lifecycle (and keep the Backstack instance alive across configuration changes) ourselves. Thankfully, this is actually quite simple to do! After all, frag

## An update to the FragmentViewBindingDelegate: the bug we've inherited from AutoClearedValue

DevFeed: [An update to the FragmentViewBindingDelegate: the bug we've inherited from AutoClearedValue](<https://devfeed.tech/articles/an-update-to-the-fragmentviewbindingdelegate-the-bug-we-ve-inherited-from-autoclearedvalue-25927.md>)

Original publisher: [Read original article](<https://itnext.io/an-update-to-the-fragmentviewbindingdelegate-the-bug-weve-inherited-from-autoclearedvalue-7fc0a89fcae1?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2021-01-24T00:40:53Z

Content type: article

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [bug](<https://devfeed.tech/topics/bug.md>), [navigation](<https://devfeed.tech/topics/navigation.md>)

Tags: [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-view-binding](<https://devfeed.tech/tags/android-view-binding.md>), [bottom-navigation](<https://devfeed.tech/tags/bottom-navigation.md>), [bug](<https://devfeed.tech/tags/bug.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-lifecycle](<https://devfeed.tech/tags/jetpack-lifecycle.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [navigation](<https://devfeed.tech/tags/navigation.md>)

### AI overview

The article identifies a bug in an AutoClearedValue-based FragmentViewBindingDelegate. A fragment can move directly from view creation to view destruction without becoming active, so the observer never runs and the binding is not cleared. The proposed fix is to observe the view lifecycle without using the fragment as the lifecycle owner.

### Source excerpt

Jetpack Lifecycle is quite powerful. We can extract logic, and make it lifecycle-aware. In fact, this allowed us in a previous article to simplify viewbinding and make it a single line. However, I need to provide a quick heads-up: all is not as it seems. The provided gists and code snippets assumed that the code in AutoClearedValue is always correct. In this article, I'll show you how to break it. The original sourcehttps://medium.com/media/74ef2eaf8bac6a656cece1f95796034a/href The general idea behind AutoClearedValue is that a value hidden by this delegate would only be created when it is set (in our case, when it is accessed), and when viewLifecycleOwner becomes DESTROYED, it would null out the value. Makes sense, right? In order to access the view lifecycle, the code waits until Fragment.onCreate(), and registers the lifecycle observer there. Then, using the fragment as the lifecycle owner (!), it attempts to register a lifecycle observer on the view lifecycle owner. The bug hiding in plain sight The problem is that it is possible for the view lifecycle to be initialized in such a way that fragment.onStart() and therefore viewLifecycleOwner.lifecycle.addObserver never actually happens. The fragment goes directly from onViewCreated to onDestroyView. Meaning, fragment.onStart() and fragment.onStop() never happen. This means that fragment.viewLifecycleOwner.observe(fragment) will NEVER be ACTIVE, and therefore the observe block will never be called. The viewLifecycle reaches DESTROYED without it being observed. When does this happen? If a fragment is added with commitNow(), but then is detach()ed. This would mean that this could happen with FragmentPagerAdapter, as that also uses attach/detach under the hood. In my case, the bug surfaced when using the binding along with the following construct: https://medium.com/media/942d1d2a1b2b4bbdc77e4d11ef112b97/href In case of a bottom navigation view, where fragments were added but attached/detached, the view in the binding

## Simplified Android Development Using Simple-Stack

DevFeed: [Simplified Android Development Using Simple-Stack](<https://devfeed.tech/articles/simplified-android-development-using-simple-stack-25930.md>)

Original publisher: [Read original article](<https://medium.com/swlh/simplified-android-development-using-simple-stack-6e44ce808c35?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2020-11-14T03:32:51Z

Content type: tutorial

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [navigation](<https://devfeed.tech/topics/navigation.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [Android](<https://devfeed.tech/topics/android.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [android-apps](<https://devfeed.tech/topics/android-apps.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [simple-stack](<https://devfeed.tech/tags/simple-stack.md>)

### AI overview

An Android development article explains Simple-Stack, a navigation framework for tracking navigation state with immutable Parcelable screen identifiers. It describes the framework's origins in Flow and Mortar and its use for type-safe Fragment navigation.

### Source excerpt

It's been a long time since I've wanted to write this article. Time to go at it, shall we? :) People always seem to be surprised and say, "wait, you DON'T use Jetpack ViewModel, Jetpack Navigation, and Dagger-Hilt? Then what DO you use?" This article intends to answer that. We use Simple-Stack. (If you prefer watching talks, then a talk on the same subject is available at https://www.youtube.com/watch?v=5ACcin1Z2HQ) What is Simple-Stack? Simple-Stack is a navigation framework that I've been working on since the beginning of 2017, although its roots go back to 2015 -- when we were still experimenting with multiple versions of Mortar & Flow. (The 90s kids might still remember). Following up on the original proposition by Square, "Advocating Against Android Fragments" and "Simpler Android Apps with Flow and Mortar", we've been using Single-Activity approach in our apps since 2015. Now, the history of Flow and Mortar isn't all roses. I've heard people say "we tried it and it didn't work for us". I can attest to that: we had to manage our own fork, but even with that, we hit some of its limitations over time. We needed something reliable and versioned, so we rewrote Flow's original behavior, and intended to improve upon its limitations. This rewrite is what resulted in the creation of Simple-Stack. Why Simple-Stack? Simple-Stack is based on the idea that you intend to track your navigation state as a list of immutable and Parcelable classes -- screen identifiers (which the library calls "keys"). As long as the underlying navigation implementation allows for "navigation from any state to any state", it is possible to wrap that implementation using Simple-Stack. For example, something I hear often is that "navigation with Fragments is hard". I always point out that in our code, it's been like this since 2016: backstack.goTo(new SecondScreen(detailId)); // java No explicit fragment transaction, no Bundle, no newInstance(), just calling a method. How is this possible? Isn't Fr

## Fragment Lifecycles in the Age of Jetpack

DevFeed: [Fragment Lifecycles in the Age of Jetpack](<https://devfeed.tech/articles/fragment-lifecycles-in-the-age-of-jetpack-27062.md>)

Original publisher: [Read original article](<https://zsmb.co/fragment-lifecycles-in-the-age-of-jetpack/>)

Author: Márton Braun

Published: 2020-06-18T16:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [android-development](<https://devfeed.tech/topics/android-development.md>), [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [App](<https://devfeed.tech/topics/app.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [code](<https://devfeed.tech/tags/code.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dark-mode](<https://devfeed.tech/tags/dark-mode.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [scope](<https://devfeed.tech/tags/scope.md>), [ui](<https://devfeed.tech/tags/ui.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

### AI overview

This article explains Android Fragment lifecycles in the Jetpack ecosystem, covering the Fragment instance lifecycle and the nested view lifecycle. It describes recreation during state restoration, configuration changes, and process death, along with lifecycle methods, state handling, and resource management.

### Source excerpt

Fragments have... Complicated lifecycles, to say the least. Let's take a look at these, and how they all fit into the world of Jetpack today, with LifecycleOwners, LiveData, and coroutines.

## Easy Android Scopes

DevFeed: [Easy Android Scopes](<https://devfeed.tech/articles/easy-android-scopes-30595.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2020/03/easy-android-scopes/>)

Published: 2020-03-13T16:09:47Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [cache](<https://devfeed.tech/tags/cache.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

This tutorial examines how to scope Android objects across lifecycle changes, especially when Activities and Fragments are recreated during configuration changes. It discusses retaining presenters and extending lifecycle-bound retention to objects such as Dagger Components, while noting the limitations of the deprecated onRetainNonConfigurationInstance approach.

### Source excerpt

A common challenge when writing Android apps is properly scoping objects: if they outlive the lifecycle in which they're needed then we are wasting memory and they can be leaked, but if we recreate objects too soon then we could be duplicating work when we don't need to. The most common place that this manifests in is Activities and Fragments, since they're destroyed and replaced by a new instance during events like configuration changes, which can be unintuitive, at first.

## Announcing Shark: Smart Heap Analysis Reports for Kotlin

DevFeed: [Announcing Shark: Smart Heap Analysis Reports for Kotlin](<https://devfeed.tech/articles/announcing-shark-smart-heap-analysis-reports-for-kotlin-15513.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/announcing-shark-smart-heap-analysis-reports-for-kotlin>)

Author: P-Y Ricau

Published: 2019-08-06T19:00:00Z

Content type: release

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cli](<https://devfeed.tech/tags/cli.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [gc](<https://devfeed.tech/tags/gc.md>), [graph](<https://devfeed.tech/tags/graph.md>), [io](<https://devfeed.tech/tags/io.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-tuning](<https://devfeed.tech/tags/performance-tuning.md>)

### AI overview

The article announces Shark, a standalone Kotlin heap-analysis library that powers LeakCanary 2. It describes an indexed, on-demand approach to reading hprof heap dumps, using low and constant memory, an LRU cache, and layered components for heap analysis and Android-specific reporting. The reported benchmark parsed heap dumps and found shortest paths from GC roots to leaking objects six times faster than perflib while using ten times less memory.

### Source excerpt

The heap analyzer that powers LeakCanary 2

## Showing A Fragment For A Result

DevFeed: [Showing A Fragment For A Result](<https://devfeed.tech/articles/showing-a-fragment-for-a-result-22837.md>)

Original publisher: [Read original article](<http://androidessence.com/starting-fragment-for-result/>)

Author: Adam McNeilly

Published: 2019-01-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Android Essence](<https://devfeed.tech/sources/android-essence.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [request](<https://devfeed.tech/tags/request.md>)

### AI overview

This tutorial explains how to return a result between Android fragments using a target fragment. It demonstrates a small two-fragment application in which a name is entered in one fragment and displayed in the previous fragment.

### Source excerpt

A number of developers preach a single activity architecture on Android, which is something I've been trying to move forward to as well. In the process, though, I ran into one tricky problem. I don't have something like startActivityResult for fragments. If you're unfamiliar, startActivityForResult is a method that allows you to launch an activity with a specific request code, and when that activity finishes, your first activity will get a callback in onActivityResult and can do stuff with it. This post is going to walk through how we can achieve that same affect using fragments.

## Back to basics: Navigation

DevFeed: [Back to basics: Navigation](<https://devfeed.tech/articles/back-to-basics-navigation-25999.md>)

Original publisher: [Read original article](<https://medium.com/@nhaarman/back-to-basics-navigation-9c08dacff228?source=rss-fceb7a60a849------2>)

Author: Niek Haarman

Published: 2018-10-25T09:12:40Z

Content type: tutorial

Language: en

Sources: [Stories by Niek Haarman on Medium](<https://devfeed.tech/sources/stories-by-niek-haarman-on-medium.md>)

Topics: [navigation](<https://devfeed.tech/topics/navigation.md>), [Android](<https://devfeed.tech/topics/android.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [development](<https://devfeed.tech/tags/development.md>), [flow](<https://devfeed.tech/tags/flow.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [login](<https://devfeed.tech/tags/login.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [onboarding](<https://devfeed.tech/tags/onboarding.md>), [payment](<https://devfeed.tech/tags/payment.md>), [screen](<https://devfeed.tech/tags/screen.md>), [shopping](<https://devfeed.tech/tags/shopping.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

A fundamentals-focused guide to in-app navigation in Android applications. It explains the back stack, reusable navigation flows, conditional paths based on user state, and how navigation responsibilities are handled by Activities and Fragments.

### Source excerpt

Previously I talked about the unfortunate design of the Activity class, and I went back to basics regarding screens in an application. This time, we're going back to basics regarding in-app navigation. What is meant by 'navigation'? In a typical mobile application, a user can navigate from one screen to another. Traveling through an application builds up a navigational state; in Android this is traditionally done with a back stack. Activities can start new Activities which get pushed upon a stack. When the user presses back, the top Activity gets popped off the stack, to reveal the previous Activity. You can modify how Activities are created and pushed upon the stack with several flags and attributes, which are described at length on the Understand Tasks and Back Stack page. The back stackFlows In a non-trivial application, there are often multiple 'flows' that can be defined: there might be a login flow, an onboarding flow, or a flow that takes you through a payment process. In the latter case, you might have a series of screens that start with a description of the user's shopping cart, followed by forms to enter shipping and payment information. Such flows are usually completely self contained, and can be reused when necessary. It may be possible to start a specific flow from anywhere in the app, allowing for dozens of paths through your application to exist. An example payment flow for a shopping application.Conditional navigation In your typical application, there is no strict sequence of screens that will appear in a fixed order. Depending on user input, the user can travel through different paths through your application. A dashboard screen for example can have multiple buttons that all lead the user to a different screen. Another thing to consider is that the next state of the navigation state is dependent on the some conditional state. If the user already has entered shipping and payment info a previous time, we may want to skip these forms and go straight t

## Understanding Fragment Transactions and Back Navigation

DevFeed: [Understanding Fragment Transactions and Back Navigation](<https://devfeed.tech/articles/the-curious-case-of-haunting-fragments-28663.md>)

Original publisher: [Read original article](<https://jeroenmols.com/blog/2017/12/18/fragmentback/>)

Author: info@jeroenmols.com (Jeroen Mols)

Published: 2017-12-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jeroen Mols](<https://devfeed.tech/sources/jeroen-mols.md>)

Topics: [Transactions](<https://devfeed.tech/topics/transactions.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [App](<https://devfeed.tech/topics/app.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [events](<https://devfeed.tech/tags/events.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [login](<https://devfeed.tech/tags/login.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [rewrite](<https://devfeed.tech/tags/rewrite.md>), [screen](<https://devfeed.tech/tags/screen.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This tutorial investigates unexpected Android Fragment behavior when login-related Fragment transactions interact with back navigation. It explains that the transaction manager saves executed transactions rather than the Fragments themselves, which can leave multiple Fragments visible after navigating back.

### Source excerpt

Do Fragment transactions and back navigation have no more secrets for you? Well then you should try to solve the mystery in this post, where a Fragment (literally) came to haunt us...

## Avoiding LiveData observer leaks in the Android Fragment lifecycle

DevFeed: [Avoiding LiveData observer leaks in the Android Fragment lifecycle](<https://devfeed.tech/articles/architecture-components-pitfalls-part-1-25878.md>)

Original publisher: [Read original article](<https://bladecoder.medium.com/architecture-components-pitfalls-part-1-9300dd969808?source=rss-54910f05af37------2>)

Author: Christophe Beyls

Published: 2017-10-24T19:31:14Z

Content type: tutorial

Language: en

Sources: [Stories by Christophe Beyls on Medium](<https://devfeed.tech/sources/stories-by-christophe-beyls-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architecture-components](<https://devfeed.tech/tags/architecture-components.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This article explains a pitfall when subscribing to LiveData from an Android Fragment. Detaching and re-attaching a Fragment can create a new observer while the previous observer remains active, causing duplicate execution, a memory leak, and a performance problem until the Fragment is destroyed.

### Source excerpt

LiveData and the Fragment lifecycle The new Android Architecure Components are soon to be announced as stable after a few months of public testing. A lot has already been written about the basics (starting with the very good documentation) so I won't cover them here. Instead I would like to focus on important pitfalls that are mostly undocumented and rarely discussed and may cause issues in your applications if you miss them. In this first article, I'll talk about our beloved Fragments. Edit (14 may 2018): Google has finally fixed the issue in support library 28.0.0 and AndroidX 1.0.0. See solution 4 below.Edit (13 march 2020): onActivityCreated() has been officially deprecated and onViewCreated() should be used instead. The code samples in this article have been updated accordingly. The Architecture Components provide default ViewModelProvider implementations for activities and fragments. They allow you to store LiveData instances inside a ViewModel to be reused across configuration changes. The usage with activities is quite straightforward because the activity lifecyle maps well to the Lifecycle interface of the Architecture Components, but the fragment lifecycle is more complex and may cause subtle side effects if you're not being careful. The Fragment lifecycle (simplified version) Fragments can be detached and re-attached. When they are detached, their view hierarchy is destroyed and they become invisible and inactive, but their instance is not destroyed. When they are later re-attached, a new view hierarchy is created and onCreateView() and onViewCreated() are called again. For this reason, the usually recommended place to initialize Loaders and other asynchronous loading operations that will eventually interact with the view hierarchy is in onViewCreated(). We can assume this is also the best place to initialize LiveData instances by subscribing a new Observer. Most of the official Architecture Components samples also do it there. You would expect typical co

## Android Architecture: Introducing Pilot

DevFeed: [Android Architecture: Introducing Pilot](<https://devfeed.tech/articles/android-architecture-introducing-pilot-26033.md>)

Original publisher: [Read original article](<http://doridori.github.io//Android-Architecture-Pilot/>)

Author: SystemDotRun

Published: 2015-10-01T00:00:00Z

Content type: article

Language: en

Sources: [SystemDotRun](<https://devfeed.tech/sources/systemdotrun.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [mvc](<https://devfeed.tech/topics/mvc.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-architecture](<https://devfeed.tech/tags/android-architecture.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [controllers](<https://devfeed.tech/tags/controllers.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [mvc](<https://devfeed.tech/tags/mvc.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [project](<https://devfeed.tech/tags/project.md>), [repo](<https://devfeed.tech/tags/repo.md>), [view](<https://devfeed.tech/tags/view.md>)

### AI overview

This article introduces Pilot, a work-in-progress abstract application stack for Android. It discusses managing presenter lifecycles, application flow, data scoping, and architectures based on views or a mix of fragments and views, while relating the approach to MVC, MVP, MVVM, and Dagger custom scopes.

### Source excerpt

An abstract application stack for Android Motivation There are some common questions that keep popping up on the interwebs around the current collective thought on Android Architecture. Some of these questions are: What approach can I use to handle my Presenters Lifecycle? How can Presenters control the flow of an application? How can I scope data within my application? What architecture could I use to support a View only based architecture (or a mix of Fragments / Views) ? The above questions are not easy ones to address and by no means am I suggesting the below is the only solution to these common issues. I have started using a simple abstract application stack which for the kind of applications I have been developing allows a clean & structured base for them to sit on top of. This post and supporting repo is definitely a work-in-progress but Im hoping it will spark some discussion which can be fed back into the project so it's something that is useful to others also. I have been tempted to not write anything about this until I have answered all the pending questions I have myself but I feel more may be gained by publishing early and often. It is probably worth mentioning that if you are not currently using some kind of Presenter / Controller / distinct view logic abstraction in your application at present you probably will not have come across (or asked yourself) some of these questions. The same goes for Dagger (& Dagger Custom Scopes) and View only view implementations. If you have been playing with some of this stuff you may find the below more applicable. In this post I will briefly expand on the above questions and introduce the project. Preliminaries A Note on terminology Presenters are all the rage in the Android world at present. Some call them Presenters, Controllers, ViewModels, PassiveView etc and they are used as part of MVC, MVP, MVVM (with DataBinding), MVA etc and all these terms overlap and have differnt meanings and implementations depending on w

## Advocating Against Android Fragments

DevFeed: [Advocating Against Android Fragments](<https://devfeed.tech/articles/advocating-against-android-fragments-15493.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/advocating-against-android-fragments>)

Author: P-Y Ricau

Published: 2014-10-08T16:07:00Z

Content type: opinion

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [alternatives](<https://devfeed.tech/tags/alternatives.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [android](<https://devfeed.tech/tags/android.md>), [debug](<https://devfeed.tech/tags/debug.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

This opinion article explains why Square moved away from Android fragments. It argues that their complex lifecycle, difficult debugging, and close coupling of view-related code with business logic made fragments harder to maintain and test, and discusses alternatives.

### Source excerpt

Alternatives for dealing with (painful) Android fragments.

## ParcelablePlease: Generating Android Parcelable Code with Annotation Processing

DevFeed: [ParcelablePlease: Generating Android Parcelable Code with Annotation Processing](<https://devfeed.tech/articles/parcelableplease-25462.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/parcelableplease/>)

Author: Hannes Dorfmann

Published: 2014-09-24T09:00:00Z

Content type: tutorial

Language: en

Sources: [Hannes Dorfmann](<https://devfeed.tech/sources/hannes-dorfmann.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [annotation-processor](<https://devfeed.tech/tags/annotation-processor.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [java](<https://devfeed.tech/tags/java.md>), [parcelable](<https://devfeed.tech/tags/parcelable.md>)

### AI overview

This tutorial introduces ParcelablePlease, an Android annotation processor intended to reduce boilerplate code when implementing Parcelable. It compares the approach with Parceler and AutoParcel, explaining their generated wrapper or subclass designs and compatibility trade-offs.

### Source excerpt

In my last blog post I have introduced FragmentArgs an Annotation Processor for Fragments that reduces writing boilerplate code. In this post I want to talk about a similar problem android developer face: Writing boilerplate code for Parcelable This post is part of a series of posts about useful annotation processors like FragmentArgs or AnnotatedAdapter

[Next page](<https://devfeed.tech/tags/fragments.md?cursor=WyIyMDE0LTA5LTI0VDA5OjAwOjAwKzAwOjAwIiwgIjIzYWY0Nzk3LTgxMDQtNGFjYS04ZTUxLTkyZGE2MDc0Yjc0ZCJd>)