小编Ste*_*one的帖子

VB6:如何从日期类型中删除时间部分

我有一个Date变量,其中还包含时间:

Dim dt As Date
dt = "8/3/2016 7:10:40 AM"
Run Code Online (Sandbox Code Playgroud)

--> 以某种方式删除时间,所以结果应该是:

dt = "8/3/2016"
Run Code Online (Sandbox Code Playgroud)

怎么去掉时间呢?

vb6 date-formatting

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

在 exec_python_func() 中执行 python 函数时出错

通过构建 Yocto 映像,我在填充 Yocto SDK 期间遇到了这个问题。有人知道在哪里以及如何修复它吗?

ERROR: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: '/yocto/warrior/sources/poky/meta/classes/staging.bbclass', lineno: 557, function: extend_recipe_sysroot
     0553:                    dest = newmanifest[l]
     0554:                    if l.endswith("/"):
     0555:                        staging_copydir(l, targetdir, dest, seendirs)
     0556:                        continue
 *** 0557:                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0558:
     0559:    bb.note("Installed into sysroot: %s" % str(msg_adding))
     0560:    bb.note("Skipping as already exists in sysroot: …
Run Code Online (Sandbox Code Playgroud)

linux yocto

5
推荐指数
1
解决办法
1万
查看次数

如何在 Compose 中使用动画矢量绘图

我创建了矢量可绘制动画,并且想在 Compose 中使用。我在官方文档中发现我需要调用animatedVectorResource. 但AnimatedImageVector在下一个版本之前,整个内容已从 compose 中删除。如何在当前的 compose 版本中启动动画绘图?

android android-image android-drawable android-vectordrawable android-jetpack-compose

5
推荐指数
1
解决办法
5044
查看次数

增加 Compose 中 AlertDialog 的标题和文本之间的间距

AlertDialog像下面这样简单

AlertDialog(
    modifier = Modifier,
    title = {
        Text(text = "Title")
    },
    text = {
        Column(
            modifier = Modifier.fillMaxWidth()
        ) {
            TextButton() {
                Text("Text 1")
            }
            TextButton() {
                Text("Text 2")
            }
        }
    },
    confirmButton = {},
    dismissButton = {}
)
Run Code Online (Sandbox Code Playgroud)

如何设置标题和第一个之间的间距TextButton
我尝试将 a 设置.padding(top = X.dp)为“列”或第一个文本按钮,但这似乎只在 .txt 文件的底部创建一个空间AlertDialog
设置自定义也.height(X.dp)不起作用。

我正在使用撰写1.0.3

android spacing android-layout android-dialog android-jetpack-compose

5
推荐指数
2
解决办法
1900
查看次数

如何禁用任何 Jetpack Compose 视图上的涟漪效应?

Jetpack Compose中,如何在单击某个项目时删除(或更改其形状)涟漪效果?

这是Material Design 3NavigationBar中的一个示例

var selectedItem by remember { mutableStateOf(0) }
val items = listOf("Songs", "Artists", "Playlists")

NavigationBar {
    items.forEachIndexed { index, item ->
        NavigationBarItem(
            icon = { Icon(Icons.Filled.Favorite, contentDescription = null) },
            label = { Text(item) },
            selected = selectedItem == index,
            onClick = { selectedItem = index }
        )
    }
}
Run Code Online (Sandbox Code Playgroud)

尝试添加一个Modifierwith

modifier = Modifier.clickable(interactionSource = interactionSource,indication = null){}
Run Code Online (Sandbox Code Playgroud)

无论是在 上NavigationBar还是在 上NavigationBarItem,都不起作用。

android android-layout kotlin material-components-android android-jetpack-compose

4
推荐指数
1
解决办法
3808
查看次数

如何在jetpack上制作两个窗口组成桌面并从一个窗口转到另一个窗口?

例如,如何在 jetpack 上创建两个窗口组成桌面,并在单击按钮时从一个窗口转到另一个窗口?

fun main() = application {
    Window(
        onCloseRequest = ::exitApplication,
        title = "Products Manager",
        state = rememberWindowState(width = 700.dp, height = 600.dp)
    ) {
        val count = remember { mutableStateOf(0) }
        MaterialTheme {
            Column(Modifier.fillMaxSize(), Arrangement.spacedBy(5.dp)) {
                Button(modifier = Modifier.align(Alignment.CenterHorizontally),
                    onClick = {
                        count.value++
                    }) {
                    Text(if (count.value == 0) "Hello World" else "Clicked ${count.value}!")
                }
                Button(modifier = Modifier.align(Alignment.CenterHorizontally),
                    onClick = {
                        count.value = 0
                    }) {
                    Text("Reset")
                }
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

desktop-application kotlin compose-desktop

4
推荐指数
1
解决办法
3154
查看次数

如何在 Jetpack Compose 中修改线圈图像占位符的颜色和大小

1.3.2在 Jetpack Compose 中使用 Coil,我有一个Image像这样的

Image(
    painter = rememberImagePainter(
        data = imageUrl,
        onExecute = { _, _ -> true },
        builder = {
            placeholder(R.drawable.icon)
        }
    ),
    contentScale = ContentScale.FillWidth,
    contentDescription = null,
    modifier = Modifier
        .fillMaxWidth()
        .aspectRatio(1f)
)
Run Code Online (Sandbox Code Playgroud)

如何为占位符图标设置自定义颜色和大小?我在文档
中没有找到任何示例

android android-image android-icons android-jetpack-compose coil

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