一、
1、通过反射来获取系统字体并替换
import java.lang.reflect.Field;
import android.content.Context;
import android.graphics.Typeface;
public final class FontsOverride {
public static void setDefaultFont(Con...
分类:
移动开发 时间:
2015-02-08 18:15:14
阅读次数:
189
SharedPreferences共享数据的相同Context本文地址: http://blog.csdn.net/caroline_wendy使用SharedPreferences,可以存储和共享数据,需要使用相同的Context和TAG。在设置(put)数据的部分,提供public的TAG;在查询(get)数据的部分,使用该class的TAG;设置:public static final St...
分类:
移动开发 时间:
2015-02-08 00:32:28
阅读次数:
245
Error: Attribute value must be constant本文地址:http://blog.csdn.net/caroline_wendyAttribute value must be constant. 属性的值必须要是Constant. 如,在Annotation的接口中的值,但是字符串数组不能指定为Constant,Java中static final。只能把纯字符设置为C...
分类:
编程语言 时间:
2015-02-08 00:29:25
阅读次数:
352
接口的属性必须是public static final Type接口的方法必须是public abstract Type不管你是全写,或只写部分,系统都会自动按上面的要求不全也就是说 接口中 所有的属性 都是 只能是 静态的常量 接口中 所有的方法都是 只能是 抽象方法
分类:
编程语言 时间:
2015-02-07 22:55:17
阅读次数:
207
跟static一样,都是为了实现一些特殊要求而增加的,有别于普通变量的修饰关键字。1.final是最终的意思,所以有不能修改的意思在里面 所以 1.1. 被final修饰的类不能被继承(被断子绝孙了) 1.2.被final修饰的方法不能被重写(也是不能改了) 1.3.被final修饰的变量,只能被....
分类:
编程语言 时间:
2015-02-07 22:52:24
阅读次数:
167
package com.annotion.demo; import java.io.*; public class MyEclipseGen { ?? ?private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement...
分类:
系统相关 时间:
2015-02-07 16:02:13
阅读次数:
158
java.lang 类 Integerjava.lang.Object java.lang.Number java.lang.Integer全部已实现的接口: Serializable, Comparable public final class Integerextends Number...
分类:
编程语言 时间:
2015-02-07 14:31:14
阅读次数:
162
1.模拟java View类:
package com.test;
/**
* Created by dandan on 15-2-7.
*/
public class View {
/**设置默认ID**/
public static final int NO_ID = -1;
/**设置每个控件的ID用于被子类覆盖**/
public int...
分类:
移动开发 时间:
2015-02-07 13:12:49
阅读次数:
181
可能是jboss的服务器版本选择不对,比如我本地的Jboss服务器版本是 jboss-as-web-7.0.2.Final,选择的服务器版本是JBOOS V7.1 Runtime,就会报上面那个错误。如果创建服务器时的版本选择的服务器版本是JBOOS V7.0 Runtime,就不会报上面这个错误。
分类:
编程语言 时间:
2015-02-06 21:42:14
阅读次数:
279
一.String1.String:字符串常量,字符串长度不可变。Java中String是immutable(不可变)的.String类是被final修饰2.String str="hello world"和String str=new String("hello world")的区别publiccl...
分类:
编程语言 时间:
2015-02-06 18:23:55
阅读次数:
108