• 第二阶段冲刺(九)


    今日任务:

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

    增加删除代码:

    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);
    }
    }

  • 相关阅读:
    利用艺术家的整数ID映射将标签转换为向量
    TOMCATserver不写port号、不写项目名訪问项目、虚拟文件夹配置
    一、奇妙插件Tampermonkey的简单安装教程
    三层登录—c#
    MapReduce中combine、partition、shuffle的作用是什么
    代码混淆防止APP被反编译指南
    数据分析思路的套路攻略
    聊一聊数据分析师这个职业
    Android优化之内存优化倒计时篇
    如何实现360度的手游安全防护?网易云易盾专家分享最新实践
  • 原文地址:https://www.cnblogs.com/mac-13/p/13084230.html
Copyright © 2020-2023  润新知