Add :core:ui:compose:common module to host commonly shared functionality and add DevicePreviews

This commit is contained in:
Wolf Montwé 2023-03-14 13:33:16 +01:00
parent f15ba5797c
commit 0b572ec088
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
5 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,3 @@
## Core - UI - Compose - Common
This module contains common code for the compose UI.

View file

@ -0,0 +1,8 @@
plugins {
id(ThunderbirdPlugins.Library.androidCompose)
}
android {
namespace = "app.k9mail.core.ui.compose.common"
resourcePrefix = "core_ui_common_"
}

View file

@ -0,0 +1,16 @@
package app.k9mail.core.ui.compose.common
import androidx.compose.ui.tooling.preview.Devices
import androidx.compose.ui.tooling.preview.Preview
/**
* A marker annotation for device previews.
*
* It's used to provide previews for a set of different devices and form factors.
*/
@Preview(name = "Phone", device = Devices.PHONE)
@Preview(name = "Phone landscape", device = "spec:shape=Normal,width=891,height=411,unit=dp,dpi=420")
@Preview(name = "Foldable", device = Devices.FOLDABLE)
@Preview(name = "Tablet", device = Devices.TABLET)
@Preview(name = "Desktop", device = Devices.DESKTOP)
annotation class DevicePreviews

View file

@ -8,5 +8,6 @@ android {
}
dependencies {
api(projects.core.ui.compose.common)
implementation(libs.androidx.compose.material)
}

View file

@ -46,6 +46,7 @@ include(
":core:common",
":core:testing",
":core:android:common",
":core:ui:compose:common",
":core:ui:compose:designsystem",
":core:ui:compose:theme",
)