Skip to content

Releases: caoyanglee/universalui

增加关于TextView的两个功能

06 Mar 05:53
Compare
Choose a tag to compare
//增加 TextView显示 图片 CenterAlignImageSpan
tv_test.setSpannableString(
        SpannableParam("这是 "),
        SpannableParam("大文字 ", arrayListOf(
                AbsoluteSizeSpan(20, true)
        )),
        SpannableParam("图片", arrayListOf(
                CenterAlignImageSpan(getContext().getDrawablePro(R.drawable.universal_ic_edit_clear))
        ))
)
//增加 动态设置TextView的drawables
tv_test.setDrawables(
        leftImage = R.drawable.address_ic_edit,
        topImage = R.drawable.address_ic_edit,
        rightImage = R.drawable.address_ic_edit,
        bottomImage = R.drawable.address_ic_edit,
        drawablePadding = getContext().dip2px(8f)
)

V0.0.14

28 Feb 10:18
Compare
Choose a tag to compare

增加并优化使用SpannableString的扩展

扩展方法名:setSpannableString(vararg items: SpannableParam)

使用例子

tv_tv_tip1.setSpannableString(
    SpannableParam("无样式"),
    SpannableParam(
        "点击样式", arrayListOf(
            AbsoluteSizeSpan(23, true),
            ForegroundColorSpan(getColorPro(R.color.black)),
            StyleSpan(Typeface.BOLD),
            MyClickSpan(getColorPro(R.color.black)) {
                toast("我被点到了")
            }
        )
    ),
    SpannableParam("")
)

效果:点击下面demo图片

V0.0.13

28 Feb 03:30
Compare
Choose a tag to compare

再次优化StatusBarManager

拆分StatusBarManager设置状态栏的颜色和状态栏字体颜色

StatusBarManager.setColor(mActivity.window, mActivity.getColorPro(R.color.white))
ToolBarManager.with(mActivity, mActivity.getContentView())
    .bg {
        setBackgroundColor(mActivity.getColorPro(R.color.colorPrimary))
    }
    .leftMenuIcon {
        setImageResource(R.drawable.universal_toolbar_nav_back)
    }
    .title {
        text = targetTitle
    }

V0.0.12

26 Feb 08:29
Compare
Choose a tag to compare

优化通用图片加载扩展

V0.0.11

24 Feb 14:34
d47d965
Compare
Choose a tag to compare

测试2

V0.0.10

24 Feb 14:04
Compare
Choose a tag to compare

测试上传

V0.0.9

24 Feb 13:38
Compare
Choose a tag to compare

优化BasePagerAdapter类

V0.0.8

20 Feb 07:26
Compare
Choose a tag to compare

修复ToolBar的问题

V0.0.7

20 Feb 07:19
Compare
Choose a tag to compare
修复toolbar出现crash问题

V0.0.6

20 Feb 07:01
Compare
Choose a tag to compare

优化ToolbarManager的代码