Skip to content

Commit 201f878

Browse files
committed
feat: add AboutScreen preview
1 parent 01bc64a commit 201f878

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.fsck.k9.ui.settings
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.PreviewLightDark
5+
import app.k9mail.core.ui.compose.designsystem.PreviewWithThemesLightDark
6+
import app.k9mail.core.ui.compose.theme2.k9mail.R
7+
import kotlinx.collections.immutable.persistentListOf
8+
9+
@Composable
10+
@PreviewLightDark
11+
internal fun AboutScreenPreview() {
12+
PreviewWithThemesLightDark {
13+
AboutScreen(
14+
aboutTitle = "About K-9 Mail",
15+
projectTitle = "Open Source Project",
16+
librariesTitle = "Libraries",
17+
versionNumber = "17.0a1",
18+
appLogoResId = R.drawable.core_ui_theme2_k9mail_logo,
19+
libraries = fakeLibraryList,
20+
)
21+
}
22+
}
23+
24+
private val fakeLibraryList = persistentListOf(
25+
Library(
26+
"Android Jetpack libraries",
27+
"https://developer.android.com/jetpack",
28+
"Apache License, Version 2.0",
29+
),
30+
Library(
31+
"AndroidX Preference extended",
32+
"https://github.com/takisoft/preferencex-android",
33+
"Apache License, Version 2.0",
34+
),
35+
Library("AppAuth for Android", "https://github.com/openid/AppAuth-Android", "Apache License, Version 2.0"),
36+
Library("Apache HttpComponents", "https://hc.apache.org/", "Apache License, Version 2.0"),
37+
Library("AutoValue", "https://github.com/google/auto", "Apache License, Version 2.0"),
38+
Library("CircleImageView", "https://github.com/hdodenhof/CircleImageView", "Apache License, Version 2.0"),
39+
Library("ckChangeLog", "https://github.com/cketti/ckChangeLog", "Apache License, Version 2.0"),
40+
Library("Commons IO", "https://commons.apache.org/io/", "Apache License, Version 2.0"),
41+
Library("ColorPicker", "https://github.com/gregkorossy/ColorPicker", "Apache License, Version 2.0"),
42+
Library("DateTimePicker", "https://github.com/gregkorossy/DateTimePicker", "Apache License, Version 2.0"),
43+
Library("Error Prone annotations", "https://github.com/google/error-prone", "Apache License, Version 2.0"),
44+
)

0 commit comments

Comments
 (0)