Text组件
ohos:属性
-
id="$+id:text_helloworld" #在程序中控制,需要id="$+id:name",转回MainAbilitySlice.java,在onStart下加入代码
Text text = findComponentById (ResourceTable.Id_text); text.startAutoScrolling(); -
height="match_content or 100vp"
-
width="match_content or 200vp"
-
background_element="$graphic:background_ability_main" #文本背景 须在graphic目录下建立命名的元素
ohos:shape="oval" *文本框背景形状* <solid ohos:color="#ff0000" </solid> -
layout_aligment="horizontal_center" #对齐方式
-
text="$string:mainability_helloworld or 显示文本"
-
text_size="40vp"
-
text_color="#FF0000"
-
italic="true" #斜体
-
top_margin="10vp" #顶部框-框间隙
-
padding="20vp" #框内间隙
-
truncation_mode="auto-scrolling" #截断模式,此为自动滚动
Image组件

- scale_mode 缩放方式
- clip_alignment 裁剪对齐方式
DatePicker组件

PostgreyBar组件

posted on
浙公网安备 33010602011771号