
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源
去关联
与Android api保持一致
注意:
具体用法与Android中一致。
参考其他CollapsingToolbarLayout教程
<com.ryan.ohos.extension.nested.component.CollapsingToolbarLayout
ohos:id="$+id:toolBarLayout"
ohos:height="match_parent"
ohos:width="match_parent"
ohos:toolbarId="$+id:toolbar"
ohos:layout_scrollFlags="scroll|exitUntilCollapsed">
<Image
ohos:height="match_parent"
ohos:width="match_parent"
ohos:image_src="$media:ohos"
ohos:scale_mode="clip_center"
ohos:layout_collapseMode="parallax"/>
<com.ryan.ohos.extension.widget.toolbar.Toolbar
ohos:id="$+id:toolbar"
ohos:height="$float:toolbarHeight"
ohos:width="match_parent"
ohos:title="$string:mainability_description"
ohos:gravity="center"
ohos:hideNavigationIcon="true"
ohos:layout_collapseMode="pin"/>
</com.ryan.ohos.extension.nested.component.CollapsingToolbarLayout>
Toolbar的默认值可以查看src\main\resources\base\element\collapsing_toolbar.json