Android开发与实践第19章 综合案例—家庭理财通.pptVIP

  • 16
  • 0
  • 约2.99万字
  • 约 79页
  • 2020-04-30 发布于辽宁
  • 举报

Android开发与实践第19章 综合案例—家庭理财通.ppt

填写完信息后,单击“保存”按钮,为该按钮设置监听事件,在监听事件中,使用InaccountDAO对象的add方法将用户的输入保存到收入信息表中,代码如下: btnInSaveButton.setOnClickListener(new OnClickListener() { //为保存按钮设置监听事件 @Override public void onClick(View arg0) { // TODO Auto-generated method stub String strInMoney= txtInMoney.getText().toString(); //获取金额文本框的值 if(!strInMoney.isEmpty()){ //判断金额不为空 //创建InaccountDAO对象 InaccountDAO inaccountDAO=new InaccountDAO(AddInaccount.this); Tb_inaccount tb_inaccount=new Tb_inaccount(inaccountDAO.getMaxId()+1, Double.parseDouble(strInMoney), txtInTime.getText().toString(), spInType.getSelectedItem().

文档评论(0)

1亿VIP精品文档

相关文档