Releases: caoyanglee/universalui
Releases · caoyanglee/universalui
增加关于TextView的两个功能
//增加 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
增加并优化使用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
再次优化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
优化通用图片加载扩展
V0.0.11
测试2
V0.0.10
测试上传
V0.0.9
优化BasePagerAdapter类
V0.0.8
修复ToolBar的问题
V0.0.7
修复toolbar出现crash问题
V0.0.6
优化ToolbarManager的代码