我可以通过设置ImageButton的背景透明的 layout.xml
:
I can set ImageButton background transparent in layout.xml
using:
android:background="@android:color/transparent"
我怎样才能用java code acomplish同样的事情?
像 ib.setBackgroundColor(???);
How I can acomplish same thing using java code?
Something like ib.setBackgroundColor(???);
这是一个简单的只有你必须设置背景颜色为透明
This is the simple only you have to set background color as transparent
ImageButton btn=(ImageButton)findViewById(R.id.ImageButton01);
btn.setBackgroundColor(Color.TRANSPARENT);