瀏覽代碼

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

huyuguo 5 年之前
父節點
當前提交
3475dc3e74

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

62
    private RatingBarView ratingBarView;
62
    private RatingBarView ratingBarView;
63
    private LinearLayout ll_order;
63
    private LinearLayout ll_order;
64
    private TextView tv_gocomment;
64
    private TextView tv_gocomment;
65
    private LinearLayout red_paper_bag_bottom;
65
    private RelativeLayout rl_end_info;
66
    private RelativeLayout rl_end_info;
66
    private String name;
67
    private String name;
67
68
85
        et_pinglun = (EditText) findViewById(R.id.et_pinglun);
86
        et_pinglun = (EditText) findViewById(R.id.et_pinglun);
86
        tv_pinglun = (TextView) findViewById(R.id.tv_pinglun);
87
        tv_pinglun = (TextView) findViewById(R.id.tv_pinglun);
87
        tv_gocomment = (TextView) findViewById(R.id.tv_gocomment);
88
        tv_gocomment = (TextView) findViewById(R.id.tv_gocomment);
89
        red_paper_bag_bottom = findViewById(R.id.red_paper_bag_bottom);
88
        iv = (ImageView) findViewById(R.id.iv);
90
        iv = (ImageView) findViewById(R.id.iv);
89
91
90
        tv_gocomment.setOnClickListener(this);
92
        tv_gocomment.setOnClickListener(this);
279
                            String is_share = JsonUtils.getKeyResult(data, "is_share");
281
                            String is_share = JsonUtils.getKeyResult(data, "is_share");
280
                            if (EmptyUtils.isNotEmpty(data) && is_share.equals("1")) {
282
                            if (EmptyUtils.isNotEmpty(data) && is_share.equals("1")) {
281
                                tv_gocomment.setText("发表评论领红包");
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
                            String is_print = JsonUtils.getKeyResult(data, "is_print");
288
                            String is_print = JsonUtils.getKeyResult(data, "is_print");
284
                            if (EmptyUtils.isNotEmpty(data) && is_print.equals("1")) {
289
                            if (EmptyUtils.isNotEmpty(data) && is_print.equals("1")) {

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

226
     * See https://g.co/AppIndexing/AndroidStudio for more information.
226
     * See https://g.co/AppIndexing/AndroidStudio for more information.
227
     */
227
     */
228
    private GoogleApiClient client;
228
    private GoogleApiClient client;
229
    private ImageView chat_share_bar;
229
230
230
    //把一个url的网络图片变成一个本地的BitMap
231
    //把一个url的网络图片变成一个本地的BitMap
231
    public Bitmap returnBitMap(final String url) {
232
    public Bitmap returnBitMap(final String url) {
418
        rl_offline_upload = (RelativeLayout) findViewById(R.id.rl_offline_upload);
419
        rl_offline_upload = (RelativeLayout) findViewById(R.id.rl_offline_upload);
419
        rl_offline_upload.setOnClickListener(this);
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
        rl_chongzhi = (RelativeLayout) findViewById(R.id.rl_chongzhi);
426
        rl_chongzhi = (RelativeLayout) findViewById(R.id.rl_chongzhi);
422
        rl_chongzhi.setOnClickListener(this);
427
        rl_chongzhi.setOnClickListener(this);
423
428
991
                MobclickAgent.onEvent(getApplicationContext(), "0816");
996
                MobclickAgent.onEvent(getApplicationContext(), "0816");
992
                break;
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
            case R.id.iv_usermore:
1006
            case R.id.iv_usermore:
996
                startActivity(new Intent(getApplication(), UserCenterMoreActivity.class));
1007
                startActivity(new Intent(getApplication(), UserCenterMoreActivity.class));

二進制
app/src/main/res/drawable-hdpi/red_pager_bag_bg.9.png


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

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

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

803
                        android:layout_width="match_parent"
803
                        android:layout_width="match_parent"
804
                        android:layout_height="10dp"
804
                        android:layout_height="10dp"
805
                        android:background="@color/activity_bgcolor"/>
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
                </LinearLayout>
817
                </LinearLayout>
808
818