Page Saver
There is an extension that restores the previously opened page upon restart.
Setup
Add the katalog-ext-pagesaver
package.
dependencies {
implementation("com.moriatsushi.katalog:katalog:`LATEST_VERSION`")
implementation("com.moriatsushi.katalog:katalog-ext-pagesaver:`LATEST_VERSION`")
}
Usage
Specify PageSaverExt
when calling registerKatalog
.
registerKatalog(
title = "Android Sample",
extensions = listOf(
PageSaverExt() // add this line
)
) {
compose("Text") {
Text(text = "Hello, World")
}
}
When you launch the UI Catalog, previously opened pages are automatically restored. At the first startup or if the page does not exist, the TOP page will be launched.
This will help you quickly see the UI changes.