Android setThumb(可绘制)变量类型



全部,

我试图在java中动态更改seekbar拇指上显示的图像,并遇到了setThumb方法。我在res/drawable下有一个.png文件,但找不到使用setThumb()引用该.png文件的正确方法。你们中有人知道怎么做吗?

最好的,提前感谢!

您需要从资源中创建一个drawable。

Drawable mypicture= getResources().getDrawable(R.drawable.mypicture);

最新更新