6
我一直在尝试使用下面的代码设置一个按钮上的图像,但它似乎并没有工作......我认为我做错了是我正在使用的图像的路径,但我尝试了不同的路径和它不会工作...我已经将我的图像复制到res文件夹中的drawable文件夹中...我在这里做错了什么?在Android的按钮上设置图像?
final Button next = (Button) findViewById(R.id.Button02) ;
Drawable d = Drawable.createFromPath("@drawable/finalarrow1");
next.setBackgroundDrawable(d);