Skip to content

Releases: lygttpod/SuperTextView

V2.2.0

03 Apr 10:13
Compare
Choose a tag to compare
  • 高度支持wrap_content
  • AppCompatTextView替换TextView
  • 修复已知bug
  • 升级gradle

V2.1.8

14 Aug 10:01
Compare
Choose a tag to compare

修复字体颜色不支持selector的问题 Issues描述

1、布局中TextView颜色使用selector

            <com.allen.library.SuperTextView
                android:layout_width="match_parent"
                android:layout_height="50dp"
                stv:sLeftTextColor="@color/selector_stv_text_color"
                stv:sLeftTextString="账号与安全"
                stv:sRightIconRes="@drawable/arrow_right_red"
                stv:sRightTextString="已保护"
                stv:sRightTextColor="@color/selector_stv_text_color"
                stv:sRightTvDrawableLeft="@drawable/v1"
                stv:sUseShape="true" />

2、代码中TextView颜色使用selector(使用getResources().getColorStateList(R.color.selector_stv_text_color))

     superTextView
               .setXXXTextColor(getResources().getColorStateList(R.color.selector_stv_text_color));

V2.1.7

04 May 13:02
Compare
Choose a tag to compare

新增动态设置分割线颜色的方法

superTextView.setTopDividerLineColor(getResources().getColor(R.color.colorAccent))
             .setBottomDividerLineColor(getResources().getColor(R.color.colorPrimary));

V2.1.6

22 Jan 05:56
Compare
Choose a tag to compare

修复top center bottom 间距设置不均匀的bug
issues描述

V2.1.5

14 Oct 03:31
Compare
Choose a tag to compare

1、左右ImageView新增圆形图片的支持(内置CircleImageView)

<attr name="sLeftIconShowCircle" format="boolean" />
<attr name="sRightIconShowCircle" format="boolean" />

2、取消maxEms和maxLines的默认值,需要的时候自行配置
3、取消xml中配置字体加粗属性,变为代码控制

V2.1.4

01 Sep 09:04
Compare
Choose a tag to compare

1、新增动态设置分割线是否显示

                superTextView
                        .setTopDividerLineVisibility(View.GONE)
                        .setBottomDividerLineVisibility(View.GONE);

2、新增动态设置左中右文字的对齐方式

                superTextView
                        .setLeftTextGravity(Gravity.LEFT)
                        .setCenterTextGravity(Gravity.LEFT)
                        .setRightTextGravity(Gravity.LEFT);

V2.1.3

24 Aug 07:21
Compare
Choose a tag to compare

1、SuperTextView新增左中右TextView的drawableLeft和DrawableRight的宽高可在xml中配置 issues61
2、修复sLeftViewWidth宽度单位问题
3、修复xxxLines,保证设置多行后不会占行的bug

V2.1.2

14 Aug 13:14
Compare
Choose a tag to compare

1、SuperTextView新增获取TextView的方法,用于设置一些不常用的属性

        superTextView.getLeftTopTextView();
        superTextView.getLeftTextView();
        superTextView.getLeftBottomTextView();
        superTextView.getCenterTopTextView();
        superTextView.getCenterTextView();
        superTextView.getCenterBottomTextView();
        superTextView.getRightTopTextView();
        superTextView.getRightTextView();
        superTextView.getRightBottomTextView();

2、默认显示字符从原来的10修改为15

V2.1.1

12 Aug 08:53
Compare
Choose a tag to compare

1、SuperTextView所有setText方法参数String修改为CharSequence

目的是为了支持:SpannableStringBuilder、String.format、Html.fromHtml

2、SuperTextView与shape相关的属性均可代码动态设置

        superTextView.setShapeCornersRadius(20)
                .setShapeCornersTopLeftRadius(20)
                .setShapeCornersBottomLeftRadius(20)
                .setShapeCornersTopRightRadius(20)
                .setShapeCornersBottomRightRadius(20)
                .setShapeStrokeColor(getResources().getColor(R.color.colorPrimary))
                .setShapeStrokeWidth(1)
                .setShapeSrokeDashWidth(1)
                .setShapeStrokeDashGap(5)
                .setShapeSolidColor(getResources().getColor(R.color.white))
                .setShapeSelectorNormalColor(getResources().getColor(R.color.red_btn))
                .setShapeSelectorPressedColor(getResources().getColor(R.color.gray))
                .useShape();//设置完各个参数之后这句调用才生效

设置完各个参数之后这句useShape()调用才生效

3、SuperTextView新增动态设置背景的方法

        superTextView
                .setSBackground(getResources().getDrawable(R.drawable.selector_white))


4、SuperButton所有属性均提供代码动态设置

      /**
         * 所有属性均可用代码动态实现
         * 以下只是展示部分方法 可根据需求选择不同的方法
         */
        superButton.setShapeType(SuperButton.RECTANGLE)
                .setShapeCornersRadius(20)
                .setShapeSolidColor(getResources().getColor(R.color.colorAccent))
                .setShapeStrokeColor(getResources().getColor(R.color.colorPrimary))
                .setShapeStrokeWidth(1)
                .setShapeSrokeDashWidth(2)
                .setShapeStrokeDashGap(5)
                .setTextGravity(SuperButton.TEXT_GRAVITY_RIGHT)
                .setShapeUseSelector(true)
                .setShapeSelectorPressedColor(getResources().getColor(R.color.gray))
                .setShapeSelectorNormalColor(getResources().getColor(R.color.red_btn))
                .setShapeSelectorDisableColor(getResources().getColor(R.color.colorPrimary))
                .setUseShape();
        // TODO: 2017/8/12 动态设置切记需要在最后调用 setUseShape 才能对设置的参数生效

V2.1.0

06 Aug 04:57
Compare
Choose a tag to compare

1、点击事件回传当前view
2、sRightTvDrawableRight支持设置图片的宽高
3、mLeftViewWidth属性 重命名为 sLeftViewWidth

issue描述49