Text 是什么
文本(Text)是用来显示字符串的组件,在界面上显示为一块文本区域。Text作为一个基本组件,有很多扩展,常见的有按钮组件Button,文本编辑组件TextField。
创建Text
<Text
ohos:id="$+id:text"
ohos:width="match_content"
ohos:height="match_content"
ohos:text="Text"
ohos:background_element="$graphic:color_gray_element"/>
设置背景
效果
更多技术交流请加入QQ群
群名称:harmonyos鸿蒙技术交流
群 号:856567895