Button详解
来源:互联网 发布:photoshop cc mac微盘 编辑:程序博客网 时间:2024/06/05 22:58
Button认知
public class Button extends TextView java.lang.Object ↳ android.view.View ↳ android.widget.TextView ↳ android.widget.Button
使用详解
Button设置字体颜色
主要是调用Button.setTextColor();进行颜色设置。
Button.setTextColor(Android.graphics.Color.RED);//系统自带的颜色类
Button.setTextColor(0xffff00ff);//颜色值
Button.setTextColor(this.getResources().getColor(R.color.red));//通过获得资源文件进行设置
Button setTextColor()参数调用分析
常用实现效果
装载自:Android自定义Button背景色,弧度 详细内容请参看原作者。
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- pressed --> <item android:state_pressed="true" > <shape android:shape="rectangle"> <gradient android:startColor="#ff8c00" android:endColor="#ff8c00" android:angle="270" /> <corners android:radius="4dp" /> </shape> </item> <!-- focus --> <item android:state_focused="true" > <shape> <gradient android:startColor="#ffc2b7" android:endColor="#ffc2b7" android:angle="270" /> <corners android:radius="4dp" /> </shape> </item><!-- default --> <item> <shape> <gradient android:startColor="#d0d0d0" android:endColor="#d0d0d0" android:angle="0" /> <corners android:radius="4dp" /> </shape> </item></selector>
0 0
- Button详解
- Button详解介绍
- iOS Button 使用详解
- Android UI(Button)详解
- Android UI 详解之Button
- Button、ImageButton及ImageView详解
- react native Button 使用详解
- 细品RibbonX(18):button控件详解
- Android控件详解之Button和Checkbox
- 对button更深层次的研究 详解
- IOS开发之按钮控件Button详解
- iOS自定义按钮button详解封装说明
- button.
- button
- button
- button
- button
- button
- 数据结构实验之串二:字符串匹配
- 51nod 1135 原根
- leetcode-search-in-rotated-sorted-array
- linux禁用root给指定用户添加sudo命令
- 前端面试题精华
- Button详解
- 51nod 1136 欧拉函数
- bzoj1610 [Usaco2008 Feb]Line连线游戏
- 快速排序
- 51nod 1138 连续整数的和
- 宏和函数的区别
- 八大排序 -- 插入排序 之 【shell排序】
- linux驱动模型
- 51nod 1154 回文串划分