Browse Source

提交数据库

e 6 years ago
parent
commit
19b9476acf

+ 3 - 0
app/src/main/java/com/kuxuan/moneynote/ui/activitys/account/AccountActivity.java

208
         if (numNumber != null) {
208
         if (numNumber != null) {
209
             num.setText(numNumber);
209
             num.setText(numNumber);
210
             keybord.setNumText(numNumber);
210
             keybord.setNumText(numNumber);
211
+            keybord.setShowNumText(numNumber);
212
+            keybord.setCompleteNumtext(numNumber);
211
         }
213
         }
212
         //编辑页跳转过来用到
214
         //编辑页跳转过来用到
213
         isEdit = intent.getBooleanExtra(ISEDIT, false);
215
         isEdit = intent.getBooleanExtra(ISEDIT, false);
448
 
450
 
449
     @Override
451
     @Override
450
     public void complete() {
452
     public void complete() {
453
+
451
         if (COMPLETE.equals(mResult.getText())) {
454
         if (COMPLETE.equals(mResult.getText())) {
452
             if (isEdit) {
455
             if (isEdit) {
453
                 if (category_id.equals("0")) {
456
                 if (category_id.equals("0")) {

+ 18 - 0
app/src/main/java/com/kuxuan/moneynote/ui/weight/CaculatorLayout.java

144
         this.beizhu.setText(beizhu);
144
         this.beizhu.setText(beizhu);
145
     }
145
     }
146
 
146
 
147
+    public void setShowNumText(String shownumtext){
148
+        this.shownumtext = shownumtext;
149
+    }
150
+
151
+    public void setCompleteNumtext(String completenumtext){
152
+        this.completenumtext = completenumtext;
153
+    }
154
+
155
+
147
 
156
 
148
     @Override
157
     @Override
149
     public void onClick(View view) {
158
     public void onClick(View view) {
274
                     }
283
                     }
275
 
284
 
276
                 }else {
285
                 }else {
286
+
287
+                    String sumStr = mNumText.getText().toString().trim();
288
+                    double sumDouble = Double.parseDouble(sumStr);
289
+                    if(sumDouble==0){
290
+                        return;
291
+                    }
277
                     sum.complete();
292
                     sum.complete();
293
+
278
                 }
294
                 }
279
                 return;
295
                 return;
280
             case R.id.calculator_add_btn:
296
             case R.id.calculator_add_btn:
333
         }
349
         }
334
 
350
 
335
 
351
 
352
+        System.out.println(all);
353
+
336
         if(!all.endsWith(INPUT_ADD)&&!all.endsWith(INPUT_SUB)){
354
         if(!all.endsWith(INPUT_ADD)&&!all.endsWith(INPUT_SUB)){
337
             all = all.substring(0,all.length() - 1);
355
             all = all.substring(0,all.length() - 1);
338
 
356