Просмотр исходного кода

订单详情红包提示添加完成

huyuguo лет назад: 5
Родитель
Сommit
3475dc3e74

+ 5 - 0
app/src/main/java/com/electric/chargingpile/activity/OderDetailsActivity.java

@ -62,6 +62,7 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
62 62
    private RatingBarView ratingBarView;
63 63
    private LinearLayout ll_order;
64 64
    private TextView tv_gocomment;
65
    private LinearLayout red_paper_bag_bottom;
65 66
    private RelativeLayout rl_end_info;
66 67
    private String name;
67 68
@ -85,6 +86,7 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
85 86
        et_pinglun = (EditText) findViewById(R.id.et_pinglun);
86 87
        tv_pinglun = (TextView) findViewById(R.id.tv_pinglun);
87 88
        tv_gocomment = (TextView) findViewById(R.id.tv_gocomment);
89
        red_paper_bag_bottom = findViewById(R.id.red_paper_bag_bottom);
88 90
        iv = (ImageView) findViewById(R.id.iv);
89 91
90 92
        tv_gocomment.setOnClickListener(this);
@ -279,6 +281,9 @@ public class OderDetailsActivity extends Activity implements View.OnClickListene
279 281
                            String is_share = JsonUtils.getKeyResult(data, "is_share");
280 282
                            if (EmptyUtils.isNotEmpty(data) && is_share.equals("1")) {
281 283
                                tv_gocomment.setText("发表评论领红包");
284
                                red_paper_bag_bottom.setVisibility(View.VISIBLE);
285
                            } else {
286
                                red_paper_bag_bottom.setVisibility(View.GONE);
282 287
                            }
283 288
                            String is_print = JsonUtils.getKeyResult(data, "is_print");
284 289
                            if (EmptyUtils.isNotEmpty(data) && is_print.equals("1")) {

+ 11 - 0
app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java

@ -226,6 +226,7 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
226 226
     * See https://g.co/AppIndexing/AndroidStudio for more information.
227 227
     */
228 228
    private GoogleApiClient client;
229
    private ImageView chat_share_bar;
229 230
230 231
    //把一个url的网络图片变成一个本地的BitMap
231 232
    public Bitmap returnBitMap(final String url) {
@ -418,6 +419,10 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
418 419
        rl_offline_upload = (RelativeLayout) findViewById(R.id.rl_offline_upload);
419 420
        rl_offline_upload.setOnClickListener(this);
420 421
422
        chat_share_bar = findViewById(R.id.chat_share_bar);
423
        chat_share_bar.setOnClickListener(this);
424
425
421 426
        rl_chongzhi = (RelativeLayout) findViewById(R.id.rl_chongzhi);
422 427
        rl_chongzhi.setOnClickListener(this);
423 428
@ -991,6 +996,12 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
991 996
                MobclickAgent.onEvent(getApplicationContext(), "0816");
992 997
                break;
993 998
999
            case R.id.chat_share_bar: // 聊聊入口
1000
                Intent i = new Intent(getApplicationContext(), ChatActivity.class);//聊聊页面
1001
                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1002
                startActivity(i);
1003
                break;
1004
994 1005
995 1006
            case R.id.iv_usermore:
996 1007
                startActivity(new Intent(getApplication(), UserCenterMoreActivity.class));

BIN
app/src/main/res/drawable-hdpi/red_pager_bag_bg.9.png


+ 86 - 60
app/src/main/res/layout/activity_oder_details.xml

@ -1,9 +1,9 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3 4
    xmlns:tools="http://schemas.android.com/tools"
4 5
    android:layout_width="match_parent"
5 6
    android:layout_height="match_parent"
6
    xmlns:app="http://schemas.android.com/apk/res-auto"
7 7
    android:background="@color/white"
8 8
    tools:context="com.electric.chargingpile.activity.OderDetailsActivity">
9 9
@ -11,10 +11,10 @@
11 11
        android:id="@+id/rl_title"
12 12
        android:layout_width="match_parent"
13 13
        android:layout_height="44dp"
14
        android:background="@color/white"
15
        android:layout_alignParentTop="true"
14
        android:layout_alignParentStart="true"
16 15
        android:layout_alignParentLeft="true"
17
        android:layout_alignParentStart="true">
16
        android:layout_alignParentTop="true"
17
        android:background="@color/white">
18 18
19 19
        <TextView
20 20
            android:id="@+id/tv_zhan_name"
@ -40,34 +40,34 @@
40 40
41 41
    <LinearLayout
42 42
        android:id="@+id/ll_order"
43
        android:layout_height="wrap_content"
44 43
        android:layout_width="match_parent"
45
        android:background="@color/white"
46
        android:orientation="vertical"
44
        android:layout_height="wrap_content"
47 45
        android:layout_below="@+id/rl_title"
46
        android:layout_alignParentStart="true"
48 47
        android:layout_alignParentLeft="true"
49
        android:layout_alignParentStart="true">
48
        android:background="@color/white"
49
        android:orientation="vertical">
50 50
51 51
        <TextView
52 52
            android:id="@+id/tv_name"
53 53
            android:layout_width="wrap_content"
54 54
            android:layout_height="wrap_content"
55 55
            android:layout_gravity="center_horizontal"
56
            android:gravity="center"
57 56
            android:layout_marginTop="27dp"
58 57
            android:drawableLeft="@drawable/icon_zhan_name"
59 58
            android:drawablePadding="8dp"
59
            android:gravity="center"
60 60
            android:text=""
61
            android:textSize="18sp"
62
            android:textColor="@color/ui_62"/>
61
            android:textColor="@color/ui_62"
62
            android:textSize="18sp" />
63 63
64 64
        <TextView
65 65
            android:id="@+id/tv_charging_shifu"
66 66
            android:layout_width="wrap_content"
67 67
            android:layout_height="wrap_content"
68
            android:layout_gravity="center_horizontal"
68 69
            android:layout_marginTop="30dp"
69 70
            android:text="--"
70
            android:layout_gravity="center_horizontal"
71 71
            android:textColor="@color/ui_62"
72 72
            android:textSize="31sp" />
73 73
@ -88,21 +88,21 @@
88 88
            <TextView
89 89
                android:layout_width="wrap_content"
90 90
                android:layout_height="wrap_content"
91
                android:layout_alignParentLeft="true"
92
                android:layout_marginLeft="15dp"
91 93
                android:text="充电费"
92 94
                android:textColor="@color/ui_62"
93
                android:textSize="14sp"
94
                android:layout_alignParentLeft="true"
95
                android:layout_marginLeft="15dp"/>
95
                android:textSize="14sp" />
96 96
97 97
            <TextView
98 98
                android:id="@+id/tv_charging_cost"
99 99
                android:layout_width="wrap_content"
100 100
                android:layout_height="wrap_content"
101
                android:layout_alignParentRight="true"
102
                android:layout_marginRight="15dp"
101 103
                android:text="--"
102 104
                android:textColor="@color/ui_62"
103
                android:textSize="14sp"
104
                android:layout_alignParentRight="true"
105
                android:layout_marginRight="15dp"/>
105
                android:textSize="14sp" />
106 106
107 107
        </RelativeLayout>
108 108
@ -114,21 +114,21 @@
114 114
            <TextView
115 115
                android:layout_width="wrap_content"
116 116
                android:layout_height="wrap_content"
117
                android:layout_alignParentLeft="true"
118
                android:layout_marginLeft="15dp"
117 119
                android:text="服务费"
118 120
                android:textColor="@color/ui_62"
119
                android:textSize="14sp"
120
                android:layout_alignParentLeft="true"
121
                android:layout_marginLeft="15dp"/>
121
                android:textSize="14sp" />
122 122
123 123
            <TextView
124 124
                android:id="@+id/tv_service_cost"
125 125
                android:layout_width="wrap_content"
126 126
                android:layout_height="wrap_content"
127
                android:layout_alignParentRight="true"
128
                android:layout_marginRight="15dp"
127 129
                android:text="--"
128 130
                android:textColor="@color/ui_62"
129
                android:textSize="14sp"
130
                android:layout_alignParentRight="true"
131
                android:layout_marginRight="15dp"/>
131
                android:textSize="14sp" />
132 132
133 133
        </RelativeLayout>
134 134
@ -140,30 +140,30 @@
140 140
            <TextView
141 141
                android:layout_width="wrap_content"
142 142
                android:layout_height="wrap_content"
143
                android:layout_alignParentLeft="true"
144
                android:layout_marginLeft="15dp"
143 145
                android:text="红包减免"
144 146
                android:textColor="@color/juhuang"
145
                android:textSize="14sp"
146
                android:layout_alignParentLeft="true"
147
                android:layout_marginLeft="15dp"/>
147
                android:textSize="14sp" />
148 148
149 149
            <TextView
150 150
                android:id="@+id/tv_charging_hongbao"
151 151
                android:layout_width="wrap_content"
152 152
                android:layout_height="wrap_content"
153
                android:layout_alignParentRight="true"
154
                android:layout_marginRight="15dp"
153 155
                android:text="--"
154 156
                android:textColor="@color/juhuang"
155
                android:textSize="14sp"
156
                android:layout_alignParentRight="true"
157
                android:layout_marginRight="15dp"/>
157
                android:textSize="14sp" />
158 158
159 159
        </RelativeLayout>
160 160
161 161
        <View
162 162
            android:layout_width="match_parent"
163 163
            android:layout_height="0.5dp"
164
            android:background="#dddddd"
164
            android:layout_marginLeft="15dp"
165 165
            android:layout_marginTop="15dp"
166
            android:layout_marginLeft="15dp"/>
166
            android:background="#dddddd" />
167 167
168 168
        <RelativeLayout
169 169
            android:layout_width="match_parent"
@ -173,21 +173,21 @@
173 173
            <TextView
174 174
                android:layout_width="wrap_content"
175 175
                android:layout_height="wrap_content"
176
                android:layout_alignParentLeft="true"
177
                android:layout_marginLeft="15dp"
176 178
                android:text="充电桩编号"
177 179
                android:textColor="@color/ui_68"
178
                android:textSize="14sp"
179
                android:layout_alignParentLeft="true"
180
                android:layout_marginLeft="15dp"/>
180
                android:textSize="14sp" />
181 181
182 182
            <TextView
183 183
                android:id="@+id/tv_zhuang_no"
184 184
                android:layout_width="wrap_content"
185 185
                android:layout_height="wrap_content"
186
                android:layout_alignParentRight="true"
187
                android:layout_marginRight="15dp"
186 188
                android:text="--"
187 189
                android:textColor="@color/ui_68"
188
                android:textSize="14sp"
189
                android:layout_alignParentRight="true"
190
                android:layout_marginRight="15dp"/>
190
                android:textSize="14sp" />
191 191
192 192
        </RelativeLayout>
193 193
@ -199,21 +199,21 @@
199 199
            <TextView
200 200
                android:layout_width="wrap_content"
201 201
                android:layout_height="wrap_content"
202
                android:layout_alignParentLeft="true"
203
                android:layout_marginLeft="15dp"
202 204
                android:text="充电时长"
203 205
                android:textColor="@color/ui_68"
204
                android:textSize="14sp"
205
                android:layout_alignParentLeft="true"
206
                android:layout_marginLeft="15dp"/>
206
                android:textSize="14sp" />
207 207
208 208
            <TextView
209 209
                android:id="@+id/tv_charging_time"
210 210
                android:layout_width="wrap_content"
211 211
                android:layout_height="wrap_content"
212
                android:layout_alignParentRight="true"
213
                android:layout_marginRight="15dp"
212 214
                android:text="--"
213 215
                android:textColor="@color/ui_68"
214
                android:textSize="14sp"
215
                android:layout_alignParentRight="true"
216
                android:layout_marginRight="15dp"/>
216
                android:textSize="14sp" />
217 217
218 218
        </RelativeLayout>
219 219
@ -225,21 +225,21 @@
225 225
            <TextView
226 226
                android:layout_width="wrap_content"
227 227
                android:layout_height="wrap_content"
228
                android:layout_alignParentLeft="true"
229
                android:layout_marginLeft="15dp"
228 230
                android:text="充电度数"
229 231
                android:textColor="@color/ui_68"
230
                android:textSize="14sp"
231
                android:layout_alignParentLeft="true"
232
                android:layout_marginLeft="15dp"/>
232
                android:textSize="14sp" />
233 233
234 234
            <TextView
235 235
                android:id="@+id/tv_charging_liang"
236 236
                android:layout_width="wrap_content"
237 237
                android:layout_height="wrap_content"
238
                android:layout_alignParentRight="true"
239
                android:layout_marginRight="15dp"
238 240
                android:text="--"
239 241
                android:textColor="@color/ui_68"
240
                android:textSize="14sp"
241
                android:layout_alignParentRight="true"
242
                android:layout_marginRight="15dp"/>
242
                android:textSize="14sp" />
243 243
244 244
        </RelativeLayout>
245 245
@ -252,27 +252,53 @@
252 252
            <TextView
253 253
                android:layout_width="wrap_content"
254 254
                android:layout_height="wrap_content"
255
                android:layout_alignParentLeft="true"
256
                android:layout_marginLeft="15dp"
255 257
                android:text="结束原因"
256 258
                android:textColor="@color/ui_68"
257
                android:textSize="14sp"
258
                android:layout_alignParentLeft="true"
259
                android:layout_marginLeft="15dp"/>
259
                android:textSize="14sp" />
260 260
261 261
            <TextView
262 262
                android:id="@+id/tv_tishi"
263 263
                android:layout_width="wrap_content"
264 264
                android:layout_height="wrap_content"
265
                android:layout_alignParentRight="true"
266
                android:layout_marginRight="15dp"
265 267
                android:text="--"
266 268
                android:textColor="@color/ui_68"
267
                android:textSize="14sp"
268
                android:layout_alignParentRight="true"
269
                android:layout_marginRight="15dp"/>
269
                android:textSize="14sp" />
270 270
271 271
        </RelativeLayout>
272 272
273 273
274
    </LinearLayout>
275
276
277
    <LinearLayout
278
        android:id="@+id/red_paper_bag_bottom"
279
        android:layout_width="match_parent"
280
        android:layout_height="40dp"
281
        android:layout_alignParentBottom="true"
282
        android:layout_marginLeft="15dp"
283
        android:layout_marginRight="15dp"
284
        android:layout_marginBottom="50dp"
285
        android:background="@drawable/red_pager_bag_bg"
286
        android:visibility="gone"
287
        tools:visibility="visible"
288
        android:gravity="center_vertical">
274 289
290
        <ImageView
291
            android:layout_width="wrap_content"
292
            android:layout_height="wrap_content"
293
            android:src="@drawable/red_pager_bag_circle_icon" />
275 294
295
        <TextView
296
            android:layout_width="wrap_content"
297
            android:layout_height="wrap_content"
298
            android:layout_marginLeft="5dp"
299
            android:text="充电成功后评论并分享可以领红包喔~"
300
            android:textColor="#883B00"
301
            android:textSize="13sp" />
276 302
    </LinearLayout>
277 303
278 304
    <TextView
@ -280,15 +306,15 @@
280 306
        android:layout_width="match_parent"
281 307
        android:layout_height="39dp"
282 308
        android:layout_alignParentBottom="true"
283
        android:layout_marginTop="15dp"
284 309
        android:layout_marginLeft="15dp"
310
        android:layout_marginTop="15dp"
285 311
        android:layout_marginRight="15dp"
286 312
        android:layout_marginBottom="7dp"
287 313
        android:background="@drawable/textview_greenstyle"
288
        android:textColor="@color/white"
289
        android:textSize="16sp"
314
        android:gravity="center"
290 315
        android:text="立即评论"
291
        android:gravity="center"/>
316
        android:textColor="@color/white"
317
        android:textSize="16sp" />
292 318
293 319
    <ImageView
294 320
        android:id="@+id/iv"

+ 10 - 0
app/src/main/res/layout/activity_user_center.xml

@ -803,6 +803,16 @@
803 803
                        android:layout_width="match_parent"
804 804
                        android:layout_height="10dp"
805 805
                        android:background="@color/activity_bgcolor"/>
806
                    <ImageView android:id="@+id/chat_share_bar"
807
                        android:src="@drawable/chat_share_bar"
808
                        android:layout_width="match_parent"
809
                        android:layout_height="wrap_content" />
810
                    <View
811
                        android:layout_width="match_parent"
812
                        android:layout_height="10dp"
813
                        android:background="@color/activity_bgcolor"/>
814
815
806 816
807 817
                </LinearLayout>
808 818