diff --git a/build-plugin/src/main/kotlin/thunderbird.app.android.compose.gradle.kts b/build-plugin/src/main/kotlin/thunderbird.app.android.compose.gradle.kts
index 1d2f167a4..166de9e23 100644
--- a/build-plugin/src/main/kotlin/thunderbird.app.android.compose.gradle.kts
+++ b/build-plugin/src/main/kotlin/thunderbird.app.android.compose.gradle.kts
@@ -48,6 +48,6 @@ dependencies {
debugImplementation("androidx.compose.ui:ui-test-manifest")
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
- implementation("androidx.activity:activity-compose:1.6.1")
- implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
+ implementation(libs.androidx.compose.activity)
+ implementation(libs.androidx.compose.lifecycle.viewmodel)
}
diff --git a/core/ui/compose/demo/build.gradle.kts b/core/ui/compose/demo/build.gradle.kts
new file mode 100644
index 000000000..2bfcbb981
--- /dev/null
+++ b/core/ui/compose/demo/build.gradle.kts
@@ -0,0 +1,18 @@
+plugins {
+ id(ThunderbirdPlugins.App.androidCompose)
+}
+
+android {
+ namespace = "app.k9mail.core.ui.compose.demo"
+
+ defaultConfig {
+ applicationId = "app.k9mail.core.ui.compose.demo"
+ versionCode = 1
+ versionName = "1.0"
+ }
+}
+
+dependencies {
+ androidTestImplementation(libs.androidx.test.ext.junit.ktx)
+ androidTestImplementation(libs.androidx.test.espresso.core)
+}
diff --git a/core/ui/compose/demo/proguard-rules.pro b/core/ui/compose/demo/proguard-rules.pro
new file mode 100644
index 000000000..f1b424510
--- /dev/null
+++ b/core/ui/compose/demo/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/core/ui/compose/demo/src/main/AndroidManifest.xml b/core/ui/compose/demo/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..e5489c868
--- /dev/null
+++ b/core/ui/compose/demo/src/main/AndroidManifest.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/ui/compose/demo/src/main/java/app/k9mail/core/ui/compose/demo/MainActivity.kt b/core/ui/compose/demo/src/main/java/app/k9mail/core/ui/compose/demo/MainActivity.kt
new file mode 100644
index 000000000..c7397fd41
--- /dev/null
+++ b/core/ui/compose/demo/src/main/java/app/k9mail/core/ui/compose/demo/MainActivity.kt
@@ -0,0 +1,30 @@
+package app.k9mail.core.ui.compose.demo
+
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.compose.material.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.tooling.preview.Preview
+
+class MainActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ setContent {
+ Greeting(name = stringResource(id = R.string.app_name))
+ }
+ }
+}
+
+@Composable
+fun Greeting(name: String) {
+ Text(text = "Hello $name!")
+}
+
+@Preview(showBackground = true)
+@Composable
+fun Preview() {
+ Greeting("Android")
+}
diff --git a/core/ui/compose/demo/src/main/res/drawable-v24/ic_launcher_foreground.xml b/core/ui/compose/demo/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 000000000..02f9cf0af
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/ui/compose/demo/src/main/res/drawable/ic_launcher_foreground.xml b/core/ui/compose/demo/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 000000000..587ad8708
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 000000000..515b77ec1
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 000000000..515b77ec1
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher.png b/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..924281162
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher_round.png b/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 000000000..fc1923f21
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher.png b/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..1d71edf96
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher_round.png b/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 000000000..b56dad758
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher.png b/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..791d73e5e
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..8b202416d
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png b/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..d337db093
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..3fc5fd2ee
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..556153a4b
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..d65ef78d0
Binary files /dev/null and b/core/ui/compose/demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/core/ui/compose/demo/src/main/res/values/colors.xml b/core/ui/compose/demo/src/main/res/values/colors.xml
new file mode 100644
index 000000000..1e7f3d9fa
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #FCE8DC
+
diff --git a/core/ui/compose/demo/src/main/res/values/strings.xml b/core/ui/compose/demo/src/main/res/values/strings.xml
new file mode 100644
index 000000000..bba4303e1
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ K-9 Compose Demo
+
diff --git a/core/ui/compose/demo/src/main/res/values/themes.xml b/core/ui/compose/demo/src/main/res/values/themes.xml
new file mode 100644
index 000000000..e49a72c03
--- /dev/null
+++ b/core/ui/compose/demo/src/main/res/values/themes.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index bc6052ca2..88021c03a 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -70,7 +70,11 @@ androidx-core = { module = "androidx.core:core", version.ref = "androidxCore" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" }
androidx-preference = { module = "androidx.preference:preference", version.ref = "androidxPreference" }
androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
+androidx-compose-activity = "androidx.activity:activity-compose:1.6.1"
+androidx-compose-lifecycle-viewmodel = "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
androidx-test-core = "androidx.test:core:1.5.0"
+androidx-test-ext-junit-ktx = "androidx.test.ext:junit-ktx:1.1.5"
+androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.5.1"
android-material = "com.google.android.material:material:1.7.0"
fastadapter = { module = "com.mikepenz:fastadapter", version.ref = "fastAdapter" }
fastadapter-extensions-drag = { module = "com.mikepenz:fastadapter-extensions-drag", version.ref = "fastAdapter" }
diff --git a/images/K-9_Mail-compose-demo.svg b/images/K-9_Mail-compose-demo.svg
new file mode 100644
index 000000000..d64d3e77d
--- /dev/null
+++ b/images/K-9_Mail-compose-demo.svg
@@ -0,0 +1,413 @@
+
+
diff --git a/settings.gradle.kts b/settings.gradle.kts
index d2ee14e06..b7b946b38 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -38,6 +38,10 @@ include(
":app:html-cleaner"
)
+include(
+ ":core:ui:compose:demo"
+)
+
include(
":ui-utils:LinearLayoutManager",
":ui-utils:ItemTouchHelper",