Android 设置按钮为透明
设置一个按钮为透明,
<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);即可
Android 设置按钮为透明的更多相关文章
- Android设置按钮为透明
设置一个按钮为透明, (1)修改配置文件 <Button android:id="@+id/btnAppMore" android:layout_width=&quo ...
- Android 设置按钮背景透明与半透明_图片背景透明
Button或者ImageButton的背景设为透明或者半透明 半透明<Button android:background="#e0000000" ... /> 透明 ...
- android设置按钮按下的不同效果图
<!-- 按钮设置按下去的不同效果的方式,设置android:background属性, 下面的 button_select实际上是button_select.xml --> <Bu ...
- android设置背景图片透明
设置Activiyt为透明可以在Activity中引用系统透明主题android:theme="@android:style/Theme.Translucent" 设置背景图片透明 ...
- Android设置按钮透明
<Button android:id="@+id/bt3" android:layout_width="163dp" android:layout_hei ...
- Android设置透明、半透明等效果
设置透明效果 大概有三种 1.用android系统的透明效果Java代码 android:background="@android:color/transparent" 例如 设 ...
- 设置UITableView背景透明/监听cell左边的删除按钮的点击事件
_tableView = [[UITableView alloc] init]; _tableView.delegate = self; _tableView.dataSource = self; _ ...
- c#中设置按钮Button为透明
方法一:代码实现 /// <summary> /// 设置透明按钮样式 /// </summary> private void SetBtnStyle(Button btn) ...
- android设置Activity背景色为透明的3种方
方法一:这种方法比较简单,只有一个步骤,只需要在配置文件中把需要设置为透明的activity的样式设置为 Android:theme="@android:style/Theme.Transl ...
随机推荐
- ###STL学习--迭代器
点击查看Evernote原文. #@author: gr #@date: 2014-08-23 #@email: forgerui@gmail.com STL中的迭代器. ###stl学习 |--迭代 ...
- string[] 和 arraylist互转及问题解决
1,String 数组转成 list<String> String[] s={"1","2","3","5" ...
- XIB 不能拖线的低级错误
问题描述 创建 XIB 文件后,与其相关联的.m文件进行拖线,但无论如何都无法拖线,过程无任何反应.清除缓存重启 Xcode 均无法解决. 解决方法 事实上这是个低级错误,原因为 xib 的 view ...
- OC3_字符串分割
// // main.m // OC3_字符串分割 // // Created by zhangxueming on 15/6/11. // Copyright (c) 2015年 zhangxuem ...
- javascript异步执行函数导致的变量变化问题解决思路
for(var i=0;i<3;i++) { setTimeout(function(){ console.log(i) },0); }控制台输出:333 这是因为执行方法的时候for循环已经执 ...
- [PS] 透明底图片制作
网页中有时需要自己绘制一些图片,或者现有的图片希望修改底色,这些都会用到透明底色的图片,下面总结两种方法,比较简单入门. 一.自己制作透明底图片 步骤1.新建图片,背景内容选择透明: 步骤2.选择文字 ...
- 07_XPath_01_入门
[工程截图] [person.xml] <?xml version="1.0" encoding="UTF-8"?> <students> ...
- 九度OJ 1512 用两个栈实现队列 【数据结构】
题目地址:http://ac.jobdu.com/problem.php?pid=1512 题目描述: 用两个栈来实现一个队列,完成队列的Push和Pop操作. 队列中的元素为int类型. 输入: 每 ...
- C#生成二维码名片
摘自<31天学会CRM项目开发<C#编程入门级项目实战>> 本例将使用ThoughtWorks.QRCode类库生成二维码名片.正式编码前,先了解一下什么是vCard?它是一种 ...
- jQuery(function(){})与(function(){})(jQuery)的区别
jQuery(function(){ });/$(function(){ });全写为 $(document).ready(function(){}); 意义为在DOM加载完毕后执行了ready()方 ...