---
title: "pollForLocationOnScreenChange"
description: "Returns true if the absolute location of the [composeView] on the screen has changed since the last call."
type: "function"
lastmod: "2026-08-27"
---
## API Reference

### pollForLocationOnScreenChange

> Source set: Android

```kotlin
fun pollForLocationOnScreenChange()
```

Returns true if the absolute location of the `composeView` on the screen has changed since
the last call. This method asks the view for its location instead of using Compose APIs like
[LayoutCoordinates](/jetpack-compose/androidx.compose.ui/ui/interfaces/LayoutCoordinates/api) because it does less work, and this method is intended to be called on
every frame.

The location can change without any callbacks being fired if, for example, the soft keyboard
is shown or hidden when the window is in `adjustPan` mode. In that case, the window's root
view (`ViewRootImpl`) will "scroll" the view hierarchy in a special way that doesn't fire any
callbacks.
