当前位置: 代码迷 >> 综合 >> 动态设置 Shape color
  详细解决方案

动态设置 Shape color

热度:40   发布时间:2023-09-07 05:58:19.0

动态设置Shape背景color

 GradientDrawable gradientDrawable = (GradientDrawable)view.getBackground();gradientDrawable.setColor(context.getResources().getColor(color));

TextView设置右图片

 textview.setCompoundDrawablesWithIntrinsicBounds(null, null, context.getResources().getDrawable(R.mipmap.expand_down), null);
  相关解决方案