问题:不知道鸿蒙HarmonyOS所有系统组件支不支持ripper水波纹效果?目前谷歌的Android 5.x以上所有系统提供的组件都默认支持水波纹效果,包括checkbox、button、imagebutton、text、menuitem等等,由于都是系统级支持,所以问下鸿蒙OS支不支持?
回答: 暂时不支持。但据开发人员透露,有计划已安排上。
说明: 参考https://gitee.com/openharmony-tpc/RippleEffect 使用: dependencies{ implementation 'io.openharmony.tpc.thirdlib:RippleEffect:1.0.1' } ############## RippleType = SIMPLE <com.andexert.library.RippleView ohos:height="match_content" ohos:width="match_content"> <Image ohos:height="match_content" ohos:width="match_content" ohos:image_src="$media:icon"/> </com.andexert.library.RippleView> RippleType = SIMPLE isCentered = true; <com.andexert.library.RippleView ohos:height="match_content" ohos:width="match_content" ripple:rv_centered="true"> <Image ohos:height="match_content" ohos:width="match_content" ohos:image_src="$media:icon"/> </com.andexert.library.RippleView> RippleType = DOUBLE <com.andexert.library.RippleView ohos:height="match_content" ohos:width="match_content" ripple:rv_type="1"> <Image ohos:height="match_content" ohos:width="match_content" ohos:image_src="$media:icon"/> </com.andexert.library.RippleView> RippleType = RECTANGLE <com.andexert.library.RippleView ohos:padding="10vp" ohos:height="match_content" ohos:width="match_content" ripple:rv_type="2" ripple:rv_zoom="true"> <Image ohos:height="100vp" ohos:width="200vp" ohos:background_element="red"/> </com.andexert.library.RippleView> ##############
以上截图为API说明。
以上截图为属性集说明。 |