【发布时间】:2020-02-04 18:51:03
【问题描述】:
此代码在 API > 23 中有效,但在 API 23 中无效。 我需要 ImageButton 的 setBackground 一个可绘制图像。
我该如何解决这个问题?
ImageButton imgbt = findViewById(R.id.imgbt );
imgbt .setBackgroundDrawable(new BitmapDrawable(EstadoDescritivo.this.getResources(), BitmapFactory.decodeResource(getResources(),
R.drawable.ic_car)));
谢谢
【问题讨论】:
标签: java android android-studio android-layout