设置一个按钮为透明,
(1)修改配置文件
<Button
android:id="@+id/btnAppMore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="详细信息>>"
android:layout_alignParentRight="true"
android:layout_marginLeft="150dp"
android:background="@android:color/transparent"
/>
设置完透明按钮以后,发现按钮不见了……
(2)注意,按钮默认颜色同手机背景色(黑色)一样,按钮的文字默认也为黑色,这里,我们可以通过activity的oncreate()中设置一下按钮的字体颜色:
btn=(Button)findViewById(R.id.btnAppMore);
btn.setTextColor(Color.WHITE);
其实,透明也可以通过Java完成,嘎嘎,btn.setBackgroundColor(Color.TRANSPARENT);即可

更多相关文章

  1. 安卓开发之实现下角圆形按钮
  2. Android自定义dialog以及如何去除黑色背景
  3. 设置listview的背景颜色
  4. Android中按钮点击效果显示
  5. android 自定义按钮的外边框
  6. 点击LinearLayout使用selector改变TextView字体颜色
  7. Android抽屉式按钮实现
  8. Android 代码改变图片颜色android:tint="@color/main_color" and

随机推荐

  1. Android(安卓)WIFI热点默认安全性的修改
  2. [51CTO]Android消息机制
  3. android获取电话号码实例
  4. Android:创建快捷方式
  5. Android(安卓)framwork 锁屏界面开发 笔
  6. Android官方入门文档[11]支持不同平台版
  7. android之Matrix
  8. 判断Android设备是否连接网络
  9. 2011.09.07——— android zxing 条形码
  10. Android(安卓)Studio 运行时出现 finishe