GradientDrawable colorDrawable = new GradientDrawable(); colorDrawable.setColor(Color.parseColor(item.getBidTags().get(0).getTagColor())); colorDrawable.setCornerRadius(mContext.getResources().getDimension(R.dimen.x5)); textView.setGravity(Gravity.CENTER); textView.setBackgroundDrawable(colorDrawable);
动态设置shape 背景颜色 圆角
最新推荐文章于 2021-05-26 01:00:39 发布