-
public final class ShapeKtxKt
-
-
Method Summary
Modifier and Type Method Description final static UnitsetupViewCorners(Integer radius, View view)设置多个视图的圆角。 final static <T extends View> Tradius(T $self, Integer radius)设置视图的圆角。此扩展函数为任意视图提供了设置圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图的轮廓设置为圆角矩形。 final static <T extends View> TtopRadius(T $self, Integer radius)设置视图顶部圆角。此扩展函数为任意视图提供了设置顶部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图顶部的轮廓设置为圆角。 final static <T extends View> TbottomRadius(T $self, Integer radius)设置视图底部圆角。此扩展函数为任意视图提供了设置底部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图底部的轮廓设置为圆角。 final static UnitanimateHeight(View $self, Integer targetValue, Long duration, Animator.AnimatorListener listener, Function1<Float, Unit> action)设置高度,带有过渡动画 final static Viewheight(View $self, Integer height)设置View的高度 -
-
Method Detail
-
setupViewCorners
final static Unit setupViewCorners(Integer radius, View view)
设置多个视图的圆角。
- Parameters:
radius- 圆角的尺寸,以像素为单位。view- 一个或多个要设置圆角的视图。
-
radius
final static <T extends View> T radius(T $self, Integer radius)
设置视图的圆角。
此扩展函数为任意视图提供了设置圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图的轮廓设置为圆角矩形。
- Parameters:
radius- 圆角的尺寸,以像素为单位。如果该值为0,则视图不会有圆角效果。
-
topRadius
final static <T extends View> T topRadius(T $self, Integer radius)
设置视图顶部圆角。
此扩展函数为任意视图提供了设置顶部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图顶部的轮廓设置为圆角。
- Parameters:
radius- 圆角的尺寸,以像素为单位。如果该值为0,则视图顶部不会有圆角效果。
-
bottomRadius
final static <T extends View> T bottomRadius(T $self, Integer radius)
设置视图底部圆角。
此扩展函数为任意视图提供了设置底部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图底部的轮廓设置为圆角。
- Parameters:
radius- 圆角的尺寸,以像素为单位。如果该值为0,则视图底部不会有圆角效果。
-
animateHeight
final static Unit animateHeight(View $self, Integer targetValue, Long duration, Animator.AnimatorListener listener, Function1<Float, Unit> action)
设置高度,带有过渡动画
- Parameters:
targetValue- 目标高度duration- 时长action- 可选行为
-
-
-
-