.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="拨打电话"
android:id="@+id/phone"
android:background="@drawable/anniu1"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不拨打电话"
android:background="@drawable/anniu2"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="拨打电话"
android:drawableLeft="@drawable/anniu5"
/> <Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不拨打电话"
android:drawableRight="@drawable/anniu6"
/> <ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/anniu3"
/> </LinearLayout>

Android——Button的颜色的更多相关文章

  1. android Button 切换背景,实现动态按钮和按钮颜色渐变

        android Button 切换背景,实现动态按钮和按钮颜色渐变 一.添加android 背景筛选器selector实现按钮背景改变     1.右键单击项目->new->Oth ...

  2. Android Button的基本使用

    title: Android Button的基本使用 tags: Button,按钮 --- Button介绍: Button(按钮)继承自TextView,在Android开发中,Button是常用 ...

  3. 如何改变Android标准键的颜色?

    本文选自StackOverflow(简称:SOF)精选问答汇总系列文章之一,本系列文章将为读者分享国外最优质的精彩问与答,供读者学习和了解国外最新技术,本文为大家讲解如何改变Android标准键的颜色 ...

  4. Android Button点击效果(按钮背景变色、文字变色)

    一. 说明 Android Button的使用过程中,我们会需要为Button添加点击效果,不仅仅按钮的背景色需要变化,而且有时,我们连文字的颜色都希望变化,我们可以使用StateListDrawab ...

  5. Android TextView背景颜色与背景图片设置

    Android TextView 背景颜色与背景图片设置,android textview 控件,android textview 背景, android textview 图片,android te ...

  6. android 按钮特效 波纹 Android button effects ripple

    android 按钮特效 波纹 Android button effects ripple 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E- ...

  7. 我的Android进阶之旅------>android Button上面的英文字符串自动大写的问题解决

    今天碰到一个关于Button的问题:android Button上面的英文字符串会自动变成大写,运行的Android 5.1版本,如下图所示: 图1:Button 图2:TextView 这个Butt ...

  8. 003android初级篇之【转】Android开发中颜色的定义方法

    正好用到颜色的定义,但脑子里没有记住具体,转载一篇加强印象 1.使用Color类的常量,如: int color = Color.BLUE; // 创建一个蓝色 是使用Android提供的颜色 int ...

  9. Android(java)学习笔记106:Android设置文本颜色的4种方法

    1. Android设置文本颜色的4种方法: (1)利用系统自带的颜色类: tv.setTextColor(android.graphics.Color.RED); (2)数字颜色表示: tv.set ...

随机推荐

  1. 两个有序数组求中位数log(m+n)复杂度

    leetcode 第4题 中位数技巧: 对于长度为L的有序数组,它的中位数是(a[ceil((L+1)/2)]+a[floor((L+1)/2)])/2 算法原理: 类似三分法求极值 两个人都前进,谁 ...

  2. Pycharm中 import 引入同级文件失败问题

    Pycharm中 import 引入同级文件失败,如下所示:  “This inspection detects names that should resolve but don't. Due to ...

  3. Squid调试和故障处理

    http://blog.zhdata.com/tag/squid第16章 调试和故障处理 16.1 一些通用问题 在讨论通用debug前,我先提起一些经常发生的问题. 16.1.1 “Failed t ...

  4. UE 技巧

    http://cache.baiducontent.com/c?m=9d78d513d98416b8599d830e7c01a7170e2585744ddcc4523f8a9c12d522195646 ...

  5. Python学习笔记010——函数文档字符串

    函数文档字符串documentation string (docstring)是在函数开头,用来解释其接口的字符串.简而言之:帮助文档 包含函数的基础信息 包含函数的功能简介 包含每个形参的类型,使用 ...

  6. c#实现用SQL池(多线程),定时批量执行SQL语句

    在实际项目开发中,业务逻辑层的处理速度往往很快,特别是在开发Socket通信服务的时候,网络传输很快,但是一旦加上数据库操作,性能一落千丈,数据库操作的效率往往成为一个系统整体性能的瓶颈.面对这问题, ...

  7. android侧滑效果,SlidingMenu配置

    最近开始做点东西,需要用到android activity侧滑的效果.感觉配置起来还是有点小麻烦,总结一下以便回顾. 需要的东西: 1.SlidingMenu项目:点击打开链接 2.ActionBar ...

  8. 在ubuntu16.4中为pycharm创建桌面快捷启动方式

    在ubuntu环境中每次使用pycharm需要到它的安装目录中执行./pycharm.sh来启动pycharm.比较麻烦,既然ubuntu提供了桌面环境我们应该从分利用.哈哈哈... 上干货 我的py ...

  9. scrapy 的框架的安装

    1.简介: scrapy 是用python写成的一个web 爬虫框架,scrapy 会把大多数在爬取网站时的通用的事给自动化的做了:我最开始爬别人的网站的时候 用的是requests这个库,用这个库我 ...

  10. javascript Dictionary data structures

    Dictionary常被称为数据字典,是一种用来保存键值对的数据结构,比如我们日常的电话本,就是一个Dictionary.我们通过键(名字),就可以访问到对应的值(电话号码).在C++与java中我们 ...