随语

来源:互联网 发布:网络叫萝卜什么意思啊 编辑:程序博客网 时间:2024/06/05 07:55
1、Time.mills(true);作用
Time current=new Time();current.setToNow();long saved=current.mills(true);Time anotherTime=new Time();anotherTime.set(saved);

可以看出来了吧,基本就是存储或者作为中间值用的,要说找到时间转化long的规则还真没找到


2、去掉RadioButton,CheckBox自带的图标方法:android:button="@null"


3、在R文件中找到id,但是在java代码中却显示R.XX.XX错误,原因很可能是导入R文件错误,你可能导入的是android.R,正确的应该是你的工程名ProjectName.R


4、使用switch+枚举enum类型时出错

  

public enum Relation{friends,enemy}public void doSomething(Relation one){    switch(one){        case friends://-------->r如果使用case:Relation.friends则会出错,             break;        case enemy:             break;    }}
查阅资料,大概是说从java1.5开始对enum进行switch选择必选选项为无限制模式

0 0
原创粉丝点击