imageButton中默认会以image的宽高设置一个背景框。

怎么去掉?

  1、添加 android:background="#00000000";//设置背景透明

  2、把android:src="@drawable/xx"改为android:background="@/drawable/xx"

  3、在代码中添加如下:

    View v= findViewById(R.id.xx);

    v.getBackground().setAlpha(100);//0~255透明度值 

相关文章:

  • 2022-12-23
  • 2021-08-17
  • 2022-01-12
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2021-10-14
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-10-30
相关资源
相似解决方案