Package 

Class ViewExtensionKt

    • Method Detail

      • height

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

        设置View的高度

      • limitHeight

         final static View limitHeight(View $self, Integer h, Integer min, Integer max)

        设置View高度,限制在min和max范围之内

        Parameters:
        min - 最小高度
        max - 最大高度
      • width

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

        设置View的宽度

      • limitWidth

         final static View limitWidth(View $self, Integer w, Integer min, Integer max)

        设置View宽度,限制在min和max范围之内

        Parameters:
        min - 最小宽度
        max - 最大宽度
      • widthAndHeight

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

        设置View的宽度和高度

        Parameters:
        width - 要设置的宽度
        height - 要设置的高度
      • margin

         final static View margin(View $self, Integer leftMargin, Integer topMargin, Integer rightMargin, Integer bottomMargin)

        设置View的margin

        Parameters:
        leftMargin - 默认保留原来的
        topMargin - 默认是保留原来的
        rightMargin - 默认是保留原来的
        bottomMargin - 默认是保留原来的
      • isGone

         final static Boolean isGone(View $self)

        可见性相关

      • gone

         final static Unit gone(View $self)
      • visibleOrGone

         final static Unit visibleOrGone(View $self, Boolean boolean)

        设置界面隐藏显示

        Parameters:
        boolean - true时显示控件,false时隐藏控件
      • visibleOrInvisible

         final static Unit visibleOrInvisible(View $self, Boolean boolean)
        Parameters:
        boolean - true时显示控件,false时隐藏控件
      • view

         final static View view(Context $self, Integer layoutId, ViewGroup root, Boolean attachRoot)

        通过布局文件获取View实例

      • view

         final static View view(LayoutInflater $self, Integer layoutId, ViewGroup root, Boolean attachRoot)

        返回布局文件获取到的View实例

      • singleClick

         final static <T extends View> Unit singleClick(T $self, View.OnClickListener onClickListener, Long time)