private void getDate(TextView tv){    Date d = new Date();    if(d.getHours()<11){        tv.setText("一 早上好 一");    }else if(d.getHours()<13){        tv.setText("一 中午好 一");    }else if(d.getHours()<18){        tv.setText("一 下午好 一");    }else if(d.getHours()<24){        tv.setText("一 晚上好 一");    }}

更多相关文章

  1. 解析JSON数组使用GSON从URL

随机推荐

  1. Android 获取手机屏幕大小两种方法
  2. android ViewPager学习笔记1
  3. android添加监听器
  4. Android(安卓)混淆打包
  5. Android WIFI,蓝牙,电池,背光,SD卡,摄像头,按键
  6. Android adb.exe程序启动不起来
  7. android Activity间List传值
  8. Android 消息通知栏Notification使用和权
  9. Android Property实现介绍
  10. 如何获得Android的System Bar’s Height