android 控件自定义样式
2016-07-15 10:44
316 查看
一、按钮(Button)方式1.存在.9图片或图片时可在drawable文件夹下新建xml文件style_button_one.xml,代码如下
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/login_active" /> <item android:drawable="@drawable/login" /> </selector> 方式二.自己动手画 http://blog.csdn.net/wswqiang/article/details/6616306 使用时在控件中使用 android:background="@drawable/style_button_one"
相关文章推荐
- Android 开发笔记
- android listview 异步加载图片并防止错位
- Android Studio获取控件ID
- Android 自定义控件玩转字体变色 打造炫酷ViewPager指示器
- Android编程入门--ViewPager引导页
- Android Studio一些控件的使用
- Android 屏蔽和捕获Home键的示例代码
- Android自动文本框输入识别提示功能代码
- has leaked window com.android.internal.policy.impl.PhoneWindow$ that was originally added here
- android中Baseadapter的 getItem 和 getItemId 的作用和重写
- 非常简单的Android打开和保存对话框功能
- Android两个ListView共用一个万能的BaseAdapter
- Android开发——遍历读写U盘、SD卡等外部存储
- Android开发——遍历读写U盘、SD卡等外部存储
- android中style详谈
- KJFrameForAndroid 资料——KJViewPager用法样例
- android studio 性能优化
- android自定义字体样式
- Android安卓开发知识库汇总
- 轻松实现Android语音识别功能