瀏覽代碼

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/res/layout/fragment_mine.xml
Xieshengqi 7 年之前
父節點
當前提交
1cefaae0af

+ 1 - 1
app/src/main/java/com/kuxuan/moneynote/ui/activitys/AboutActivity.java

@@ -53,7 +53,7 @@ public class AboutActivity extends BaseActivity {
53 53
         TextView textView = (TextView) findViewById(R.id.version);
54 54
         String versionName = getVersionName(this);
55 55
         textView.setText(versionName);
56
-        Glide.with(this).load(R.mipmap.icon_logo).transform(new GlideRoundTransform(this, 16)).into(imageView);
56
+        Glide.with(this).load(R.mipmap.icon_logo).transform(new GlideRoundTransform(this, 10)).into(imageView);
57 57
     }
58 58
 
59 59
     /**

+ 2 - 0
app/src/main/java/com/kuxuan/moneynote/ui/adapter/BillAdapter.java

@@ -24,4 +24,6 @@ public class BillAdapter extends BaseQuickAdapter<BillJsonList,BillHolder> {
24 24
         TextSetUtil.setTextForMoey(item.getPay(),(TextView)helper.getView(R.id.stock_list_header_last_lixi),18,12);
25 25
         TextSetUtil.setTextForMoey(item.getBalance(),(TextView)helper.getView(R.id.stock_list_header_price_change),18,12);
26 26
     }
27
+
28
+
27 29
 }

+ 2 - 0
app/src/main/java/com/kuxuan/moneynote/ui/fragments/mine/MineFragment.java

@@ -182,6 +182,8 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
182 182
        mPresenter.getMineData();
183 183
        mPresenter.getMineBill(year);
184 184
 
185
+
186
+
185 187
     }
186 188
 
187 189
     @OnClick(R.id.bill_lin)

+ 42 - 0
app/src/main/java/com/kuxuan/moneynote/ui/weight/MyTextView.java

@@ -0,0 +1,42 @@
1
+package com.kuxuan.moneynote.ui.weight;
2
+
3
+import android.content.Context;
4
+import android.graphics.Canvas;
5
+import android.support.annotation.Nullable;
6
+import android.text.SpannableStringBuilder;
7
+import android.util.AttributeSet;
8
+import android.widget.TextView;
9
+
10
+/**
11
+ * @author HFRX hfrx1314@qq.com
12
+ * @version 1.0.0
13
+ */
14
+public class MyTextView extends TextView {
15
+    public MyTextView(Context context) {
16
+        super(context);
17
+    }
18
+
19
+    public MyTextView(Context context, @Nullable AttributeSet attrs) {
20
+        super(context, attrs);
21
+    }
22
+
23
+    public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
24
+        super(context, attrs, defStyleAttr);
25
+    }
26
+
27
+
28
+    /**
29
+     * 注意:spannableString 设置Spannable 的对象到spannableString中时,要用Spannable.SPAN_EXCLUSIVE_EXCLUSIVE的flag值,不然可能会会出现后面的衔接字符串不会显示
30
+     */
31
+    @Override
32
+    protected void onDraw(Canvas canvas) {
33
+        CharSequence charSequence = getText() ;
34
+        int lastCharDown = getLayout().getLineVisibleEnd(0) ;
35
+        if (charSequence.length() > lastCharDown){
36
+            SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder() ;
37
+            spannableStringBuilder.append(charSequence.subSequence(0,lastCharDown-2)).append("...") ;
38
+            setText(spannableStringBuilder);
39
+        }
40
+        super.onDraw(canvas);
41
+    }
42
+}

+ 1 - 1
app/src/main/java/com/kuxuan/moneynote/utils/PickerUtil.java

@@ -52,7 +52,7 @@ public class PickerUtil {
52 52
         picker.setHeight(picker.getScreenHeightPixels()/2-250);
53 53
         picker.setRangeStart(2010, 10, 14);
54 54
         picker.setTitleText(mTitle);
55
-        picker.setRangeEnd(2020, 11, 11);
55
+        picker.setRangeEnd(mYear, mMonth, mDay);
56 56
         picker.setSelectedItem(mYear, mMonth,mDay);
57 57
         picker.setWeightEnable(true);
58 58
         picker.setWheelModeEnable(true);

二進制
app/src/main/res/drawable-xhdpi/bottom_chart_pressed.png


二進制
app/src/main/res/drawable-xxhdpi/bottom_chart_pressed.png


+ 18 - 17
app/src/main/res/layout/activity_bill.xml

@@ -12,11 +12,11 @@
12 12
         android:textSize="@dimen/font_12"
13 13
         android:layout_height="wrap_content"
14 14
         android:text="结余"/>
15
-   <TextView
15
+   <com.kuxuan.moneynote.ui.weight.MyTextView
16 16
        android:layout_width="wrap_content"
17 17
        android:id="@+id/balance_text"
18 18
        android:ellipsize="end"
19
-       android:lines="1"
19
+       android:maxLines="1"
20 20
        android:layout_height="wrap_content"
21 21
        android:text="11111.0000"
22 22
        />
@@ -25,11 +25,13 @@
25 25
         android:layout_marginTop="@dimen/len_8"
26 26
         android:layout_width="match_parent"
27 27
         android:orientation="horizontal"
28
-        android:layout_marginStart="@dimen/len_48"
29
-        android:layout_marginEnd="@dimen/len_48"
30 28
         android:paddingBottom="@dimen/len_16"
31 29
         android:layout_height="wrap_content">
32
-
30
+        <LinearLayout
31
+            android:layout_width="0dp"
32
+            android:layout_weight="1"
33
+            android:gravity="center"
34
+            android:layout_height="wrap_content">
33 35
         <TextView
34 36
         android:layout_width="wrap_content"
35 37
         android:textSize="@dimen/font_12"
@@ -37,28 +39,26 @@
37 39
         android:layout_marginEnd="@dimen/len_8"
38 40
         android:text="收入"
39 41
         />
40
-        <TextView
42
+        <com.kuxuan.moneynote.ui.weight.MyTextView
41 43
             android:layout_width="wrap_content"
42 44
             android:layout_height="wrap_content"
43 45
             android:id="@+id/income_text"
44 46
             android:ellipsize="end"
45
-            android:lines="1"
47
+            android:maxLines="1"
46 48
             android:text="5000.00"
47 49
             />
48
-        <Space
49
-            android:layout_width="0dp"
50
-            android:layout_height="wrap_content"
51
-            android:layout_weight="1"/>
50
+        </LinearLayout>
52 51
         <View
53 52
             android:layout_width="1px"
54 53
             android:layout_height="match_parent"
55 54
             android:background="@color/first_text"
56 55
             android:layout_gravity="center"
57 56
             />
58
-        <Space
59
-            android:layout_width="0dp"
60
-            android:layout_height="wrap_content"
61
-            android:layout_weight="1"/>
57
+     <LinearLayout
58
+         android:layout_width="0dp"
59
+         android:layout_weight="1"
60
+         android:gravity="center"
61
+         android:layout_height="wrap_content">
62 62
         <TextView
63 63
             android:layout_width="wrap_content"
64 64
             android:layout_height="wrap_content"
@@ -66,14 +66,15 @@
66 66
             android:layout_marginEnd="@dimen/len_8"
67 67
             android:text="支出"
68 68
             />
69
-        <TextView
69
+        <com.kuxuan.moneynote.ui.weight.MyTextView
70 70
             android:layout_width="wrap_content"
71 71
             android:id="@+id/pay_text"
72 72
             android:ellipsize="end"
73
-            android:lines="1"
73
+            android:maxLines="1"
74 74
             android:layout_height="wrap_content"
75 75
             android:text="7710.00"
76 76
             />
77
+     </LinearLayout>
77 78
     </LinearLayout>
78 79
     <include layout="@layout/item_billl_layout"></include>
79 80
 <android.support.v7.widget.RecyclerView

+ 12 - 11
app/src/main/res/layout/fragment_mine.xml

@@ -1,5 +1,4 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2
-
3 2
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
4 3
     android:layout_width="match_parent"
5 4
     android:layout_height="wrap_content"
@@ -16,7 +15,7 @@
16 15
             android:layout_width="match_parent"
17 16
             android:layout_height="wrap_content"
18 17
             android:background="@color/bg_title_gray"
19
-            android:gravity="center"
18
+            android:gravity="center_horizontal"
20 19
             android:orientation="vertical"
21 20
             android:paddingBottom="@dimen/len_20"
22 21
             android:paddingTop="@dimen/len_48">
@@ -136,6 +135,9 @@
136 135
                         android:layout_width="wrap_content"
137 136
                         android:layout_height="wrap_content"
138 137
                         android:layout_marginStart="@dimen/len_16"
138
+                        android:lines="1"
139
+                        android:ellipsize="end"
140
+                        android:maxEms="18"
139 141
                         android:textColor="@color/first_text"
140 142
                         android:textSize="@dimen/len_20" />
141 143
 
@@ -146,35 +148,34 @@
146 148
                         android:layout_marginStart="@dimen/len_8"
147 149
                         android:background="@color/first_text" />
148 150
 
149
-                    <TextView
151
+                    <com.kuxuan.moneynote.ui.weight.MyTextView
150 152
                         android:id="@+id/income_text"
151 153
                         android:layout_width="0dp"
152 154
                         android:layout_height="wrap_content"
153 155
                         android:layout_weight="1"
156
+                        android:maxLines="1"
154 157
                         android:gravity="center_horizontal"
155
-                        android:lines="1"
156
-                        android:text="23213213123213213213213"
158
+                        android:ellipsize="end"
157 159
                         android:textColor="@color/first_text" />
158 160
 
159
-                    <TextView
161
+                    <com.kuxuan.moneynote.ui.weight.MyTextView
160 162
                         android:id="@+id/pay_text"
161 163
                         android:layout_width="0dp"
162 164
                         android:layout_height="wrap_content"
163 165
                         android:layout_weight="1"
166
+                        android:maxLines="1"
164 167
                         android:gravity="center_horizontal"
165
-                        android:singleLine="true"
166 168
                         android:ellipsize="end"
167
-                        android:text="23213213123213213213213"
168 169
                         android:textColor="@color/first_text" />
169 170
 
170
-                    <TextView
171
+                    <com.kuxuan.moneynote.ui.weight.MyTextView
171 172
                         android:id="@+id/balance_text"
172 173
                         android:layout_width="0dp"
173 174
                         android:layout_height="wrap_content"
174 175
                         android:layout_weight="1"
176
+                        android:ellipsize="end"
177
+                        android:maxLines="1"
175 178
                         android:gravity="center_horizontal"
176
-                        android:lines="1"
177
-                        android:text="23213213123213213213213"
178 179
                         android:textColor="@color/first_text" />
179 180
                 </LinearLayout>
180 181
 

+ 7 - 7
app/src/main/res/layout/item_billl_layout.xml

@@ -18,7 +18,7 @@
18 18
                 android:text="月份"
19 19
                 android:layout_width="0dp"
20 20
                 android:ellipsize="end"
21
-                android:lines="1"
21
+                android:singleLine="true"
22 22
                 android:layout_weight="14"
23 23
                 android:textColor="@color/first_text"
24 24
                 android:layout_height="wrap_content"
@@ -26,39 +26,39 @@
26 26
                 android:padding="2dip"
27 27
                 />
28 28
 
29
-            <TextView
29
+            <com.kuxuan.moneynote.ui.weight.MyTextView
30 30
                 android:id="@+id/stock_list_header_price"
31 31
                 android:text="收入"
32 32
                 android:layout_width="0dp"
33 33
                 android:textColor="@color/first_text"
34 34
                 android:layout_weight="28"
35 35
                 android:ellipsize="end"
36
-                android:lines="1"
36
+                android:maxLines="1"
37 37
                 android:layout_height="wrap_content"
38 38
                 android:gravity="center"
39 39
                 android:padding="2dip"
40 40
                 />
41 41
 
42
-            <TextView
42
+            <com.kuxuan.moneynote.ui.weight.MyTextView
43 43
                 android:id="@+id/stock_list_header_last_lixi"
44 44
                 android:text="支出"
45 45
                 android:layout_width="0dp"
46 46
                 android:layout_weight="28"
47 47
                 android:ellipsize="end"
48
-                android:lines="1"
48
+                android:maxLines="1"
49 49
                 android:textColor="@color/first_text"
50 50
                 android:layout_height="wrap_content"
51 51
                 android:gravity="center"
52 52
                 android:padding="2dip"
53 53
                 />
54 54
 
55
-            <TextView
55
+            <com.kuxuan.moneynote.ui.weight.MyTextView
56 56
                 android:id="@+id/stock_list_header_price_change"
57 57
                 android:text="结余"
58
+                android:maxLines="1"
58 59
                 android:layout_width="0dp"
59 60
                 android:layout_weight="28"
60 61
                 android:ellipsize="end"
61
-                android:lines="1"
62 62
                 android:textColor="@color/first_text"
63 63
                 android:layout_height="wrap_content"
64 64
                 android:gravity="center"

+ 8 - 8
app/src/main/res/layout/layout_navigation.xml

@@ -32,8 +32,8 @@
32 32
 
33 33
             <ImageView
34 34
                 android:id="@+id/tab_mingxi_img"
35
-                android:layout_width="28dp"
36
-                android:layout_height="28dp"
35
+                android:layout_width="wrap_content"
36
+                android:layout_height="wrap_content"
37 37
                 android:layout_gravity="top|center"
38 38
                 android:layout_marginTop="5dp"
39 39
                 android:src="@mipmap/ic_launcher"/>
@@ -57,8 +57,8 @@
57 57
 
58 58
             <ImageView
59 59
                 android:id="@+id/tab_baobiao_img"
60
-                android:layout_width="28dp"
61
-                android:layout_height="28dp"
60
+                android:layout_width="wrap_content"
61
+                android:layout_height="wrap_content"
62 62
                 android:layout_gravity="top|center"
63 63
                 android:layout_marginTop="5dp"
64 64
                 android:src="@mipmap/ic_launcher"/>
@@ -87,8 +87,8 @@
87 87
 
88 88
             <ImageView
89 89
                 android:id="@+id/tab_faxian_img"
90
-                android:layout_width="27dp"
91
-                android:layout_height="27dp"
90
+                android:layout_width="wrap_content"
91
+                android:layout_height="wrap_content"
92 92
                 android:layout_gravity="top|center"
93 93
                 android:layout_marginTop="5dp"
94 94
                 android:src="@mipmap/ic_launcher"/>
@@ -111,8 +111,8 @@
111 111
 
112 112
             <ImageView
113 113
                 android:id="@+id/tab_user_img"
114
-                android:layout_width="27dp"
115
-                android:layout_height="27dp"
114
+                android:layout_width="wrap_content"
115
+                android:layout_height="wrap_content"
116 116
                 android:layout_gravity="top|center"
117 117
                 android:layout_marginTop="5dp"
118 118
                 android:src="@mipmap/ic_launcher"/>

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -77,7 +77,7 @@
77 77
 
78 78
 
79 79
     <!--关于我们-->
80
-    <string name="about">财务自由就上钱多多随手记</string>
80
+    <string name="about">钱多多随手记</string>
81 81
 
82 82
 
83 83
     <!--修改密码-->