步骤:
1.在values文件夹下的strings.xml文件里添加颜色:比如
#ccc
2.如果你直接这样写:
tv.setTextColor(R.color.ccc);
理论上是不行的,不过我发现有时行,有时不行。
正确的写法应该是:
tv.setTextColor(this.getResources().getColor(R.color.ccc));ok!
所以在java代码...
分类:
移动开发 时间:
2014-09-03 13:10:46
阅读次数:
164
INSERT INTO configuration VALUES (NULL, 'Home Title', 'HOME_TITLE', 'Home Title 后台-基本设置里面修改', '', '1', '1', NULL, '0001-01-01 00:00:00', NULL, NULL);I...
分类:
其他好文 时间:
2014-09-03 13:00:06
阅读次数:
191
1.获取url中controller和action第一种: 获取controller名称:ViewContext.RouteData.Values["controller"] 获取action名称:ViewContext.RouteData.Values["action"]第二种: ViewCont...
分类:
其他好文 时间:
2014-09-03 12:44:06
阅读次数:
172
问题描述
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recur...
分类:
其他好文 时间:
2014-09-02 21:23:55
阅读次数:
317
1、自己定义View的属性2、在View的构造方法中获得我们自己定义的属性3、重写onMesure 4、重写onDraw3这个步骤不是必须,当然了大部分情况下还是须要重写的。1、自己定义View的属性,首先在res/values/ 下建立一个attrs.xml , 在里面定义我们的属性和声明我们的整...
分类:
移动开发 时间:
2014-09-02 21:15:45
阅读次数:
287
问题描述
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recurs...
分类:
其他好文 时间:
2014-09-02 17:50:45
阅读次数:
136
01 插入数据 INSERT INSERT INTO `table_name` ( `column01_name` , `column02_name` , ... ) VALUES ( value01 , value02 , ...) 02 查询数据 SELECT SELECT *...
分类:
数据库 时间:
2014-09-02 15:40:54
阅读次数:
198
Intra-thread semantics(线程内语义):
The memory model determines what values can be read at every point in the program. The actions of each thread in isolation must behave as governed by the se...
分类:
其他好文 时间:
2014-09-02 14:14:25
阅读次数:
493
关于黑屏默认的情况下,程序启动时,会有一个黑屏的时期,原因是,首个activity会加载一些数据,比如初始化列表数据等.去除步骤1./res/values/styles.xml 在 Theme 中,添加一个 android:windowBackgrounds 属性,设置需要的图片2.在 Androi...
分类:
移动开发 时间:
2014-09-02 12:05:24
阅读次数:
213
首先,看下效果图,以护照为例然后选中护照后可以看到 字体由黑色变成了白色下面说下实现方法。首先 在values文件夹下的color.xml文件中加入标签的颜色然后在drawable文件夹下新建xml文件,输入内容。如果要写true事件TextColor变色,那一定还要写上当false的时候TextC...
分类:
移动开发 时间:
2014-09-02 10:16:44
阅读次数:
485