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>
public void animateRipple(TouchEvent event)
public void animateRipple(final float x, final float y)
public void setRippleColor(int rippleColor)
public int getRippleColor()
public RippleType getRippleType()
public void setRippleType
public Boolean isCentered()
public void setCentered(final Boolean isCentered)
public int getRipplePadding()
public void setRipplePadding(int ripplePadding)
public Boolean isZooming()
public void setZooming(Boolean hasToZoom)
public float getZoomScale()
public void setZoomScale(float zoomScale)
public int getZoomDuration()
public void setZoomDuration(int zoomDuration)
public int getFrameRate()
public void setFrameRate(int frameRate)
public float getRippleAlpha()
public void setRippleAlpha(float rippleAlpha)
public void setOnRippleCompleteListener(OnRippleCompleteListener listener)
name | format | description |
---|---|---|
rv_color | color | set ripple color |
rv_type | int | set ripple type |
rv_zoom | boolean | has to zoom |
rv_centered | boolean | is centered |
rv_rippleDuration | int | set ripple duration |
rv_alpha | float | set ripple alpha |
rv_ripplePadding | int | set ripple padding |
rv_zoomScale | float | set ripple zoom scale |
rv_zoomDuration | int | set zoome duration |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型