Package 

Class ShapeKtxKt

    • Method Summary

      Modifier and Type Method Description
      final static <T extends View> T radius(T $self, Integer radius) 设置视图的圆角。此扩展函数为任意视图提供了设置圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图的轮廓设置为圆角矩形。
      final static <T extends View> T topRadius(T $self, Integer radius) 设置视图顶部圆角。此扩展函数为任意视图提供了设置顶部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图顶部的轮廓设置为圆角。
      final static <T extends View> T bottomRadius(T $self, Integer radius) 设置视图底部圆角。此扩展函数为任意视图提供了设置底部圆角的功能。如果指定的圆角大小为0,则不应用圆角效果;否则,将视图底部的轮廓设置为圆角。
      final static Unit animateHeight(View $self, Integer targetValue, Long duration, Animator.AnimatorListener listener, Function1<Float, Unit> action) 设置高度,带有过渡动画
      final static View height(View $self, Integer height) 设置View的高度
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 - 可选行为
      • height

         final static View height(View $self, Integer height)

        设置View的高度