private fun getBackgroundColor(): Int {
var bgColor = Color.parseColor("#000000")
if (backgroundColorTv.background is ColorDrawable) {
val colorDrawable = backgroundColorTv.background as ColorDrawable
bgColor = colorDrawable.color
}
return bgColor
}
获取安卓控件背景色
猜你喜欢
转载自blog.csdn.net/yinxing2008/article/details/104049743
今日推荐
周排行