Xieshengqi %!s(int64=7) %!d(string=hace) años
padre
commit
8536a34d90

+ 37 - 0
app/build.gradle

@@ -49,6 +49,43 @@ android {
49 49
             proguardFiles 'proguard-rules.pro'
50 50
         }
51 51
     }
52
+    productFlavors {
53
+        yingyongbao {
54
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1001"]
55
+            buildConfigField 'String','CHANNLE','"1001"'
56
+        }
57
+
58
+        vivo {
59
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1002"]
60
+            buildConfigField 'String','CHANNLE','"1002"'
61
+        }
62
+
63
+        oppo {
64
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1003"]
65
+            buildConfigField 'String','CHANNLE','"1003"'
66
+        }
67
+
68
+        xiaomi {
69
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1005"]
70
+            buildConfigField 'String','CHANNLE','"1005"'
71
+        }
72
+
73
+        huawei {
74
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1004"]
75
+            buildConfigField 'String','CHANNLE','"1004"'
76
+        }
77
+
78
+        baidu {
79
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1006"]
80
+            buildConfigField 'String','CHANNLE','"1006"'
81
+        }
82
+
83
+        c360 {
84
+            manifestPlaceholders = [UMENG_CHANNEL_VALUE: "1000"]
85
+            buildConfigField 'String','CHANNLE','"1000"'
86
+        }
87
+
88
+    }
52 89
 }
53 90
 
54 91
 def releaseTime() {

+ 2 - 2
app/src/main/java/com/kuxuan/moneynote/common/Constant.java

@@ -9,8 +9,8 @@ public class Constant {
9 9
     //手机号正则,11位手机号
10 10
     public static final String REGEX_MOBILE = "[1][3,4,5,7,8][0-9]{9}$";
11 11
     //测试接口
12
-    public static final String BASE_URL = "http://bill.quyaqu.com/api/";
13
-//    public static final String BASE_URL = "http://api.money.quyaqu.com/api/";
12
+//    public static final String BASE_URL = "http://bill.quyaqu.com/api/";
13
+    public static final String BASE_URL = "http://api.money.quyaqu.com/api/";
14 14
     public static final String MD5 = "b4b80c2676828f1df375684100f56d48";
15 15
 
16 16
     public static class UserInfo{

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

@@ -171,6 +171,8 @@ public class AccountActivity extends MVPFragmentActivity<AccountPresenter, Accou
171 171
         }
172 172
         if (numNumber != null) {
173 173
             num.setText(numNumber);
174
+
175
+
174 176
         }
175 177
         //编辑页跳转过来用到
176 178
         isEdit = intent.getBooleanExtra(ISEDIT, false);

+ 14 - 5
app/src/main/java/com/kuxuan/moneynote/ui/weight/CaculatorLayout.java

@@ -129,11 +129,15 @@ public class CaculatorLayout extends LinearLayout implements View.OnClickListene
129 129
         this.sum =sum;
130 130
     }
131 131
 
132
+
133
+    public static void setNumText(String numText) {
134
+        CaculatorLayout.numText = numText;
135
+    }
136
+
132 137
     @Override
133 138
     public void onClick(View view) {
134 139
         switch (view.getId()) {
135 140
             case R.id.calculator_btn7:
136
-
137 141
                 if (canRecord(numText)) {
138 142
                     numText = numText + INPUT_7;
139 143
                     mNumText.setText(numText);
@@ -295,14 +299,19 @@ public class CaculatorLayout extends LinearLayout implements View.OnClickListene
295 299
                     mResultBtn.setText(COMPLETES);
296 300
                     return;
297 301
                 }
298
-                if(numText.substring(numText.length()-1,numText.length()).equals("+")||numText.substring(numText.length()-1,numText.length()).equals("-")){
299
-                    numText = numText.substring(0,numText.length()-1);
300
-                    mNumText.setText(numText);
301
-                    return;
302
+                try {
303
+                    if(numText.substring(numText.length()-1,numText.length()).equals("+")||numText.substring(numText.length()-1,numText.length()).equals("-")){
304
+                        numText = numText.substring(0,numText.length()-1);
305
+                        mNumText.setText(numText);
306
+                        return;
307
+                    }
308
+                }catch (Exception e){
309
+
302 310
                 }
303 311
                 numText = "";
304 312
                 sum.complete();
305 313
 
314
+
306 315
                 //计算结果
307 316
                 break;
308 317
             case R.id.calculator_add_btn:

+ 19 - 19
app/src/main/java/com/kuxuan/moneynote/ui/weight/LineChartView.java

@@ -241,25 +241,25 @@ public class LineChartView extends View {
241 241
         }
242 242
 
243 243
         //画平均线
244
-        axisPaint.setColor(Color.parseColor("#b4b4b4"));
245
-        axisPaint.setStrokeWidth(DisplayUtil.dip2px(1));
246
-        int count = (mXAxis.size() - 1) * mxInterval / mXuxianInterval;
247
-        for (int i = 0; i < count; i++) {
248
-            int lineWidth = mXuxianInterval;
249
-            int start = mLeftInterval + (lineWidth * 2) * i;
250
-            int end = start + lineWidth;
251
-            boolean isBreak = false;
252
-            if (end > (mXAxis.size() - 1) * mxInterval + mLeftInterval) {
253
-                end = (mXAxis.size() - 1) * mxInterval + mLeftInterval;
254
-                isBreak = true;
255
-            }
256
-            float h = (mHeight-mBottomInterval)-((mHeight - mBottomInterval) * average/maxYValue);
257
-            canvas.drawLine(start, h, end,
258
-                    h, axisPaint);
259
-            if (isBreak) {
260
-                break;
261
-            }
262
-        }
244
+//        axisPaint.setColor(Color.parseColor("#b4b4b4"));
245
+//        axisPaint.setStrokeWidth(DisplayUtil.dip2px(1));
246
+//        int count = (mXAxis.size() - 1) * mxInterval / mXuxianInterval;
247
+//        for (int i = 0; i < count; i++) {
248
+//            int lineWidth = mXuxianInterval;
249
+//            int start = mLeftInterval + (lineWidth * 2) * i;
250
+//            int end = start + lineWidth;
251
+//            boolean isBreak = false;
252
+//            if (end > (mXAxis.size() - 1) * mxInterval + mLeftInterval) {
253
+//                end = (mXAxis.size() - 1) * mxInterval + mLeftInterval;
254
+//                isBreak = true;
255
+//            }
256
+//            float h = (mHeight-mBottomInterval)-((mHeight - mBottomInterval) * average/maxYValue);
257
+//            canvas.drawLine(start, h, end,
258
+//                    h, axisPaint);
259
+//            if (isBreak) {
260
+//                break;
261
+//            }
262
+//        }
263 263
         // x轴的刻度集合
264 264
         int[] xPoints = new int[mXAxis.size()];
265 265
         for (int i = 0; i < mXAxis.size(); i++) {

+ 2 - 2
app/src/main/res/layout/item_find_layout.xml

@@ -7,9 +7,9 @@
7 7
 
8 8
     <ImageView
9 9
         android:id="@+id/item_find_imageView"
10
-        android:layout_width="40px"
10
+        android:layout_width="wrap_content"
11 11
         android:layout_gravity="center_horizontal"
12
-        android:layout_height="40px"
12
+        android:layout_height="wrap_content"
13 13
         />
14 14
 
15 15