android 实现透明按钮

Here we are going to see how to make a button transparent in Android…

Java代码 复制代码
  1. <Button android:background="@android:color/transparent"    
  2.   
  3.  android:text="@+id/Button01"    
  4.   
  5.  android:id="@+id/Button01"    
  6.   
  7.  android:layout_width="wrap_content"    
  8.   
  9.  android:layout_height="wrap_content"    
  10.   
  11.  android:textColor="#ffffff" />   
  1. <Button android:background="@android:color/transparent"   
  2.   
  3.  android:text="@+id/Button01"   
  4.   
  5.  android:id="@+id/Button01"   
  6.   
  7.  android:layout_width="wrap_content"   
  8.   
  9.  android:layout_height="wrap_content"   
  10.   
  11.  android:textColor="#ffffff" />   



By using android:background=”@android:color/transparent” the button background will become transparent

posted on 2012-09-12 22:52  无尽的思念  阅读(463)  评论(0)    收藏  举报

导航