最终还是决定用 Jetpack Compose 重写 Halo 后端管理 APP。一个是原生更好一点,然后主要是 Jetpack Compose 写起来比前端三件套爽哈哈(我才不会说是因为解决不好跨域问题和 Web 开发 App 调用原生 API 麻烦和 Vue 用起来不熟练呢ᕙ(`▿´)ᕗ),不过
本文展示了 Scaffold 的一个简单的基本用法,更多用法请看官方文档一、Scaffold 脚手架@OptIn(ExperimentalMaterialApi::class)@Composablefun Scaffold() { // BottomBar 当前选择项 var selec
一、ConstraintLayout约束布局,使用前需要导入相应的依赖:implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"ConstraintLayou 最新版查询:https://d
一、Dialog对话框,content 参数允许我们传入自定义的 Composable 组件。它和普通的 Composable 组件不同在于其需要依赖独立的 Window 来进行显示。下面代码演示了点击按钮后显示对话框:var openDialog by remember { mutableStat
一、Checkbox复选框,代码如下所示:val checkState = remember { mutableStateOf(false) }Checkbox( checked = checkState.value, onCheckedChange = { checkState.val
一、Button1.基本按钮Button 默认没有任何样式,仅仅是一个点击事件响应组件,需要在 content 参数中使用其他组件来实现 Button。Button( onClick = {}) { Text(text = "Hello")}2.按钮添加图标在 Tex
一、IconIcon 组件支持三种类型的图片设置,如下所示Column {Icon(imageVector = ImageVector.vectorResource(id = R.drawable.set_svg), contentDescription = "矢量图&quo
记录一下在 Manjaro 上用 IDEA 打包 Compose for Desktop 的 deb 包失败解决方法:
一、TextText 遵循 Material Design 设计规范,如无需使用 Material Design 可以使用更底层的 BasicText 组件。Text 函数如下所示:@Composablefun Text(text: String,// 显示的文本 modifier: Modi