小编Ami*_*ein的帖子

Jetpack Compose 滚动条

有没有办法添加滚动条来添加LazyColumnScrollableColumn已弃用)。Javadoc 没有提到有关 Jetpack Compose 中滚动条的任何内容。

澄清一下,这是我想要实现的设计: 1

甚至可以在 Jetpack Compose 中做到这一点吗?或者不支持滚动条?

android android-jetpack-compose

9
推荐指数
4
解决办法
1407
查看次数

有没有办法对 Jetpack Compose Image 执行矩阵缩放?

在基于 XML 的图像中,我们可以按照https://medium.com/mobile-app-development-publication/android-matrix-scaletype-explained-4501f0796be8拥有矩阵缩放类型,这是一种可以执行的非常强大的自定义缩放类型在图像上。

然而,在 JetpackCompose 图像中,我们不再有 Matix Scale。相反,contentScale

        Image(imagePicture,
            contentDescription = null,
            modifier = Modifier.fillMaxSize(),
            alignment = alignment.alignment,
            contentScale = scale.scaleType // the scale here
        )
Run Code Online (Sandbox Code Playgroud)

仅具有此处列出的https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ContentScale,即 Crop、Fit、FillWidth、FillHeight、FillBounds、Fit、Inside 和 None。

如何在 JetpackCompose 中实现 Matrix Scale?

android android-jetpack-compose

6
推荐指数
1
解决办法
1476
查看次数

Jetpack compose - 阿拉伯语 (RTL) 标点符号注释字符串错误

我正在寻找 jetpack compose 中的阿拉伯符号支持。我想更改一些阿拉伯标点符号的颜色并自定义它们的外观。目前,我正在使用此功能来实现此目的:

\n
private fun colorPonctuation(input: String): AnnotatedString {\n    return buildAnnotatedString {\n        input.forEach {\n            if (it == \'\\u064B\' || it == \'\\u064D\'\n                || it == \'\\u064D\' || it == \'\\u064E\' || it == \'\\u064F\' ||\n                it == \'\\u0650\' || it == \'\\u0651\' || it == \'\\u0652\' || it == \'\\u0653\' ||\n                it == \'\\u0654\' || it    == \'\\u0655\' || it == \'\\u0656\' || it == \'\\u0657\' ||\n                it == \'\\u0658\' || it == \'\\u0659\' || it == \'\\u065A\' …
Run Code Online (Sandbox Code Playgroud)

android-jetpack-compose android-jetpack-compose-text

5
推荐指数
0
解决办法
514
查看次数