Zalando May 23, 2017

Detecting List Items Observed by User

Article Summary

Zalando's engineering team faced a tricky challenge: how do you know if a user actually *saw* an item in a scrolling list, not just flew past it?

The team needed to track when users viewed RecyclerView items for at least 250ms, accounting for rapid scrolling and multiple callbacks. Their solution combines RxJava operators with Android's scroll listeners to create an elegant tracking system.

Key Takeaways

Critical Insight

Using RxJava operators transforms a complex stateful tracking problem into a clean, declarative solution that fires analytics events only when users truly perceive content.

The article includes a complete code implementation and compares this reactive approach against a naive state-based solution that misses key edge cases.

Recent from Zalando

Related Articles