zoukankan      html  css  js  c++  java
  • 第二阶段冲刺(九)

    今日任务:

    • 通过昨天反应出来的问题,开会进行讨论,制定任务卡。
    • 继续观察网友提出的问题,有利于后期的维护。

    增加删除代码:

    package com.yuukidach.ucount;

    import android.content.res.Resources;

    import org.litepal.crud.DataSupport;

    public class IOItem extends DataSupport {
    public final int TYPE_COST = -1;
    public final int TYPE_EARN = 1;

    private int id;
    private int type; // 收入还会支出
    private int mId;
    private double money;
    private String name;
    private String description;
    private String timeStamp;
    private String srcName; // 项目资源名称

    public IOItem () {}

    public IOItem(String srcName, String name) {
    this.srcName = srcName;
    this.name = name;
    }

    // 构造函数(无具体描述)
    public IOItem(String srcName, int type, double money, String name) {
    this.srcName = srcName;
    this.money = money;
    this.type = type;
    this.name = name;
    }

    // 构造函数(有具体描述)
    public IOItem(String srcName, int type, double money, String name, String description) {
    this.money = money;
    this.type = type;
    this.srcName = srcName;
    this.name = name;
    this.description = description;
    }

    public double getMoney() { return money; }
    public int getType() { return type; }
    public String getName() { return name; }
    public String getDescription() { return description; }
    public String getTimeStamp() { return timeStamp; }
    public int getmId() { return mId; }
    public String getSrcName() { return srcName; }
    public int getId() { return id; }

    // 设定属性
    public void setMoney(double money) { this.money = money; }
    public void setType(int type) { this.type = type; }
    public void setName(String name) { this.name = name; }
    public void setDescription(String description) { this.description = description; }
    public void setTimeStamp(String timeStamp) { this.timeStamp = timeStamp; }
    public void setmId(int mId) { this.mId = mId; }
    public void setSrcName(String srcName) { this.srcName = srcName; }

    // 返回图片资源的id
    public int getSrcId() {
    Resources resources = MainActivity.resources;
    return resources.getIdentifier(srcName, "drawable", MainActivity.PACKAGE_NAME);
    }
    }

  • 相关阅读:
    windowswindows/windowslinux间文件远程传输
    GNUstep ObjectC Ubuntu
    Linux日常问题处理集
    上网实用技巧
    ubuntu host VirtualBox xp guest networking
    平衡组/递归匹配
    Linux在线词典
    正则表达式的构造摘要
    Microsoft .NET Pet Shop 4 架构与技术分析
    ASP.net 2.0资料吐血收藏(^_^) (转)
  • 原文地址:https://www.cnblogs.com/mac-13/p/13084230.html
Copyright © 2011-2022 走看看