您当前的位置: 首页 > 

蓝不蓝编程

暂无认证

  • 0浏览

    0关注

    706博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

获取安卓控件背景色

蓝不蓝编程 发布时间:2020-01-20 11:33:54 ,浏览量:0

fun getBackgroundColor(view: View): Int {
    var bgColor = Color.parseColor("#000000")
    if (view.background is ColorDrawable) {
        val colorDrawable = view.background as ColorDrawable
        bgColor = colorDrawable.color
    }
    return bgColor
}
关注
打赏
1639405877
查看更多评论
立即登录/注册

微信扫码登录

1.4886s