小编Rit*_*kar的帖子

将自定义chipDrawable背景设置为Chip

我想将自定义可绘制背景设置为 Chip,就像 chip.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.bg_cutom_drawable));

但它不起作用。它给出了错误

java.lang.UnsupportedOperationException: Do not set the background resource; Chip manages its own background drawable.
Run Code Online (Sandbox Code Playgroud)

它需要一个chipDrawable。如何为其创建chipDrawable。我尝试过,但无法找到解决方案。请建议我将不胜感激。

android-chips

9
推荐指数
1
解决办法
4677
查看次数

标签 统计

android-chips ×1