zoukankan      html  css  js  c++  java
  • android 开发学习2


    Dao dao = new Dao(yi_ji_lu_zhang_dan.this);
    List<GetOneRecord> list = dao.getAllRecord();
    //创建迭代器
    Iterator<GetOneRecord> iterator = list.iterator();

    while (iterator.hasNext()){
    GetOneRecord getOneRecord = iterator.next();//迭代器的使用方法
    Date date = new Date(getOneRecord.getTime());
    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//格式化时间
    String sdate = dateFormat.format(date);
    //格式化字符串
    str = String.format("%-3d ",getOneRecord.getMark()) + String.format("%-20s ",getOneRecord.getContent()) + String.format("%-8s ",getOneRecord.getAmount()) + getOneRecord.getTime();
    textView = new TextView();
    }
  • 相关阅读:
    _proto_和prototype的区别
    ajax
    图片预加载
    loading动画
    WinSCP
    检测竖屏 横屏
    webstrom hbuilder快捷键
    vue 引入sass
    npm install -save 和 -save-dev 区别
    打乱数组顺序
  • 原文地址:https://www.cnblogs.com/jiaoaoshirenjinbu/p/12349697.html
Copyright © 2011-2022 走看看