且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在代码中为图像按钮设置透明背景?

更新时间:2023-09-22 08:01:46

这很简单,只需将背景颜色设置为透明

This is the simple only you have to set background color as transparent

    ImageButton btn=(ImageButton)findViewById(R.id.ImageButton01);
    btn.setBackgroundColor(Color.TRANSPARENT);