mIsFunui-判断Funui方法
1.有时候我们根据自己的需要,修改了frameword下的代码,但是,我们又不希望影响第三方,这时候我们就可以在修改处添加一个我们自己的标志位,如,mIsFunui
它是定义在我们自定义的theme里面的,如下
<style name="Theme.Funui" parent="Theme.Holo.Light">
<item name="isFunui">true</item>
<item name="colorForeground">@android:color/bright_foreground_funui</item>
<item name="colorForegroundInverse">@android:color/bright_foreground_funui_inverse</item>
<item name="colorBackground">@android:color/background_funui</item>
<item name="colorBackgroundCacheHint">@android:drawable/background_cache_hint_selector_funui</item>
<item name="disabledAlpha">0.5</item>
<item name="backgroundDimAmount">0.6</item>
</style>
我们在代码中读取这条属性就可以了,如下
import android.content.res.TypedArray; private boolean mIsFunui; TypedArray styledAttributes = mContext.obtainStyledAttributes(
com.android.internal.R.styleable.Theme);
mIsFunui = styledAttributes.getBoolean(com.android.internal.R.styleable.Theme_isFunui, false);
styledAttributes.recycle();
if (mIsFunui) {
mMaxIconSize += 3;
}
mIsFunui-判断Funui方法的更多相关文章
- MYSQL中可以实现类似IF判断的方法
MYSQL中可以实现类似IF判断的方法 新建一张客户表,如下:sex:1-男,2-女,3-未知:level是客户的级别:1-超级VIP客户,2-VIP客户,3-普通客户 方式一:case函数:流程控制 ...
- atitit.判断时间重叠方法总结 java c++ c#.net js php
atitit.判断时间重叠方法总结 java c++ c#.net js php 1. 判断时间重叠具体流程思路 1 2. 重叠算法 实际上就是日期集合跟个时间集合的的交集(乘法算法) 1 3. 代 ...
- WPF 判断调用方法堆栈
原文:WPF 判断调用方法堆栈 版权声明:博客已迁移到 http://lindexi.gitee.io 欢迎访问.如果当前博客图片看不到,请到 http://lindexi.gitee.io 访问博客 ...
- throw关键字和Objects非空判断_requireNonNull方法
作用: 可以使用throw关键字在指定的方法中抛出指定的异常 使用格式: throw new xxxException("异常产生的原因") 注意: 1.throw关键字必须写在方 ...
- Java 判断整数方法
今天写代码的时候突然想到要怎么来判断整数,然后通过判断是否是整数来处理相关的操作.开始想到了几个方法,比如百度到的 x(int) instanceof Integer,但是这样的话程序会报错,还有一个 ...
- 一个被称为世界上最短的判断IE方法
最近偶然看到一段判断是否为IE浏览器的代码: if(!+[1,]) { console.info("IE 浏览器"); } else { console.info("非 ...
- js判断类型方法
在JavaScript中,有5种基本数据类型和1种复杂数据类型,基本数据类型有:Undefined, Null,Boolean, Number和String:复杂数据类型是Object,Object中 ...
- Jquery / js 判断数据类型方法(限制文本框类型输入)
当想要判断文本框中的值是否为自己想要的类型时,可以通过一些方法作出判断,这里对于光标离开文本框时判断文本框中输入的是否是数值类型,如果不是,做出提示 $("#WORKYEARS") ...
- Zepto 添加手势判断拓展方法(思路+原理)
一.前言 这几个月事情比较多,写了一些博客都没有来得及整理发布,今天刚好有一位同事在开发前端页面的时候用到了手势判断.所以翻出了之前写的 demo,顺便整理一下作为记录. 手势判断在各种应用中都十分常 ...
- 判断某个方法是否存在,解析php函数function_exists (),method_exists()与is_callable()的区别
php函数function_exists (),method_exists() 与is_callable()的区别在哪? 先来讲下后两个:method_exists() 与is_callable(): ...
随机推荐
- Gym - 100625G Getting Through 计算几何+并查集
http://codeforces.com/gym/100625/attachments/download/3213/2013-benelux-algorithm-programming-contes ...
- PHP定时执行任务
ignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行. set_time_limit(0);// 通过set_time_limit(0)可以让程序无限制的执行下去 $int ...
- vue踩坑-This relative module was not found
在使用vue.js的日期选择插件 的时候,报错如下 This relative module was not found: * ../calendar.vue in ./node_modules/ba ...
- IDEA 开发工具在POM.XML文件中增加依赖
在POM.XML 中使用快捷键 ALT+INSERT 选择第一个,输入关键字即可 选择版本,确认,ok
- CodeForcesGym 100502K Train Passengers
Train Passengers Time Limit: 1000ms Memory Limit: 524288KB This problem will be judged on CodeForces ...
- qt hex to dec
QString s = "32FE12AD"; quint8 u8vlaue = 0; sscanf(s.toStdString().c_str(), ...
- 认识 Atlassian Datacenter 产品
认识 Atlassian Datacenter 产品 云端原本就是群集化的架构,Atlassian 系列产品.应用的开发团队相当广范且行之有年,可是将应用程序作为节点(比方Jira,confluenc ...
- POJ 3049 DFS
思路:暴搜 //By SiriusRen #include <cstdio> #include <iostream> #include <algorithm> us ...
- c#中 xml和json 互相转换
--xml转json XmlDocument doc = new XmlDocument(); doc.LoadXml(result); string json = Newtonsoft.Json.J ...
- 小程序中关于获取app实例与当前组件
1.getApp()来获取 App 实例 2.getCurrentPages()获取前页面栈