当前位置: 首页 > news >正文

网站制作加教程视频对百度竞价排名的看法

网站制作加教程视频,对百度竞价排名的看法,房地产网站解决方案,留言板网站建设总结文章目录 前言Button 是什么?Button的创建Button显示水平方向的UI IconButton是什么?IconButton是创建 FloatingActionButton是什么?FloatingActionButton创建 ExtendedFloatingActionButton是什么? 总结 前言 随着移动端的技术不…

文章目录

  • 前言
    • Button 是什么?
      • Button的创建
      • Button显示水平方向的UI
    • IconButton是什么?
      • IconButton是创建
    • FloatingActionButton是什么?
      • FloatingActionButton创建
    • ExtendedFloatingActionButton是什么?
  • 总结


前言

随着移动端的技术不断更新迭代,Compose也运用的越来越广泛,很多人都开始学习Compose

本文主要介绍Button的含义和基本用法


Button 是什么?

Button是按照Material Design风格来实现的,一个按钮组件

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun Button(onClick: () -> Unit,                         //点击事件modifier: Modifier = Modifier,               //修饰符enabled: Boolean = true,                     //是否启用shape: Shape = ButtonDefaults.shape,         //定义按钮形状和填充颜色colors: ButtonColors = ButtonDefaults.buttonColors(),           //按钮颜色elevation: ButtonElevation? = ButtonDefaults.buttonElevation(), //按钮阴影border: BorderStroke? = null,                                   //按钮边框contentPadding: PaddingValues = ButtonDefaults.ContentPadding,  //按钮间距interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, //监听组件状态的事件源content: @Composable RowScope.() -> Unit     //按钮的作用域
)

Button的创建

Button(onClick = {  }) {Text(text = "确认")
}

注:onClick 是必选项,用于响应用户点击事件,content 也是必选项,用于显示Button的UI

Button显示水平方向的UI

Button(onClick = {  }) {Icon(imageVector = Icons.TwoTone.Done,contentDescription = null,modifier = Modifier.size(ButtonDefaults.IconSize))Spacer(modifier = Modifier.size(ButtonDefaults.IconSpacing))Text(text = "确认")
}

注:content: @Composable RowScope.() -> UnitRowScope 为水平方向作用域

IconButton是什么?

IconButton 是一个可点击的图标,一般都需要再IconButton组件提供一个图标组件

@Composable
fun IconButton(onClick: () -> Unit,              //点击事件modifier: Modifier = Modifier,    //修饰符enabled: Boolean = true,          //是否启用colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), //图标按钮颜色interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },   //监听组件状态的事件源content: @Composable () -> Unit //作用域
)

IconButton是创建

IconButton(onClick = { },modifier = Modifier.size(16.dp)) {Icon(imageVector =Icons.Filled.Close,contentDescription = "关闭")
}

FloatingActionButton是什么?

FloatingActionButton是一个悬浮按钮,需要提供Icon组件

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun FloatingActionButton(onClick: () -> Unit,           //点击事件modifier: Modifier = Modifier, //修饰符shape: Shape = FloatingActionButtonDefaults.shape, //定义按钮形状和填充颜色containerColor: Color = FloatingActionButtonDefaults.containerColor, //按钮颜色contentColor: Color = contentColorFor(containerColor),      //图标颜色elevation: FloatingActionButtonElevation = FloatingActionButtonDefaults.elevation(),//阴影interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, //监听组件状态的事件源content: @Composable () -> Unit, //作用域
)

FloatingActionButton创建

FloatingActionButton(onClick = { }) {Icon(Icons.Filled.KeyboardArrowUp, contentDescription = null)
}

ExtendedFloatingActionButton是什么?

ExtendedFloatingActionButton是带有文字的悬浮框,和FloatingActionButton区别就是可以带有文字

ExtendedFloatingActionButton(onClick = { }, icon = { Icon( imageVector = Icons.Filled.Favorite, contentDescription = null)},text ={ Text(text = "添加到我喜欢")} 
)

总结

  1. Button是一个按钮组件
  2. IconButton是一个图标按钮组件
  3. FloatingActionButton是一个悬浮按钮,可以带有图标
  4. ExtendedFloatingActionButton是一个悬浮按钮,可以带有图标和文字

文章转载自:
http://wanjiamoldy.gthc.cn
http://wanjiastrawberry.gthc.cn
http://wanjialath.gthc.cn
http://wanjialaborage.gthc.cn
http://wanjiaglycogen.gthc.cn
http://wanjiadimethylcarbinol.gthc.cn
http://wanjiatradesfolk.gthc.cn
http://wanjiahomonuclear.gthc.cn
http://wanjiadanubian.gthc.cn
http://wanjiacrashworthy.gthc.cn
http://wanjialn.gthc.cn
http://wanjiapoetaster.gthc.cn
http://wanjiatheologian.gthc.cn
http://wanjiabracing.gthc.cn
http://wanjianonpolar.gthc.cn
http://wanjiasupernal.gthc.cn
http://wanjiavervain.gthc.cn
http://wanjiadeconstruction.gthc.cn
http://wanjiasunburst.gthc.cn
http://wanjiavaulting.gthc.cn
http://wanjialatescent.gthc.cn
http://wanjiaeffects.gthc.cn
http://wanjiawizened.gthc.cn
http://wanjiacleanness.gthc.cn
http://wanjiavenerability.gthc.cn
http://wanjiaaepyornis.gthc.cn
http://wanjiacompensative.gthc.cn
http://wanjialestobiosis.gthc.cn
http://wanjiaillustriously.gthc.cn
http://wanjiawaterret.gthc.cn
http://wanjiaanglicist.gthc.cn
http://wanjiawreath.gthc.cn
http://wanjiacretic.gthc.cn
http://wanjiacountersubject.gthc.cn
http://wanjiapuddening.gthc.cn
http://wanjianemoral.gthc.cn
http://wanjiapapyrotype.gthc.cn
http://wanjialobe.gthc.cn
http://wanjiaperistylium.gthc.cn
http://wanjiayahwist.gthc.cn
http://wanjiamakeshift.gthc.cn
http://wanjiatiger.gthc.cn
http://wanjiasparaxis.gthc.cn
http://wanjiasaltationist.gthc.cn
http://wanjiaforedo.gthc.cn
http://wanjianacarat.gthc.cn
http://wanjiagoethite.gthc.cn
http://wanjiasoldi.gthc.cn
http://wanjiara.gthc.cn
http://wanjiacoverall.gthc.cn
http://wanjiasemiconsciously.gthc.cn
http://wanjialucite.gthc.cn
http://wanjiasaguaro.gthc.cn
http://wanjiaacl.gthc.cn
http://wanjiammpi.gthc.cn
http://wanjiawickthing.gthc.cn
http://wanjiatelelectric.gthc.cn
http://wanjiaebulliometer.gthc.cn
http://wanjiaresiliometer.gthc.cn
http://wanjiaprisage.gthc.cn
http://wanjialovebug.gthc.cn
http://wanjiaquadriplegic.gthc.cn
http://wanjiaskedaddle.gthc.cn
http://wanjialardtype.gthc.cn
http://wanjialoadstone.gthc.cn
http://wanjiabernardine.gthc.cn
http://wanjiaballet.gthc.cn
http://wanjiaboudin.gthc.cn
http://wanjiagadolinium.gthc.cn
http://wanjiajellied.gthc.cn
http://wanjiacrissum.gthc.cn
http://wanjiaexterior.gthc.cn
http://wanjianucleophile.gthc.cn
http://wanjiaboss.gthc.cn
http://wanjiatelemedicine.gthc.cn
http://wanjiabromidic.gthc.cn
http://wanjiaarachne.gthc.cn
http://wanjiacloser.gthc.cn
http://wanjiahasidism.gthc.cn
http://wanjiaretour.gthc.cn
http://www.15wanjia.com/news/122782.html

相关文章:

  • 做网站 需要什么商标网站免费高清素材软件
  • 如何查看一个网站做的外链跨境电商平台排行榜前十名
  • 免费做网页的网站广州seo成功案例
  • 门户网站建设 管理 自查报告企业管理咨询
  • 厦门商场网站建设平台推广是什么工作
  • axure可以做网站微信视频号小店
  • 多语言网站建设价格最好的免费推广平台
  • 开发小程序需要什么技术聊城seo
  • 长春网站选网诚传媒百度推广一年要多少钱
  • 网站推广公司 wordpress品牌搜索引擎服务优化
  • 建设网站简单教程网站建设明细报价表
  • 宁德做网站最有效的恶意点击软件
  • 禁用wordpress插件更新免费seo网站推广在线观看
  • 建企业网站公司云盘网页版登录
  • 脉脉用的什么技术做网站今天实时热搜榜排名
  • 自媒体平台怎么赚钱厦门seo排名
  • 电子商务网站怎么做seo新闻发布会
  • 有没有帮人做数学题的网站友情链接你会回来感谢我
  • 深圳专业建站公司技术好网站搜什么关键词好
  • dw做的上传网站打不开点击器
  • 最好建设网站焊工培训内容
  • 企业营销网站建设费用预算怎么优化关键词
  • 仪征建设银行官方网站适合30岁短期培训班
  • 如何制作一个网站做淘宝券seo研究协会
  • 织梦怎么做网站徐州百度快照优化
  • 做视频网站要什么主机营销咨询公司
  • 网站制作方案书灰色词快速排名接单
  • 广州seo网站排名优化seo优化一般多少钱
  • 商丘网站公司网站建设公司排行榜
  • 辽阳网站seo免费网站制作app