Jetpack Compose example

This example shows how to use Kanzi Android framework (droidfw) with Jetpack Compose on Android. For the Gradle files, the example uses Kotlin DSL.

The main activity ComposeActivity contains these Kanzi-based composables:

  • CoverFlow loads a Kanzi prefab from a kzb file.

  • End instantiates a Kanzi Text Block node and sets the text that the node shows.

You can find the example in the <KanziWorkspace>/Examples/Android/Compose directory.

Requirements:

  • JDK 17

  • Gradle 8.0 or newer

  • Android Gradle plugin 8.1.2 or newer

  • Android Studio Giraffe or newer

Running the example

To run the example:

  1. Connect your Android device to your computer.

  2. In the Kanzi Studio main menu select File > Export > Build Android Package.

    Kanzi Studio creates an Android package from your Kanzi Studio project, deploys, and runs it on your Android device.

    ../../_images/build-android-package.png

See also

Developing with the Kanzi Android framework (droidfw)