---
title: "Suspending over Views — Example · Chris Banes"
url: https://daily.dev/posts/suspending-over-views-example-chris-banes-z0ydrnbuq
source_url: https://chrisbanes.me/posts/suspending-views-example
type: article
source: "Chris Banes"
published: 2026-07-05T07:14:09.685Z
updated: 2026-07-05T07:17:44.024Z
tags: ["android", "kotlin"]
reading_time: 10
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Suspending over Views — Example · Chris Banes

**[Chris Banes](https://daily.dev/sources/chrisbanes)** · 10 min read · 0 upvotes · 0 comments

## Summary

A practical walkthrough of using Kotlin coroutines to solve a complex Android UI sequencing problem in the Tivi app. The post demonstrates how wrapping callback-based APIs (RecyclerView scroll listeners, AdapterDataObserver, MotionLayout transitions) into suspending extension functions eliminates nested callback chains. Key functions covered include `awaitItemIdExists()`, `awaitScrollEnd()`, `awaitTransitionComplete()`, and `awaitAnimationFrame()`, showing how sequential coroutine code replaces tightly coupled, hard-to-maintain callback logic for coordinating data loading, scrolling, and animations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://chrisbanes.me/posts/suspending-views-example>

## Similar posts on daily.dev

- [Mastering Coroutines and Flow in Android](https://daily.dev/posts/mastering-coroutines-and-flow-in-android-opgwyvoqn) · Medium · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin)

[View this post on daily.dev](https://daily.dev/posts/suspending-over-views-example-chris-banes-z0ydrnbuq)
