Skip to content

View → Compose Migration

Before:

implementation 'io.fabianterhorst:isometric:0.1.0'

After:

implementation("io.github.jayteealao:isometric-compose:<version>")

Before (XML):

<io.fabianterhorst.isometric.IsometricView
android:id="@+id/isometric_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />

After (Compose):

IsometricScene(modifier = Modifier.fillMaxSize()) {
Shape(geometry = Prism(Point.ORIGIN), color = IsoColor.BLUE)
}

Before:

isometricView.add(Prism(Point(0.0, 0.0, 0.0)), Color(33, 150, 243))

After:

Shape(
geometry = Prism(Point(0.0, 0.0, 0.0)),
color = IsoColor(33, 150, 243)
)

Color was renamed to IsoColor to avoid collision with Compose’s Color class.

Before:

isometricView.setClickListener { renderCommand ->
// handle click
}

After:

IsometricScene(
config = SceneConfig(
gestures = GestureConfig(
onTap = { event -> /* event.node is the tapped shape */ }
)
)
) { ... }
AspectView APICompose API
Entry pointIsometricView (XML)IsometricScene (Composable)
Adding shapesview.add(shape, color)Shape(geometry, color) composable
Transformsshape.translate/rotate/scaleShape params + Group hierarchy
State updatesImperative: view.clear() + re-addDeclarative: recomposition
Click handlingsetClickListenerGestureConfig.onTap
Color typeColorIsoColor
AnimationManual invalidationwithFrameNanos + recomposition

The isometric-android-view module still provides the View API for projects that aren’t ready to migrate.