| | |
| | | |
| | | GradientDrawable gradientDrawable = new GradientDrawable(); |
| | | gradientDrawable.setCornerRadius(DimenUtils.dip2px(context, 40)); |
| | | gradientDrawable.setStroke(DimenUtils.dip2px(context, 1), context.getResources().getColor(R.color.main_text_color)); |
| | | gradientDrawable.setStroke(DimenUtils.dip2px(context, 1), context.getResources().getColor(R.color.theme)); |
| | | gradientDrawable.setColor(context.getResources().getColor(R.color.white)); |
| | | tv_left.setBackgroundDrawable(gradientDrawable); |
| | | tv_left.setVisibility(View.GONE); |
| | |
| | | GradientDrawable shape = new GradientDrawable(); |
| | | shape.setCornerRadius(ScreenUtils.dp2px(context, 100)); |
| | | //设置颜色 |
| | | shape.setColor(Color.parseColor("#FF217A")); |
| | | shape.setColor(context.getResources().getColor(R.color.theme)); |
| | | //设置大小 |
| | | tv_go.setBackground(shape); |
| | | |