nullPointerException当我尝试从响应中将数据设置为文本视图时,我JSON正在接受改造。我想将总销售额、总费用和总购买值设置为 textviews:tv_total_purchase_today、tv_total_sale_today、tv_total_expense_today
我应该在 setsaleInformations 方法中添加什么?
这是我的代码: API 响应
public class DashboardResponse extends CommonResponse {
@Expose
@SerializedName("graph_data")
private ArrayList<Graph> graph_data;
@Expose
@SerializedName("total_sale")
private String total_sale;
@Expose
@SerializedName("total_purchase")
private String total_purchase;
@Expose
@SerializedName("total_expense")
private String total_expense;
public ArrayList<Graph> getGraph_data() {
return graph_data;
}
public void setGraph_data(ArrayList<Graph> graph_data) {
this.graph_data = graph_data;
}
public String getTotal_sale() {
return total_sale;
}
public void setTotal_sale(String total_sale) {
this.total_sale = total_sale;
}
public String getTotal_purchase() {
return total_purchase;
}
public void setTotal_purchase(String total_purchase) {
this.total_purchase = total_purchase;
}
public String getTotal_expense() {
return total_expense;
}
public void setTotal_expense(String total_expense) {
this.total_expense = total_expense;
}
}
慕姐4208626
相关分类