94
            }
98
            }
95
        }
99
        }
96
    };
100
    };
101
    private RelativeLayout rl_circle;
97
102
98
103
99
    @Override
104
    @Override
188
193
189
        tv_help = findViewById(R.id.tv_help);
194
        tv_help = findViewById(R.id.tv_help);
190
        tv_help.setOnClickListener(this);
195
        tv_help.setOnClickListener(this);
196
        rl_circle = findViewById(R.id.rl_circle);
191
197
192
198
193
        mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
199
        mWaveLoadingView = (WaveLoadingView) findViewById(R.id.waveLoadingView);
194
        mWaveLoadingView.setAnimDuration(1000);
200
        mWaveLoadingView.setAnimDuration(1000);
195
        mWaveLoadingView.setProgressValue(33);
201
        mWaveLoadingView.setProgressValue(33);
196
202
197
//        iv_charging = (ImageView) findViewById(R.id.iv_charging);
198
//        tv_charging = (TextView) findViewById(R.id.tv_charging);
199
200
201
        tv_stop = (TextView) findViewById(R.id.tv_stop);
203
        tv_stop = (TextView) findViewById(R.id.tv_stop);
202
        tv_stop.setOnClickListener(this);
204
        tv_stop.setOnClickListener(this);
203
205
216
        });
218
        });
217
        tv_cost = (TextView) findViewById(R.id.tv_cost);
219
        tv_cost = (TextView) findViewById(R.id.tv_cost);
218
220
219
220
//        bar = (CircleProgressBar) findViewById(R.id.pb);
221
//        float f = Float.parseFloat("65")*0.01f;
222
//        bar.setProgress(f, 10000);
223
221
        Calendar cal = Calendar.getInstance();
222
        int month = cal.get(Calendar.MONTH) + 1;
223
224
        switch (month) {
225
            case 10:
226
            case 11:
227
            case 12:
228
            case 1:
229
            case 2:
230
            case 3: {
231
                rl_circle.setBackgroundResource(R.drawable.bg_charging_orange);
232
                tv_stop.setBackgroundResource(R.drawable.bg_tv_stop_orange);
233
                tv_help.setTextColor(Color.parseColor("#030303"));
234
                Drawable drawable = getResources().getDrawable(R.drawable.icon_zhan_name_orange, null);
235
                drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
236
                tv_zhuang_num.setCompoundDrawables(drawable, null, null, null);
237
            }
238
            break;
239
        }
224
    }
240
    }
225
241
226
    @Override
242
    @Override
529
                            } else {
545
                            } else {
530
                                ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
546
                                ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
531
                            }
547
                            }
532
//                            else if (code.equals("110")) {
533
////                                if (type != null) {
534
////                                    if (type.equals("xx")) {
535
////                                        if (mTimer != null){
536
////                                            mTimer.cancel();
537
////                                            mTimer = null;
538
////                                        }
539
////                                        if (timer != null){
540
////                                            timer.cancel();
541
////                                            timer = null;
542
////                                        }
543
////                                        MainApplication.isAppStart = false;
544
////                                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
545
////                                        ToastUtil.showToast(getApplicationContext(),"本次充电已结束",Toast.LENGTH_SHORT);
546
////                                        finish();
547
////                                    } else if (type.equals("tld")) {
548
////                                        if (mTimer != null){
549
////                                            mTimer.cancel();
550
////                                            mTimer = null;
551
////                                        }
552
////                                        if (timer != null){
553
////                                            timer.cancel();
554
////                                            timer = null;
555
////                                        }
556
////                                        MainApplication.isAppStart = false;
557
////                                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
558
////                                        ToastUtil.showToast(getApplicationContext(),"本次充电已结束",Toast.LENGTH_SHORT);
559
////                                        finish();
560
////                                    } else if (type.equals("jd")) {
561
//////                                    no =1;
562
////                                        if (mTimer != null){
563
////                                            mTimer.cancel();
564
////                                            mTimer = null;
565
////                                        }
566
////                                        if (timer != null){
567
////                                            timer.cancel();
568
////                                            timer = null;
569
////                                        }
570
////                                        MainApplication.isAppStart = false;
571
////                                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
572
////                                        String result = JsonUtils.getKeyResult(response, "result");
573
////                                        if (!result.equals("")) {
574
////                                            String data = JsonUtils.getKeyResult(result, "data");
575
////                                            String hongbao = JsonUtils.getKeyResult(data, "hongbao");
576
////                                            String money = JsonUtils.getKeyResult(data, "money");
577
////                                            String time_charge = JsonUtils.getKeyResult(data, "time_charge");
578
////                                            String power = JsonUtils.getKeyResult(data, "power");
579
////                                            String feeTotal = JsonUtils.getKeyResult(data, "feeTotal");
580
////                                            String zhuang_id = JsonUtils.getKeyResult(data, "zhan_id");
581
////                                            String end_info = JsonUtils.getKeyResult(data, "end_info");
582
////                                            String url = JsonUtils.getKeyResult(data, "url");
583
////                                            String order_id = JsonUtils.getKeyResult(data, "order_id");
584
////                                            String settlement = JsonUtils.getKeyResult(data, "settlement");
585
////                                            String powerCharge = JsonUtils.getKeyResult(data, "powerCharge");
586
////                                            String serviceCharge = JsonUtils.getKeyResult(data, "serviceCharge");
587
////
588
////                                            if (settlement.equals("1")) {
589
////
590
////                                                Intent intent = new Intent(getApplication(), OderDetailsActivity.class);
591
////                                                intent.putExtra("hongbao", hongbao);
592
////                                                intent.putExtra("money", money);
593
////                                                intent.putExtra("time_charge", time_charge);
594
////                                                intent.putExtra("power", power);
595
////                                                intent.putExtra("feeTotal", feeTotal);
596
////                                                intent.putExtra("zhuang_id", zhuang_id);
597
////                                                intent.putExtra("end_info", end_info);
598
////                                                intent.putExtra("url", url);
599
////                                                intent.putExtra("order_id", order_id);
600
////                                                intent.putExtra("zhan_idc", zhan_idc);
601
////                                                intent.putExtra("settlement", settlement);
602
////                                                intent.putExtra("zhan_name", name);
603
////                                                intent.putExtra("powerCharge", powerCharge);
604
////                                                intent.putExtra("serviceCharge", serviceCharge);
605
////                                                startActivity(intent);
606
////                                                finish();
607
////                                            } else if (settlement.equals("0")) {
608
////
609
////                                                startActivity(new Intent(getApplicationContext(),DelayInfoActivity.class));
610
////                                                finish();
611
////                                            }
612
////                                        } else {
613
////                                            finish();
614
////                                            ToastUtil.showToast(getApplicationContext(),"本次充电已结束",Toast.LENGTH_SHORT);
615
////                                        }
616
////                                    }else {
617
////                                        if (mTimer != null){
618
////                                            mTimer.cancel();
619
////                                            mTimer = null;
620
////                                        }
621
////                                        if (timer != null){
622
////                                            timer.cancel();
623
////                                            timer = null;
624
////                                        }
625
////                                        MainApplication.isAppStart = false;
626
////                                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
627
////                                        ToastUtil.showToast(getApplicationContext(),"本次充电已结束",Toast.LENGTH_SHORT);
628
////                                        finish();
629
////                                    }
630
////                                }else {
631
////                                    if (mTimer != null){
632
////                                        mTimer.cancel();
633
////                                        mTimer = null;
634
////                                    }
635
////                                    if (timer != null){
636
////                                        timer.cancel();
637
////                                        timer = null;
638
////                                    }
639
////                                    MainApplication.isAppStart = false;
640
////                                    ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
641
////                                    ToastUtil.showToast(getApplicationContext(),"本次充电已结束",Toast.LENGTH_SHORT);
642
////                                    finish();
643
////                                }
644
////                            }
645
                        }
548
                        }
646
                    }
549
                    }
647
                });
550
                });
682
                        dialog.show();
585
                        dialog.show();
683
                    }
586
                    }
684
                    pollingChargingStats();
587
                    pollingChargingStats();
685
686
//                    }else {
687
//                    String data = JsonUtils.getKeyResult(response, "data");
688
//                    String hongbao = JsonUtils.getKeyResult(data, "hongbao");
689
//                    String money = JsonUtils.getKeyResult(data, "money");
690
//                    String time_charge = JsonUtils.getKeyResult(data, "time_charge");
691
//                    String power = JsonUtils.getKeyResult(data, "power");
692
//                    String feeTotal = JsonUtils.getKeyResult(data, "feeTotal");
693
//                    String zhuang_id = JsonUtils.getKeyResult(data, "zhan_id");
694
//                    String end_info = JsonUtils.getKeyResult(data, "end_info");
695
//                    String url = JsonUtils.getKeyResult(data, "url");
696
//                    String order_id = JsonUtils.getKeyResult(data, "order_id");
697
//                    String powerCharge = JsonUtils.getKeyResult(data, "powerCharge");
698
//                    String serviceCharge = JsonUtils.getKeyResult(data, "serviceCharge");
699
//                    String activeUrl = JsonUtils.getKeyResult(data, "activeUrl");
700
//
701
//                    if ("jd".equals(type)){
702
//                        String settlement = JsonUtils.getKeyResult(data, "settlement");
703
//                        MainApplication.isAppStart = false;
704
//                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
705
//                        if (settlement.equals("1")) {
706
//                            Intent intent = new Intent(getApplication(), OderDetailsActivity.class);
707
//                            intent.putExtra("hongbao", hongbao);
708
//                            intent.putExtra("money", money);
709
//                            intent.putExtra("time_charge", time_charge);
710
//                            intent.putExtra("power", power);
711
//                            intent.putExtra("feeTotal", feeTotal);
712
//                            intent.putExtra("zhuang_id", zhuang_id);
713
//                            intent.putExtra("end_info", end_info);
714
//                            intent.putExtra("url", url);
715
//                            intent.putExtra("order_id", order_id);
716
//                            intent.putExtra("zhan_idc", zhan_idc);
717
//                            intent.putExtra("settlement", settlement);
718
//                            intent.putExtra("zhan_name", name);
719
//                            intent.putExtra("powerCharge", powerCharge);
720
//                            intent.putExtra("serviceCharge", serviceCharge);
721
//                            intent.putExtra("activeUrl", activeUrl);
722
//                            startActivity(intent);
723
//                            finish();
724
//                        } else if (settlement.equals("0")) {
725
////                            finish();
726
////                            ToastUtil.showToast(getApplicationContext(),"订单结束成功,正在结算,稍后在您的充电记录中查看",Toast.LENGTH_SHORT);
727
//                            //问产品
728
//                            startActivity(new Intent(getApplicationContext(),DelayInfoActivity.class));
729
//                            finish();
730
//                        }
731
//
732
//                    }else {
733
//
734
//                        Intent intent = new Intent(getApplication(), OderDetailsActivity.class);
735
//                        intent.putExtra("hongbao", hongbao);
736
//                        intent.putExtra("money", money);
737
//                        intent.putExtra("time_charge", time_charge);
738
//                        intent.putExtra("power", power);
739
//                        intent.putExtra("feeTotal", feeTotal);
740
//                        intent.putExtra("zhuang_id", zhuang_id);
741
//                        intent.putExtra("end_info", end_info);
742
//                        intent.putExtra("url", url);
743
//                        intent.putExtra("order_id", order_id);
744
//                        intent.putExtra("zhan_idc", zhan_idc);
745
//                        intent.putExtra("zhan_name", name);
746
//                        intent.putExtra("powerCharge", powerCharge);
747
//                        intent.putExtra("serviceCharge", serviceCharge);
748
//                        intent.putExtra("activeUrl", activeUrl);
749
//                        startActivity(intent);
750
//                        finish();
751
//                        MainApplication.isAppStart = false;
752
//                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
753
//                    }
754
                } else {
588
                } else {
755
                    dismissDialog();
589
                    dismissDialog();
756
                    ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
590
                    ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
757
                }
591
                }
758
//                else if (code.equals("400")) {
759
//                    ToastUtil.showToast(getApplicationContext(), "订单不存在", Toast.LENGTH_SHORT);
760
//                    finish();
761
//                    MainApplication.isAppStart = false;
762
//                    ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
763
//                } else if (code.equals("4000")){
764
//                    if (try_count < 6) {
765
//                        new Handler().postDelayed(new Runnable() {
766
//                            @Override
767
//                            public void run() {
768
//                                chargingEnd(type);
769
//                            }
770
//                        }, 2000);
771
//                    }else {
772
//
773
//                        startActivity(new Intent(getApplicationContext(),DelayInfoActivity.class));
774
//                        finish();
775
//                        MainApplication.isAppStart = false;
776
//                        ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
777
////                        ToastUtil.showToast(getApplicationContext(),"订单结束成功,正在结算,稍后在您的充电记录中查看",Toast.LENGTH_SHORT);
778
//                    }
779
//                    try_count++;
780
//                }else if (code.equals("1504")){
781
//                    String error_message = JsonUtils.getKeyResult(response, "error_message");
782
//                    AlertDialog.Builder builder = new AlertDialog.Builder(ChargingStatusActivity.this);
783
//                    builder.setTitle("结束失败");
784
//                    builder.setMessage(error_message);
785
//                    builder.setCancelable(false);
786
//                    builder.setPositiveButton("已输入密码结束", new DialogInterface.OnClickListener() {
787
//                        @Override
788
//                        public void onClick(DialogInterface dialogg, int which) {
789
//                            chargingChangeStatus(order_id);
790
//                        }
791
//                    });
792
//                    builder.setNegativeButton("取消", null);
793
//                    builder.create().show();
794
//
795
//                }else {
796
//                    String error_message = JsonUtils.getKeyResult(response, "error_message");
797
//                    ToastUtil.showToast(getApplication(), error_message, Toast.LENGTH_SHORT);
798
//
799
//                }
800
            }
592
            }
801
        });
593
        });
802
    }
594
    }

+ 0 - 77
app/src/main/java/com/electric/chargingpile/activity/InputCodeActivity.java

267
267
268
    }
268
    }
269
269
270
//    private void getChargingPile(final String result){
271
//        dialog.show();
272
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/interface/info?flag=2&user_id="+MainApplication.userId+"&url="+result;
273
//        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
274
//            @Override
275
//            public void onError(Call call, Exception e) {
276
//                cancelDialog();
277
//                ToastUtil.showToast(getApplicationContext(),"网络异常,请检查您的网络连接",Toast.LENGTH_SHORT);
278
//                CrashReport.postCatchedException(e);
279
//            }
280
//
281
//            @Override
282
//            public void onResponse(String response) {
283
//                Log.e(TAG, "onResponse: getChargingPile="+response );
284
//                String code = JsonUtils.getKeyResult(response,"code");
285
//                if (code.equals("200")){
286
//                    String group_id = JsonUtils.getKeyResult(response,"group_id");
287
//                    String eletype = JsonUtils.getKeyResult(response,"eletype");
288
//                    String type = JsonUtils.getKeyResult(response,"type");
289
//                    String pile_code = JsonUtils.getKeyResult(response,"pile_code");
290
//
291
//                    MainApplication.isAppStart = true;
292
//                    ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
293
//                    if (type.equals("jd")){
294
//                        startHssy(pile_code,group_id,type);
295
//                    }else {
296
//                        cancelDialog();
297
//                        Intent intent = new Intent(getApplicationContext(),TLDLoadingActivity.class);
298
//                        intent.putExtra("type",type);
299
//                        intent.putExtra("eletype",eletype);
300
//                        intent.putExtra("chargingCode",pile_code);
301
//                        intent.putExtra("group_id",group_id);
302
//                        startActivity(intent);
303
//                        finish();
304
//                    }
305
//                }else {
306
//                    cancelDialog();
307
//                    String error_message = JsonUtils.getKeyResult(response,"error_message");
308
//                    ToastUtil.showToast(getApplicationContext(),error_message,Toast.LENGTH_SHORT);
309
//                }
310
//            }
311
//        });
312
//    }
313
//
314
//    private void startHssy(String pile_code,String group_id,String type){
315
//        long appTime1 = System.currentTimeMillis() / 1000;
316
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
317
//        String token = String.valueOf(updatetime);
318
//        String s = "group_id="+group_id+"&password="+MainApplication.userPassword+"&pile_code="+pile_code+"&timer="+token+"&type="+type+"&user_id="+MainApplication.userId+"&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
319
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/interface/start_v2?" +
320
//                "ver=1.0&type="+type+"&timer="+token+"&user_id="+MainApplication.userId+"&pile_code="
321
//                +pile_code+"&group_id="+group_id+"&password="+MainApplication.userPassword+"&sign="+ Md5Util.md5(s);
322
//        Log.e(TAG, "startHssy: url="+url );
323
//        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
324
//            @Override
325
//            public void onError(Call call, Exception e) {
326
//                cancelDialog();
327
//            }
328
//
329
//            @Override
330
//            public void onResponse(String response) {
331
//                cancelDialog();
332
//                Log.e(TAG, "onResponse: startHssy="+response );
333
//                String code = JsonUtils.getKeyResult(response,"code");
334
//
335
//                if (code.equals("200")){
336
//                    startActivity(new Intent(getApplicationContext(),ChargingStatusActivity.class));
337
//                    finish();
338
//                }else {
339
//                    String error_message = JsonUtils.getKeyResult(response,"error_message");
340
//                    if (error_message != null) {
341
//                        ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
342
//                    }
343
//                }
344
//            }
345
//        });
346
//    }
347
270
348
    private void cancelDialog() {
271
    private void cancelDialog() {
349
        if (activity != null && !activity.isFinishing()) {
272
        if (activity != null && !activity.isFinishing()) {

+ 2 - 0
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

937
                }
937
                }
938
            }
938
            }
939
        }, 2000);
939
        }, 2000);
940
941
//        startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
940
    }
942
    }
941
943
942
944

+ 0 - 47
app/src/main/java/com/electric/chargingpile/activity/MainScanActivity.java

188
        iv_questionmark = (ImageView) findViewById(R.id.iv_questionmark);
188
        iv_questionmark = (ImageView) findViewById(R.id.iv_questionmark);
189
        iv_questionmark.setOnClickListener(this);
189
        iv_questionmark.setOnClickListener(this);
190
        ll_yue = (LinearLayout) findViewById(R.id.ll_yue);
190
        ll_yue = (LinearLayout) findViewById(R.id.ll_yue);
191
//        tv_go.setOnClickListener(new View.OnClickListener() {
192
//            @Override
193
//            public void onClick(View v) {
194
//                startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
195
//            }
196
//        });
197
191
198
        ll_charging_status = (LinearLayout) findViewById(R.id.ll_charging_status);
192
        ll_charging_status = (LinearLayout) findViewById(R.id.ll_charging_status);
199
        rl_scan = (RelativeLayout) findViewById(R.id.rl_scan);
193
        rl_scan = (RelativeLayout) findViewById(R.id.rl_scan);
200
194
201
//        if (tag.equals("1")){
202
//           ll_scan.setVisibility(View.GONE);
203
//            rl_charging_status.setVisibility(View.VISIBLE);
204
////            setTimerTask();
205
//        }else {
206
//            ll_scan.setVisibility(View.VISIBLE);
207
//            rl_charging_status.setVisibility(View.GONE);
208
//        }
209
210
211
        iv_our = (ImageView) findViewById(R.id.iv_our);
195
        iv_our = (ImageView) findViewById(R.id.iv_our);
212
        iv_find = (ImageView) findViewById(R.id.iv_find);
196
        iv_find = (ImageView) findViewById(R.id.iv_find);
213
        iv_main = (ImageView) findViewById(R.id.iv_main);
197
        iv_main = (ImageView) findViewById(R.id.iv_main);
214
        iv_screening = (ImageView) findViewById(R.id.iv_screening);
198
        iv_screening = (ImageView) findViewById(R.id.iv_screening);
215
        tv_screening = (TextView) findViewById(R.id.tv_screening);
199
        tv_screening = (TextView) findViewById(R.id.tv_screening);
216
//        if (MainMapActivity.have_message == 0 && MainMapActivity.have_pinglun == 0) {
217
//            if (MainApplication.festival_time.equals("1")){
218
//                iv_our.setImageResource(R.drawable.icon_cj4);
219
//            }else if (MainApplication.festival_time.equals("2")){
220
//                iv_our.setImageResource(R.drawable.icon_yx4);
221
//            }else {
222
//                iv_our.setImageResource(R.drawable.tab_our);
223
//            }
224
//        } else if (MainMapActivity.have_message == 1 || MainMapActivity.have_pinglun != 0) {
225
//            if (MainApplication.festival_time.equals("1")){
226
//                iv_our.setImageResource(R.drawable.icon_cjh4);
227
//            }else if (MainApplication.festival_time.equals("2")){
228
//                iv_our.setImageResource(R.drawable.icon_yxh4);
229
//            }else {
230
//                iv_our.setImageResource(R.drawable.tab_our_h);
231
//            }
232
//        }
233
//
234
//        if (MainApplication.festival_time.equals("1")){
235
//            iv_screening.setImageResource(R.drawable.icon_cj2);
236
//            iv_main.setImageResource(R.drawable.icon_cj1);
237
//            iv_find.setImageResource(R.drawable.icon_cj3);
238
//            tv_screening.setTextColor(getResources().getColor(R.color.jieri));
239
//        }else if (MainApplication.festival_time.equals("2")){
240
//            iv_screening.setImageResource(R.drawable.icon_yx2);
241
//            iv_main.setImageResource(R.drawable.icon_yx1);
242
//            iv_find.setImageResource(R.drawable.icon_yx3);
243
//            tv_screening.setTextColor(getResources().getColor(R.color.jieri));
244
//        }
245
246
    }
200
    }
247
201
248
202
936
                            setTimerTask();
890
                            setTimerTask();
937
                            rl_scan.setVisibility(View.GONE);
891
                            rl_scan.setVisibility(View.GONE);
938
                            ll_charging_status.setVisibility(View.VISIBLE);
892
                            ll_charging_status.setVisibility(View.VISIBLE);
939
//                            startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
940
                            Log.e("首页查询订单=", "有");
893
                            Log.e("首页查询订单=", "有");
941
                        } else {
894
                        } else {
942
                            rl_scan.setVisibility(View.VISIBLE);
895
                            rl_scan.setVisibility(View.VISIBLE);

+ 0 - 951
app/src/main/java/com/electric/chargingpile/activity/MyCaptureActivity.java

1
//package com.electric.chargingpile.activity;
2
//
3
//import android.app.Activity;
4
//import com.electric.chargingpile.view.AlertDialog;
5
//import android.content.Intent;
6
//import android.content.SharedPreferences;
7
//import android.content.pm.ActivityInfo;
8
//import android.graphics.Rect;
9
//import android.hardware.Camera;
10
//import android.hardware.Camera.AutoFocusCallback;
11
//import android.hardware.Camera.PreviewCallback;
12
//import android.hardware.Camera.Size;
13
//import android.os.Bundle;
14
//import android.os.Handler;
15
//import android.text.TextUtils;
16
//import android.util.Log;
17
//import android.view.KeyEvent;
18
//import android.view.View;
19
//import android.view.View.OnClickListener;
20
//import android.view.animation.Animation;
21
//import android.view.animation.TranslateAnimation;
22
//import android.widget.Button;
23
//import android.widget.FrameLayout;
24
//import android.widget.ImageView;
25
//import android.widget.RelativeLayout;
26
//import android.widget.TextView;
27
//import android.widget.Toast;
28
//
29
//import com.electric.chargingpile.R;
30
//import com.electric.chargingpile.application.MainApplication;
31
//import com.electric.chargingpile.camera.CameraManager;
32
//import com.electric.chargingpile.camera.CameraPreview;
33
//import com.electric.chargingpile.manager.ProfileManager;
34
//import com.electric.chargingpile.util.DES3;
35
//import com.electric.chargingpile.util.JsonUtils;
36
//import com.electric.chargingpile.util.LoadingDialog;
37
//import com.electric.chargingpile.util.Md5Util;
38
//import com.electric.chargingpile.util.ToastUtil;
39
//import com.zhy.http.okhttp.OkHttpUtils;
40
//import com.zhy.http.okhttp.callback.StringCallback;
41
//
42
//import net.sourceforge.zbar.Config;
43
//import net.sourceforge.zbar.Image;
44
//import net.sourceforge.zbar.ImageScanner;
45
//import net.sourceforge.zbar.Symbol;
46
//import net.sourceforge.zbar.SymbolSet;
47
//
48
//import java.io.IOException;
49
//import java.lang.reflect.Field;
50
//import java.net.URLEncoder;
51
//
52
//import okhttp3.Call;
53
//
54
//public class MyCaptureActivity extends Activity implements OnClickListener {
55
//    private static final String TAG = "MyCaptureActivity";
56
//    private Camera mCamera;
57
//    private CameraPreview mPreview;
58
//    private Handler autoFocusHandler;
59
//    private CameraManager mCameraManager;
60
//
61
//    private TextView scanResult, capture_flashlight, tv_input_code;
62
//    private FrameLayout scanPreview;
63
//    private Button scanRestart;
64
//    private RelativeLayout scanContainer;
65
//    private RelativeLayout scanCropView;
66
//    private ImageView scanLine;
67
//
68
//    private Rect mCropRect = null;
69
//    private boolean barcodeScanned = false;
70
//    private boolean previewing = true;
71
//    private ImageScanner mImageScanner = null;
72
//    private boolean flag = true;
73
//    private LoadingDialog dialog;
74
//    private String stubGroupId;
75
//    private String password = "";
76
//    private ImageView iv_back;
77
//
78
//    static {
79
//        System.loadLibrary("iconv");
80
//    }
81
//
82
//    @Override
83
//    public void onCreate(Bundle savedInstanceState) {
84
//        super.onCreate(savedInstanceState);
85
//        setContentView(R.layout.activity_my_capture);
86
//        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
87
//        dialog = new LoadingDialog(this);
88
//        dialog.setCanceledOnTouchOutside(false);
89
//        findViewById();
90
//        addEvents();
91
//        initViews();
92
//
93
//    }
94
//
95
//    private void findViewById() {
96
//        scanPreview = (FrameLayout) findViewById(R.id.capture_preview);
97
//        scanResult = (TextView) findViewById(R.id.capture_scan_result);
98
//        scanRestart = (Button) findViewById(R.id.capture_restart_scan);
99
//        scanContainer = (RelativeLayout) findViewById(R.id.capture_container);
100
//        scanCropView = (RelativeLayout) findViewById(R.id.capture_crop_view);
101
//        scanLine = (ImageView) findViewById(R.id.capture_scan_line);
102
//        capture_flashlight = (TextView) findViewById(R.id.capture_flashlight);
103
//        capture_flashlight.setOnClickListener(this);
104
//        tv_input_code = (TextView) findViewById(R.id.tv_input_code);
105
//        tv_input_code.setOnClickListener(this);
106
//        iv_back = (ImageView) findViewById(R.id.iv_back);
107
//        iv_back.setOnClickListener(this);
108
//    }
109
//
110
//    private void addEvents() {
111
//        scanRestart.setOnClickListener(new OnClickListener() {
112
//            public void onClick(View v) {
113
//
114
//            }
115
//        });
116
//    }
117
//
118
//    private void scanRestart() {
119
//        if (barcodeScanned) {
120
//            barcodeScanned = false;
121
//            if (null == mCamera) {
122
//                mCamera = mCameraManager.getCamera();
123
//            }
124
//            mCamera.setPreviewCallback(previewCb);
125
//            mCamera.startPreview();
126
//            previewing = true;
127
//            mCamera.autoFocus(autoFocusCB);
128
//        }
129
//    }
130
//
131
//    public void light() {
132
//        if (this.flag) {
133
//            mCameraManager.openLight();
134
//            this.flag = false;
135
//            this.capture_flashlight.setText("关灯");
136
//            return;
137
//        }
138
//        mCameraManager.offLight();
139
//        this.flag = true;
140
//        this.capture_flashlight.setText("开灯");
141
//    }
142
//
143
//    private void initViews() {
144
//        mImageScanner = new ImageScanner();
145
//        mImageScanner.setConfig(0, Config.X_DENSITY, 3);
146
//        mImageScanner.setConfig(0, Config.Y_DENSITY, 3);
147
//
148
//        autoFocusHandler = new Handler();
149
//        mCameraManager = new CameraManager(this);
150
//        try {
151
//            mCameraManager.openDriver();
152
//        } catch (IOException e) {
153
//            e.printStackTrace();
154
//        }
155
//
156
//        mCamera = mCameraManager.getCamera();
157
//        mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);
158
//        scanPreview.addView(mPreview);
159
//
160
//        TranslateAnimation animation = new TranslateAnimation(
161
//                Animation.RELATIVE_TO_PARENT, 0.0f,
162
//                Animation.RELATIVE_TO_PARENT, 0.0f,
163
//                Animation.RELATIVE_TO_PARENT, 0.0f,
164
//                Animation.RELATIVE_TO_PARENT, 0.85f);
165
//        animation.setDuration(3000);
166
//        animation.setRepeatCount(-1);
167
//        animation.setRepeatMode(Animation.REVERSE);
168
//        scanLine.startAnimation(animation);
169
//    }
170
//
171
//    @Override
172
//    public void onPause() {
173
//        Log.e(TAG, "onPause: 11");
174
//        super.onPause();
175
////		scanRestart();
176
////        releaseCamera();
177
//    }
178
//
179
//    @Override
180
//    protected void onDestroy() {
181
//        super.onDestroy();
182
//        releaseCamera();
183
//    }
184
//
185
//    @Override
186
//    public boolean onKeyDown(int keyCode, KeyEvent event) {
187
//        System.out.println("Page01 -->onKeyDown: keyCode: " + keyCode);
188
//        if (KeyEvent.KEYCODE_HOME == keyCode) {
189
//            System.out.println("HOME has been pressed yet ...");
190
//            // android.os.Process.killProcess(android.os.Process.myPid());
191
//            Toast.makeText(getApplicationContext(), "HOME 键已被禁用...",
192
//                    Toast.LENGTH_LONG).show();
193
//            return true;
194
//        }
195
//        return super.onKeyDown(keyCode, event); // 不会回到 home 页面
196
//    }
197
//
198
//    @Override
199
//    protected void onResume() {
200
//        super.onResume();
201
//        scanRestart();
202
//    }
203
//
204
//    private void releaseCamera() {
205
//        if (mCamera != null) {
206
//            previewing = false;
207
//            mCamera.setPreviewCallback(null);
208
//            mCamera.release();
209
//            mCamera = null;
210
//        }
211
//    }
212
//
213
//    private Runnable doAutoFocus = new Runnable() {
214
//        public void run() {
215
//            if (previewing)
216
//
217
//                mCamera.autoFocus(autoFocusCB);
218
//        }
219
//    };
220
//
221
//    PreviewCallback previewCb = new PreviewCallback() {
222
//        public void onPreviewFrame(byte[] data, Camera camera) {
223
//            try {
224
//                Size size = camera.getParameters().getPreviewSize();
225
//
226
//                // 这里需要将获取的data翻转一下,因为相机默认拿的的横屏的数据
227
//                byte[] rotatedData = new byte[data.length];
228
//                for (int y = 0; y < size.height; y++) {
229
//                    for (int x = 0; x < size.width; x++)
230
//                        rotatedData[x * size.height + size.height - y - 1] = data[x
231
//                                + y * size.width];
232
//                }
233
//
234
//                // 宽高也要调整
235
//                int tmp = size.width;
236
//                size.width = size.height;
237
//                size.height = tmp;
238
//
239
//                initCrop();
240
//
241
//                Image barcode = new Image(size.width, size.height, "Y800");
242
//                barcode.setData(rotatedData);
243
//                barcode.setCrop(mCropRect.left, mCropRect.top, mCropRect.width(),
244
//                        mCropRect.height());
245
//
246
//                int result = mImageScanner.scanImage(barcode);
247
//                String resultStr = null;
248
//
249
//                if (result != 0) {
250
//                    SymbolSet syms = mImageScanner.getResults();
251
//                    for (Symbol sym : syms) {
252
//                        resultStr = sym.getData();
253
//                    }
254
//                }
255
//
256
//                if (!TextUtils.isEmpty(resultStr)) {
257
//                    previewing = false;
258
//                    mCamera.setPreviewCallback(null);
259
//                    mCamera.stopPreview();
260
//
261
//                    barcodeScanned = true;
262
////                ToastUtil.showToast(getApplicationContext(),resultStr,Toast.LENGTH_SHORT);
263
////                Log.e(TAG, "onPreviewFrame: result="+resultStr );
264
//
265
//                    getChargingPile(resultStr);
266
//
267
//                }
268
//
269
//            } catch (Exception e) {
270
//                e.printStackTrace();
271
//            }
272
//        }
273
//    };
274
//
275
//    // Mimic continuous auto-focusing
276
//    AutoFocusCallback autoFocusCB = new AutoFocusCallback() {
277
//        public void onAutoFocus(boolean success, Camera camera) {
278
//            autoFocusHandler.postDelayed(doAutoFocus, 1000);
279
//        }
280
//    };
281
//
282
//    /**
283
//     * 初始化截取的矩形区域
284
//     */
285
//    private void initCrop() {
286
//        int cameraWidth = mCameraManager.getCameraResolution().y;
287
//        int cameraHeight = mCameraManager.getCameraResolution().x;
288
//
289
//        /** 获取布局中扫描框的位置信息 */
290
//        int[] location = new int[2];
291
//        scanCropView.getLocationInWindow(location);
292
//
293
//        int cropLeft = location[0];
294
//        int cropTop = location[1] - getStatusBarHeight();
295
//
296
//        int cropWidth = scanCropView.getWidth();
297
//        int cropHeight = scanCropView.getHeight();
298
//
299
//        /** 获取布局容器的宽高 */
300
//        int containerWidth = scanContainer.getWidth();
301
//        int containerHeight = scanContainer.getHeight();
302
//
303
//        /** 计算最终截取的矩形的左上角顶点x坐标 */
304
//        int x = cropLeft * cameraWidth / containerWidth;
305
//        /** 计算最终截取的矩形的左上角顶点y坐标 */
306
//        int y = cropTop * cameraHeight / containerHeight;
307
//
308
//        /** 计算最终截取的矩形的宽度 */
309
//        int width = cropWidth * cameraWidth / containerWidth;
310
//        /** 计算最终截取的矩形的高度 */
311
//        int height = cropHeight * cameraHeight / containerHeight;
312
//
313
//        /** 生成最终的截取的矩形 */
314
//        mCropRect = new Rect(x, y, width + x, height + y);
315
//    }
316
//
317
//    private int getStatusBarHeight() {
318
//        try {
319
//            Class<?> c = Class.forName("com.android.internal.R$dimen");
320
//            Object obj = c.newInstance();
321
//            Field field = c.getField("status_bar_height");
322
//            int x = Integer.parseInt(field.get(obj).toString());
323
//            return getResources().getDimensionPixelSize(x);
324
//        } catch (Exception e) {
325
//            e.printStackTrace();
326
//        }
327
//        return 0;
328
//    }
329
//
330
//    @Override
331
//    public void onClick(View v) {
332
//        switch (v.getId()) {
333
//            case R.id.capture_flashlight:
334
//                light();
335
//                break;
336
//            case R.id.tv_input_code:
337
//                startActivity(new Intent(getApplication(), InputCodeActivity.class));
338
//                finish();
339
//                break;
340
//            case R.id.iv_back:
341
//                finish();
342
//                break;
343
//        }
344
//    }
345
//
346
//    private void checkJd(final String chargingCode) {
347
//        String url = MainApplication.url + "/zhannew/basic/web/index.php/polyelectric/info?pile_code=" + chargingCode;
348
//        Log.e("jd_url===", url);
349
//        OkHttpUtils.get()
350
//                .url(url)
351
//                .build()
352
//                .execute(new StringCallback() {
353
//                    @Override
354
//                    public void onError(Call call, Exception e) {
355
//
356
//                    }
357
//
358
//                    @Override
359
//                    public void onResponse(String response) {
360
//                        dialog.cancel();
361
//                        String code = JsonUtils.getKeyResult(response, "code");
362
//                        if (code.equals("200")) {
363
//                            String group_id = JsonUtils.getKeyResult(response, "group_id");
364
//                            startJdCharging(group_id, chargingCode);
365
//                        } else {
366
//                            String error_messge = JsonUtils.getKeyResult(response, "error_message");
367
//                            if (!error_messge.equals("")) {
368
//                                ToastUtil.showToast(getApplicationContext(), error_messge, Toast.LENGTH_SHORT);
369
//                                new Handler().postDelayed(new Runnable() {
370
//                                    public void run() {
371
//                                        scanRestart();
372
//                                    }
373
//                                }, 1500);
374
//
375
//                            }
376
//                        }
377
//                    }
378
//                });
379
//    }
380
//
381
//    private void startJdCharging(String zhan_id, String zhuang_id) {
382
//        dialog.show();
383
//        long appTime1 = System.currentTimeMillis() / 1000;
384
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
385
//        String token = String.valueOf(updatetime);
386
//        String s = "group_id=" + zhan_id + "&pile_code=" + zhuang_id + "&timer=" + token + "&user_id=" + MainApplication.userId + "&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
387
//        Log.e("s_url==", s);
388
//        final String url = MainApplication.url + "/zhannew/basic/web/index.php/polyelectric/start?ver=1.0&sign=" + Md5Util.md5(s) + "&timer=" + token + "&group_id=" + zhan_id + "&user_id=" + MainApplication.userId + "&pile_code=" + zhuang_id;
389
//        Log.e("jd_url==", url);
390
//        OkHttpUtils.get()
391
//                .url(url)
392
//                .build()
393
//                .execute(new StringCallback() {
394
//                    @Override
395
//                    public void onError(Call call, Exception e) {
396
//
397
//                    }
398
//
399
//                    @Override
400
//                    public void onResponse(String response) {
401
//                        Log.e("start===", response);
402
//                        dialog.cancel();
403
//                        String code = JsonUtils.getKeyResult(response, "code");
404
//                        if (code != null) {
405
//                            if (code.equals("400")) {
406
//                                String error_message = JsonUtils.getKeyResult(response, "error_message");
407
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
408
//                                OkHttpUtils.post()
409
//                                        .url(urll)
410
//                                        .addParams("url", url)
411
//                                        .addParams("code", code)
412
//                                        .addParams("message", error_message)
413
//                                        .addParams("type", "android")
414
//                                        .build()
415
//                                        .execute(new StringCallback() {
416
//                                            @Override
417
//                                            public void onError(Call call, Exception e) {
418
//
419
//                                            }
420
//
421
//                                            @Override
422
//                                            public void onResponse(String response) {
423
//
424
//                                            }
425
//                                        });
426
//                                new AlertDialog(MyCaptureActivity.this).builder()
427
//                                        .setMsg(error_message)
428
//                                        .setNegativeButton("确定", new View.OnClickListener() {
429
//                                            @Override
430
//                                            public void onClick(View v) {
431
//                                                if (mCamera != null) {
432
//                                                    scanRestart();
433
//                                                }
434
////                                        startActivity(new Intent(getApplication(),ChargingStatusActivity.class));
435
//
436
////                                                startCharging();
437
//                                            }
438
//                                        }).show();
439
//
440
//
441
//                            } else if (code.equals("200")) {
442
//                                Intent intent = new Intent(getApplication(), ChargingStatusActivity.class);
443
////									intent.putExtra("stubId",zhuang_num);
444
////									intent.putExtra("stubGroupId",stubGroupId);
445
//                                intent.putExtra("type", "jd");
446
//                                startActivity(intent);
447
//                                if (mCamera != null) {
448
//                                    scanRestart();
449
//                                }
450
//                                finish();
451
//                            } else if (code.equals("104")) {
452
//                                String error_message = JsonUtils.getKeyResult(response, "error_message");
453
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
454
//                                OkHttpUtils.post()
455
//                                        .url(urll)
456
//                                        .addParams("url", url)
457
//                                        .addParams("code", code)
458
//                                        .addParams("message", error_message)
459
//                                        .addParams("type", "android")
460
//                                        .build()
461
//                                        .execute(new StringCallback() {
462
//                                            @Override
463
//                                            public void onError(Call call, Exception e) {
464
//
465
//                                            }
466
//
467
//                                            @Override
468
//                                            public void onResponse(String response) {
469
//
470
//                                            }
471
//                                        });
472
//                                new AlertDialog(MyCaptureActivity.this).builder()
473
//                                        .setMsg("您的余额不足1元,可能无法满\n足您此次充电")
474
//                                        .setPositiveButton("去充值", new View.OnClickListener() {
475
//                                            @Override
476
//                                            public void onClick(View v) {
477
//                                                startActivity(new Intent(getApplication(), AccountRechargeActivity.class));
478
//                                            }
479
//                                        }).setNegativeButton("取消", new View.OnClickListener() {
480
//                                    @Override
481
//                                    public void onClick(View v) {
482
//                                        if (mCamera != null) {
483
//                                            scanRestart();
484
//                                        }
485
////                                        startActivity(new Intent(getApplication(),ChargingStatusActivity.class));
486
//                                    }
487
//                                }).show();
488
//                            } else if (code.equals("0")) {
489
//                                if (mCamera != null) {
490
//                                    scanRestart();
491
//                                }
492
//                                ToastUtil.showToast(getApplicationContext(), "该桩正在充电中,请移步到附近充电桩", Toast.LENGTH_SHORT);
493
//                            } else if (code.equals("40000")) {
494
//                                if (mCamera != null) {
495
//                                    scanRestart();
496
//                                }
497
//                                ToastUtil.showToast(getApplicationContext(), "未插充电枪或该桩已离线", Toast.LENGTH_SHORT);
498
//                            } else if (code.equals("600")) {
499
//                                if (mCamera != null) {
500
//                                    scanRestart();
501
//                                }
502
//                                ToastUtil.showToast(getApplicationContext(), "由于网络原因,您有一笔订单未结算,请稍候再试", Toast.LENGTH_SHORT);
503
//                            } else {
504
//                                if (mCamera != null) {
505
//                                    scanRestart();
506
//                                }
507
//                                String error_message = JsonUtils.getKeyResult(response, "error_message");
508
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
509
//                                OkHttpUtils.post()
510
//                                        .url(urll)
511
//                                        .addParams("url", url)
512
//                                        .addParams("code", code)
513
//                                        .addParams("message", error_message)
514
//                                        .addParams("type", "android")
515
//                                        .build()
516
//                                        .execute(new StringCallback() {
517
//                                            @Override
518
//                                            public void onError(Call call, Exception e) {
519
//
520
//                                            }
521
//
522
//                                            @Override
523
//                                            public void onResponse(String response) {
524
//
525
//                                            }
526
//                                        });
527
//                                ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
528
//                            }
529
//                        }
530
//                    }
531
//                });
532
//    }
533
//
534
//    private void checkoutInfo(final String zhuang_num) {
535
//        long appTime1 = System.currentTimeMillis() / 1000;
536
//        Log.i("appTime(long)---", appTime1 + "");
537
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
538
//        Log.i("updatetime(long)---", updatetime + "");
539
//        Log.i("cha---", MainMapActivity.cha + "");
540
//        String token = String.valueOf(updatetime);
541
//        final String url = MainApplication.url + "/zhannew/basic/web/index.php/xxapi/info" +
542
//                "?stubId=" + zhuang_num + "&supplier=星星充电&timer=" + token + "&user_id=" + MainApplication.userId + "&ver=1.0&sign="
543
//                + Md5Util.md5("stubId=" + zhuang_num + "&supplier=星星充电&timer=" + token + "&user_id=" + MainApplication.userId + "&key=661f9efdcb4f46fe7ab5f2e78a705a2a");
544
//
545
//        Log.e("url", url);
546
//        OkHttpUtils
547
//                .get()
548
//                .url(url)
549
//                .build()
550
//                .connTimeOut(20000)
551
//                .readTimeOut(20000)
552
//                .execute(new StringCallback() {
553
//                    @Override
554
//                    public void onError(Call call, Exception e) {
555
//                        Toast.makeText(getApplicationContext(), "网络不给力", Toast.LENGTH_SHORT).show();
556
//                        dialog.cancel();
557
//                    }
558
//
559
//                    @Override
560
//                    public void onResponse(String response) {
561
//                        Log.e("response====", response);
562
//                        String error_message = JsonUtils.getKeyResult(response, "error_message");
563
//                        String code = JsonUtils.getKeyResult(response, "code");
564
//                        dialog.cancel();
565
//                        if (code != null) {
566
//                            if (code.equals("104")) {
567
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
568
//                                OkHttpUtils.post()
569
//                                        .url(urll)
570
//                                        .addParams("url", url)
571
//                                        .addParams("code", code)
572
//                                        .addParams("message", error_message)
573
//                                        .addParams("type", "android")
574
//                                        .build()
575
//                                        .execute(new StringCallback() {
576
//                                            @Override
577
//                                            public void onError(Call call, Exception e) {
578
//
579
//                                            }
580
//
581
//                                            @Override
582
//                                            public void onResponse(String response) {
583
//
584
//                                            }
585
//                                        });
586
//                                new AlertDialog(MyCaptureActivity.this).builder()
587
//                                        .setMsg("您的余额不足1元,可能无法满\n足您此次充电")
588
//                                        .setPositiveButton("去充值", new View.OnClickListener() {
589
//                                            @Override
590
//                                            public void onClick(View v) {
591
//                                                startActivity(new Intent(getApplication(), AccountRechargeActivity.class));
592
//                                            }
593
//                                        }).setNegativeButton("取消", new View.OnClickListener() {
594
//                                    @Override
595
//                                    public void onClick(View v) {
596
//                                        if (mCamera != null) {
597
//                                            scanRestart();
598
//                                        }
599
//                                    }
600
//                                }).show();
601
//                            } else if (code.equals("106")) {
602
//                                if (mCamera != null) {
603
//                                    scanRestart();
604
//                                }
605
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
606
//                                OkHttpUtils.post()
607
//                                        .url(urll)
608
//                                        .addParams("url", url)
609
//                                        .addParams("code", code)
610
//                                        .addParams("message", error_message)
611
//                                        .addParams("type", "android")
612
//                                        .build()
613
//                                        .execute(new StringCallback() {
614
//                                            @Override
615
//                                            public void onError(Call call, Exception e) {
616
//
617
//                                            }
618
//
619
//                                            @Override
620
//                                            public void onResponse(String response) {
621
//
622
//                                            }
623
//                                        });
624
//                                ToastUtil.showToast(getApplicationContext(), "无此电桩,请重新扫码", Toast.LENGTH_SHORT);
625
//                            } else if (code.equals("301")) {
626
//                                if (mCamera != null) {
627
//                                    scanRestart();
628
//                                }
629
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
630
//                                OkHttpUtils.post()
631
//                                        .url(urll)
632
//                                        .addParams("url", url)
633
//                                        .addParams("code", code)
634
//                                        .addParams("message", error_message)
635
//                                        .addParams("type", "android")
636
//                                        .build()
637
//                                        .execute(new StringCallback() {
638
//                                            @Override
639
//                                            public void onError(Call call, Exception e) {
640
//
641
//                                            }
642
//
643
//                                            @Override
644
//                                            public void onResponse(String response) {
645
//
646
//                                            }
647
//                                        });
648
//                                ToastUtil.showToast(getApplicationContext(), "终端系统错误", Toast.LENGTH_SHORT);
649
//                            } else if (code.equals("200")) {
650
////                            00:空闲,01:充电中,02:故障,03:车位占用,04:维护中,
651
////                            05:离线,06:在建中,07:升级中,99:删除
652
//
653
//                                String data = JsonUtils.getKeyResult(response, "data");
654
//                                Log.e("data===", data);
655
//                                String status = JsonUtils.getKeyResult(data, "status");
656
//                                if (status.equals("00")) {
657
//                                    stubGroupId = JsonUtils.getKeyResult(data, "stubGroupId");
658
//                                    try {
659
//                                        startCharging(zhuang_num);
660
//                                    } catch (Exception e) {
661
//                                        e.printStackTrace();
662
//                                    }
663
//
664
//
665
//                                } else if (status.equals("01")) {
666
//                                    new AlertDialog(MyCaptureActivity.this).builder()
667
//                                            .setMsg("充电中")
668
//                                            .setNegativeButton("确定", new View.OnClickListener() {
669
//                                                @Override
670
//                                                public void onClick(View v) {
671
//                                                    scanRestart();
672
////                                        startActivity(new Intent(getApplication(),ChargingStatusActivity.class));
673
//                                                }
674
//                                            }).show();
675
//                                } else if (status.equals("02")) {
676
//                                    scanRestart();
677
//                                    ToastUtil.showToast(getApplicationContext(), "故障", Toast.LENGTH_SHORT);
678
//                                } else if (status.equals("03")) {
679
//                                    scanRestart();
680
//                                    ToastUtil.showToast(getApplicationContext(), "车位占用", Toast.LENGTH_SHORT);
681
//                                } else if (status.equals("04")) {
682
//                                    scanRestart();
683
//                                    ToastUtil.showToast(getApplicationContext(), "维护中", Toast.LENGTH_SHORT);
684
//                                } else if (status.equals("05")) {
685
//                                    scanRestart();
686
//                                    ToastUtil.showToast(getApplicationContext(), "离线", Toast.LENGTH_SHORT);
687
//                                } else if (status.equals("06")) {
688
//                                    scanRestart();
689
//                                    ToastUtil.showToast(getApplicationContext(), "在建中", Toast.LENGTH_SHORT);
690
//                                } else if (status.equals("07")) {
691
//                                    scanRestart();
692
//                                    ToastUtil.showToast(getApplicationContext(), "升级中", Toast.LENGTH_SHORT);
693
//                                } else if (status.equals("99")) {
694
//                                    scanRestart();
695
//                                    ToastUtil.showToast(getApplicationContext(), "删除", Toast.LENGTH_SHORT);
696
//                                }
697
//                            } else if (code.equals("600")) {
698
//                                scanRestart();
699
//                                ToastUtil.showToast(getApplicationContext(), "由于网络原因,您有一笔订单未结算,请稍候再试", Toast.LENGTH_SHORT);
700
//                            } else {
701
//                                ToastUtil.showToast(getApplicationContext(), "无此电桩,请重新扫码", Toast.LENGTH_SHORT);
702
//                                scanRestart();
703
//                            }
704
//                        } else {
705
//                            ToastUtil.showToast(getApplicationContext(), "code为空", Toast.LENGTH_SHORT);
706
//                        }
707
//                    }
708
//                });
709
//    }
710
//
711
//    private void sp() {
712
//        SharedPreferences sharedPreferences = getApplication().getSharedPreferences("userInfo",
713
//                Activity.MODE_PRIVATE);
714
//        password = sharedPreferences.getString("password", "");
715
//    }
716
//
717
//    private void startCharging(final String zhuang_num) throws Exception {
718
//        sp();
719
//        dialog.show();
720
//        long appTime1 = System.currentTimeMillis() / 1000;
721
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
722
//        String token = String.valueOf(updatetime);
723
//        String s = "password=" + DES3.encode(password) + "&stubGroupId=" + stubGroupId + "&stubId=" + zhuang_num + "&supplier=" + "星星充电&timer=" + token + "&user_id=" + MainApplication.userId + "&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
724
//        final String url = MainApplication.url + "/zhannew/basic/web/index.php/charge/start" +
725
//                "?password=" + URLEncoder.encode(DES3.encode(password)) + "&stubGroupId=" + stubGroupId + "&stubId=" + zhuang_num + "&supplier=" + URLEncoder.encode("星星充电") + "&timer=" + token + "&user_id=" + MainApplication.userId + "&ver=1.0&sign="
726
//                + Md5Util.md5(s);
727
//        Log.e("urlstart===", URLEncoder.encode(url));
728
//        OkHttpUtils.get()
729
//                .url(url)
730
//                .build()
731
//                .connTimeOut(10000)
732
//                .readTimeOut(10000)
733
//                .execute(new StringCallback() {
734
//                    @Override
735
//                    public void onError(Call call, Exception e) {
736
//                        Toast.makeText(getApplicationContext(), "网络不给力", Toast.LENGTH_SHORT).show();
737
//                        dialog.cancel();
738
//                    }
739
//
740
//                    @Override
741
//                    public void onResponse(String response) {
742
//                        Log.e("start===", response);
743
//                        dialog.cancel();
744
//                        String code = JsonUtils.getKeyResult(response, "code");
745
//                        if (code != null) {
746
//                            if (code.equals("400")) {
747
//                                String error_message = JsonUtils.getKeyResult(response, "error_message");
748
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
749
//                                OkHttpUtils.post()
750
//                                        .url(urll)
751
//                                        .addParams("url", url)
752
//                                        .addParams("code", code)
753
//                                        .addParams("message", error_message)
754
//                                        .addParams("type", "android")
755
//                                        .build()
756
//                                        .execute(new StringCallback() {
757
//                                            @Override
758
//                                            public void onError(Call call, Exception e) {
759
//
760
//                                            }
761
//
762
//                                            @Override
763
//                                            public void onResponse(String response) {
764
//
765
//                                            }
766
//                                        });
767
//                                new AlertDialog(MyCaptureActivity.this).builder()
768
//                                        .setMsg(error_message)
769
//                                        .setNegativeButton("确定", new View.OnClickListener() {
770
//                                            @Override
771
//                                            public void onClick(View v) {
772
//                                                if (mCamera != null) {
773
//                                                    scanRestart();
774
//                                                }
775
////                                        startActivity(new Intent(getApplication(),ChargingStatusActivity.class));
776
//
777
////                                                startCharging();
778
//                                            }
779
//                                        }).show();
780
//
781
//
782
//                            } else if (code.equals("200")) {
783
//                                Intent intent = new Intent(getApplication(), ChargingStatusActivity.class);
784
////								intent.putExtra("stubId",zhuang_num);
785
////								intent.putExtra("stubGroupId",stubGroupId);
786
//                                intent.putExtra("type", "xx");
787
//                                startActivity(intent);
788
//                                if (mCamera != null) {
789
//                                    scanRestart();
790
//                                }
791
//                                finish();
792
//                            } else {
793
//                                if (mCamera != null) {
794
//                                    scanRestart();
795
//                                }
796
//                                String error_message = JsonUtils.getKeyResult(response, "error_message");
797
//                                String urll = "http://123.57.6.131/zhannew/basic/web/index.php/log/write";
798
//                                OkHttpUtils.post()
799
//                                        .url(urll)
800
//                                        .addParams("url", url)
801
//                                        .addParams("code", code)
802
//                                        .addParams("message", error_message)
803
//                                        .addParams("type", "android")
804
//                                        .build()
805
//                                        .execute(new StringCallback() {
806
//                                            @Override
807
//                                            public void onError(Call call, Exception e) {
808
//
809
//                                            }
810
//
811
//                                            @Override
812
//                                            public void onResponse(String response) {
813
//
814
//                                            }
815
//                                        });
816
//
817
//                                ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
818
//                            }
819
//                        }
820
//                    }
821
//                });
822
//    }
823
//
824
//    private void checkTlD(final String chargingCode) {
825
//        final String url = MainApplication.url + "/zhannew/basic/web/index.php/special/info?pile_id=" + chargingCode + "&user_id=" + MainApplication.userId;
826
//        Log.e("checkTlD_url===", url);
827
//        dialog.show();
828
//        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
829
//            @Override
830
//            public void onError(Call call, Exception e) {
831
//
832
//            }
833
//
834
//            @Override
835
//            public void onResponse(String response) {
836
//                dialog.cancel();
837
//                Log.e("checkTlD_response", response);
838
//                String code = JsonUtils.getKeyResult(response, "code");
839
//                if (code.equals("200")) {
840
//                    String group_id = JsonUtils.getKeyResult(response, "group_id");
841
//                    String eletype = JsonUtils.getKeyResult(response, "eletype");
842
//                    Intent intent = new Intent(getApplicationContext(), TLDLoadingActivity.class);
843
//                    intent.putExtra("eletype", eletype);
844
//                    intent.putExtra("chargingCode", chargingCode);
845
//                    intent.putExtra("group_id", group_id);
846
//                    startActivity(intent);
847
//                    finish();
848
//
849
////                    startTLD(chargingCode,group_id);
850
//                } else {
851
//                    String error_messge = JsonUtils.getKeyResult(response, "error_message");
852
//                    Toast.makeText(getApplicationContext(), error_messge, Toast.LENGTH_SHORT).show();
853
//                    new Handler().postDelayed(new Runnable() {
854
//                        public void run() {
855
//                            if (mCamera != null) {
856
//                                scanRestart();
857
//                            }
858
//                        }
859
//                    }, 1500);
860
//                }
861
//            }
862
//        });
863
//    }
864
//
865
//    private void getChargingPile(final String result) {
866
//        String url = MainApplication.url + "/zhannew/basic/web/index.php/interface/info?flag=1&user_id=" + MainApplication.userId + "&url=" + result;
867
//        Log.e(TAG, "getChargingPile: url=" + url);
868
//        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
869
//            @Override
870
//            public void onError(Call call, Exception e) {
871
//
872
//            }
873
//
874
//            @Override
875
//            public void onResponse(String response) {
876
//                Log.e(TAG, "onResponse: getChargingPile11=" + response);
877
//                String code = JsonUtils.getKeyResult(response, "code");
878
//                if (code.equals("200")) {
879
//                    String group_id = JsonUtils.getKeyResult(response, "group_id");
880
//                    String eletype = JsonUtils.getKeyResult(response, "eletype");
881
//                    String type = JsonUtils.getKeyResult(response, "type");
882
//                    String pile_code = JsonUtils.getKeyResult(response, "pile_code");
883
//                    if (type.equals("jd")) {
884
//                        startHssy(pile_code, group_id, type);
885
//                    } else {
886
//                        Intent intent = new Intent(getApplicationContext(), TLDLoadingActivity.class);
887
//                        intent.putExtra("type", type);
888
//                        intent.putExtra("eletype", eletype);
889
//                        intent.putExtra("chargingCode", pile_code);
890
//                        intent.putExtra("group_id", group_id);
891
//                        startActivity(intent);
892
//                        finish();
893
//                    }
894
//
895
//                } else {
896
//                    String error_message = JsonUtils.getKeyResult(response, "error_message");
897
//                    ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
898
//                    new Handler().postDelayed(new Runnable() {
899
//                        public void run() {
900
//                            if (mCamera != null) {
901
//                                scanRestart();
902
//                            }
903
//
904
//                        }
905
//                    }, 1500);
906
//                }
907
//            }
908
//        });
909
//    }
910
//
911
//    private void startHssy(String pile_code, String group_id, String type) {
912
//        long appTime1 = System.currentTimeMillis() / 1000;
913
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
914
//        String token = String.valueOf(updatetime);
915
//        String s = "group_id=" + group_id + "&password=" + MainApplication.userPassword + "&pile_code=" + pile_code + "&timer=" + token + "&type=" + type + "&user_id=" + MainApplication.userId + "&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
916
//        String url = MainApplication.url + "/zhannew/basic/web/index.php/interface/start_v2?" +
917
//                "ver=1.0&type=" + type + "&timer=" + token + "&user_id=" + MainApplication.userId + "&pile_code="
918
//                + pile_code + "&group_id=" + group_id + "&password=" + MainApplication.userPassword + "&sign=" + Md5Util.md5(s);
919
//        Log.e(TAG, "startHssy: url=" + url);
920
//        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
921
//            @Override
922
//            public void onError(Call call, Exception e) {
923
//
924
//            }
925
//
926
//            @Override
927
//            public void onResponse(String response) {
928
//                Log.e(TAG, "onResponse: startHssy=" + response);
929
//                String code = JsonUtils.getKeyResult(response, "code");
930
//                if (code.equals("200")) {
931
//                    MainApplication.isAppStart = true;
932
//                    ProfileManager.getInstance().setAppStart(getApplicationContext(), MainApplication.isAppStart);
933
//                    startActivity(new Intent(getApplicationContext(), ChargingStatusActivity.class));
934
//                    finish();
935
//                } else {
936
//                    String error_message = JsonUtils.getKeyResult(response, "error_message");
937
//                    ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
938
//                    new Handler().postDelayed(new Runnable() {
939
//                        public void run() {
940
//                            if (mCamera != null) {
941
//                                scanRestart();
942
//                            }
943
//                        }
944
//                    }, 1500);
945
//                }
946
//            }
947
//        });
948
//    }
949
//
950
//
951
//}

+ 0 - 68
app/src/main/java/com/electric/chargingpile/activity/TLDLoadingActivity.java

113
113
114
            @Override
114
            @Override
115
            public void onResponse(final String response) {
115
            public void onResponse(final String response) {
116
//                AlertDialog.Builder builder = new AlertDialog.Builder(TLDLoadingActivity.this);
117
//                builder.setTitle("提示");
118
//                builder.setMessage(response);
119
//                builder.setCancelable(false);
120
//                builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
121
//                    @Override
122
//                    public void onClick(DialogInterface dialogg, int which) {
123
//                        if (EmptyUtils.isNotEmpty(response)){
124
//                            LogUtils.e("query:"+response);
125
//                            String rtnCode = JsonUtils.getKeyResult(response,"rtnCode");
126
//                            String rtnMsg = JsonUtils.getKeyResult(response,"rtnMsg");
127
//                            if ("01".equals(rtnCode)){
128
//                                String data = JsonUtils.getKeyResult(response,"data");
129
//                                ChargingBean chargingBean = JsonUtils.parseToObjectBean(data,ChargingBean.class);
130
//                                if (chargingBean.getStatus() == 1) {
131
//                                    MainApplication.isAppStart = true;
132
//                                    ProfileManager.getInstance().setAppStart(getApplicationContext(), MainApplication.isAppStart);
133
//                                    Intent intent = new Intent(getApplicationContext(), ChargingStatusActivity.class);
134
//                                    intent.putExtra(ChargingConstants.ORDERID, orderId);
135
//                                    startActivity(intent);
136
//                                }else {
137
//                                    ToastUtil.showToast(getApplicationContext(),"当前终端无响应,请拔枪重试或更换其他充电桩",Toast.LENGTH_SHORT);
138
//                                }
139
//                            }else {
140
//                                ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
141
//                            }
142
//                            finish();
143
//                        }
144
//                    }
145
//                });
146
//                builder.setNegativeButton("取消", null);
147
//                builder.create().show();
148
116
149
                if (EmptyUtils.isNotEmpty(response)) {
117
                if (EmptyUtils.isNotEmpty(response)) {
150
                    LogUtils.e("query:" + response);
118
                    LogUtils.e("query:" + response);
171
        });
139
        });
172
    }
140
    }
173
141
174
175
//    private void startCharging(String pile_code,String group_id,String type,int time){
176
//        long appTime1 = System.currentTimeMillis() / 1000;
177
//        long updatetime = appTime1 - MainMapActivity.cha - 3;
178
//        String token = String.valueOf(updatetime);
179
//        String s = "group_id="+group_id+"&password="+MainApplication.userPassword+"&pile_code="+pile_code+"&timer="+token+"&type="+type+"&user_id="+MainApplication.userId+"&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
180
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/interface/start_v2?" +
181
//                "ver=1.0&type="+type+"&timer="+token+"&user_id="+MainApplication.userId+"&pile_code="
182
//                +pile_code+"&group_id="+group_id+"&password="+MainApplication.userPassword+"&sign="+ Md5Util.md5(s);
183
////        Log.e(TAG, "startHssy: url="+url );
184
//        OkHttpUtils.get().url(url).build().connTimeOut(time*1000).readTimeOut(time*1000).execute(new StringCallback() {
185
//            @Override
186
//            public void onError(Call call, Exception e) {
187
//                ToastUtil.showToast(getApplicationContext(),"网络异常,请检查您的网络连接",Toast.LENGTH_SHORT);
188
//                CrashReport.postCatchedException(e);
189
//            }
190
//
191
//            @Override
192
//            public void onResponse(String response) {
193
//                LogUtils.e(response);
194
//                String code = JsonUtils.getKeyResult(response,"code");
195
//                if (code.equals("200")){
196
//                    MainApplication.isAppStart = true;
197
//                    ProfileManager.getInstance().setAppStart(getApplicationContext(),MainApplication.isAppStart);
198
//                    startActivity(new Intent(getApplicationContext(),ChargingStatusActivity.class));
199
//                    finish();
200
//                }else {
201
//                    String error_message = JsonUtils.getKeyResult(response,"error_message");
202
//                    ToastUtil.showToast(getApplicationContext(), error_message, Toast.LENGTH_SHORT);
203
//                    finish();
204
//                }
205
//            }
206
//        });
207
//    }
208
209
210
}
142
}

BIN
app/src/main/res/drawable-hdpi/bg_charging_orange.png


BIN
app/src/main/res/drawable-hdpi/icon_zhan_name_orange.png


BIN
app/src/main/res/drawable-mdpi/bg_charging_orange.png


BIN
app/src/main/res/drawable-mdpi/icon_zhan_name_orange.png


BIN
app/src/main/res/drawable-xhdpi/bg_charging_orange.png


BIN
app/src/main/res/drawable-xhdpi/icon_zhan_name_orange.png


BIN
app/src/main/res/drawable-xxhdpi/bg_charging_orange.png


BIN
app/src/main/res/drawable-xxhdpi/icon_zhan_name_orange.png


BIN
app/src/main/res/drawable-xxxhdpi/bg_charging_orange.png


BIN
app/src/main/res/drawable-xxxhdpi/icon_zhan_name_orange.png


+ 10 - 0
app/src/main/res/drawable/bg_tv_stop_green.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
5
    <!-- 表示shape的四个角的角度。只适用于矩形shape,这里的角度是指圆角的程度 -->
6
    <corners android:radius="5dp" />
7
8
    <!-- 这个标签表示纯色填充,通过android:color即可指定shape中填充的颜色 -->
9
    <solid android:color="#1BB637" />
10
</shape>

+ 10 - 0
app/src/main/res/drawable/bg_tv_stop_orange.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
5
    <!-- 表示shape的四个角的角度。只适用于矩形shape,这里的角度是指圆角的程度 -->
6
    <corners android:radius="5dp" />
7
8
    <!-- 这个标签表示纯色填充,通过android:color即可指定shape中填充的颜色 -->
9
    <solid android:color="#FF985A" />
10
</shape>

+ 73 - 74
app/src/main/res/layout/activity_charging_status.xml

1
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
<LinearLayout 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
    android:orientation="vertical"
7
    android:background="@color/white"
7
    android:background="@color/white"
8
    xmlns:app="http://schemas.android.com/apk/res-auto"
8
    android:orientation="vertical"
9
    tools:context="com.electric.chargingpile.activity.ChargingStatusActivity">
9
    tools:context="com.electric.chargingpile.activity.ChargingStatusActivity">
10
10
11
    <RelativeLayout
11
    <RelativeLayout
12
        android:id="@+id/rl_title"
12
        android:id="@+id/rl_title"
13
        android:layout_width="match_parent"
13
        android:layout_width="match_parent"
14
        android:layout_height="44dp"
14
        android:layout_height="44dp"
15
        android:layout_alignParentLeft="true"
16
        android:layout_alignParentStart="true"
15
        android:layout_alignParentStart="true"
16
        android:layout_alignParentLeft="true"
17
        android:layout_alignParentTop="true"
17
        android:layout_alignParentTop="true"
18
        android:background="@color/white">
18
        android:background="@color/white">
19
19
41
            android:layout_width="wrap_content"
41
            android:layout_width="wrap_content"
42
            android:layout_height="match_parent"
42
            android:layout_height="match_parent"
43
            android:layout_alignParentRight="true"
43
            android:layout_alignParentRight="true"
44
            android:text="充电帮助"
45
            android:textSize="16sp"
46
            android:textColor="@color/lvse"
47
            android:gravity="center"
44
            android:gravity="center"
45
            android:paddingLeft="16dp"
48
            android:paddingRight="16dp"
46
            android:paddingRight="16dp"
49
            android:paddingLeft="16dp"/>
47
            android:text="充电帮助"
48
            android:textColor="@color/lvse"
49
            android:textSize="15sp" />
50
50
51
    </RelativeLayout>
51
    </RelativeLayout>
52
52
53
    <LinearLayout
53
    <LinearLayout
54
        android:id="@+id/ll_charginginfo"
54
        android:id="@+id/ll_charginginfo"
55
        android:layout_height="44dp"
56
        android:layout_width="match_parent"
55
        android:layout_width="match_parent"
56
        android:layout_height="44dp"
57
        android:layout_below="@+id/rl_circle"
57
        android:layout_marginLeft="12dp"
58
        android:layout_marginLeft="12dp"
58
        android:layout_marginRight="12dp"
59
        android:orientation="horizontal"
60
        android:layout_marginTop="26dp"
59
        android:layout_marginTop="26dp"
61
        android:layout_below="@+id/rl_circle">
60
        android:layout_marginRight="12dp"
61
        android:orientation="horizontal">
62
62
63
        <RelativeLayout
63
        <RelativeLayout
64
            android:layout_height="match_parent"
65
            android:layout_width="0dp"
64
            android:layout_width="0dp"
65
            android:layout_height="match_parent"
66
            android:layout_weight="1">
66
            android:layout_weight="1">
67
67
68
            <TextView
68
            <TextView
69
                android:layout_width="wrap_content"
69
                android:layout_width="wrap_content"
70
                android:layout_height="wrap_content"
70
                android:layout_height="wrap_content"
71
                android:text="电流(安)"
72
                android:textColor="@color/ui_68"
73
                android:textSize="12sp"
74
                android:layout_alignParentTop="true"
71
                android:layout_alignParentTop="true"
75
                android:layout_centerHorizontal="true"
72
                android:layout_centerHorizontal="true"
76
                android:layout_gravity="center" />
73
                android:layout_gravity="center"
74
                android:text="电流(安)"
75
                android:textColor="@color/ui_68"
76
                android:textSize="12sp" />
77
77
78
            <TextView
78
            <TextView
79
                android:id="@+id/tv_dianliu"
79
                android:id="@+id/tv_dianliu"
80
                android:layout_width="wrap_content"
80
                android:layout_width="wrap_content"
81
                android:layout_height="wrap_content"
81
                android:layout_height="wrap_content"
82
                android:text="--"
83
                android:layout_alignParentBottom="true"
82
                android:layout_alignParentBottom="true"
84
                android:layout_centerHorizontal="true"
83
                android:layout_centerHorizontal="true"
84
                android:text="--"
85
                android:textColor="@color/ui_65"
85
                android:textColor="@color/ui_65"
86
                android:textSize="17sp" />
86
                android:textSize="17sp" />
87
87
88
88
89
90
91
        </RelativeLayout>
89
        </RelativeLayout>
92
90
93
        <View
91
        <View
94
            android:layout_width="0.5dp"
92
            android:layout_width="0.5dp"
95
            android:layout_height="match_parent"
93
            android:layout_height="match_parent"
96
            android:background="@color/ui_6d"/>
94
            android:background="@color/ui_6d" />
97
95
98
        <RelativeLayout
96
        <RelativeLayout
99
            android:layout_height="match_parent"
100
            android:layout_width="0dp"
97
            android:layout_width="0dp"
98
            android:layout_height="match_parent"
101
            android:layout_weight="1">
99
            android:layout_weight="1">
102
100
103
            <TextView
101
            <TextView
104
                android:layout_width="wrap_content"
102
                android:layout_width="wrap_content"
105
                android:layout_height="wrap_content"
103
                android:layout_height="wrap_content"
104
                android:layout_alignParentTop="true"
105
                android:layout_centerHorizontal="true"
106
                android:text="电压(伏)"
106
                android:text="电压(伏)"
107
                android:textColor="@color/ui_68"
107
                android:textColor="@color/ui_68"
108
                android:textSize="12sp"
109
                android:layout_alignParentTop="true"
110
                android:layout_centerHorizontal="true" />
108
                android:textSize="12sp" />
111
109
112
            <TextView
110
            <TextView
113
                android:id="@+id/tv_dianya"
111
                android:id="@+id/tv_dianya"
114
                android:layout_width="wrap_content"
112
                android:layout_width="wrap_content"
115
                android:layout_height="wrap_content"
113
                android:layout_height="wrap_content"
114
                android:layout_alignParentBottom="true"
115
                android:layout_centerHorizontal="true"
116
                android:text="--"
116
                android:text="--"
117
                android:textColor="@color/ui_65"
117
                android:textColor="@color/ui_65"
118
                android:textSize="17sp"
119
                android:layout_alignParentBottom="true"
120
                android:layout_centerHorizontal="true"/>
118
                android:textSize="17sp" />
121
119
122
        </RelativeLayout>
120
        </RelativeLayout>
123
121
124
        <View
122
        <View
125
            android:layout_width="0.5dp"
123
            android:layout_width="0.5dp"
126
            android:layout_height="match_parent"
124
            android:layout_height="match_parent"
127
            android:background="@color/ui_6d"/>
125
            android:background="@color/ui_6d" />
128
126
129
        <RelativeLayout
127
        <RelativeLayout
130
            android:layout_height="match_parent"
131
            android:layout_width="0dp"
128
            android:layout_width="0dp"
129
            android:layout_height="match_parent"
132
            android:layout_weight="1">
130
            android:layout_weight="1">
133
131
134
            <TextView
132
            <TextView
135
                android:layout_width="wrap_content"
133
                android:layout_width="wrap_content"
136
                android:layout_height="wrap_content"
134
                android:layout_height="wrap_content"
135
                android:layout_alignParentTop="true"
136
                android:layout_centerHorizontal="true"
137
                android:text="充电进程"
137
                android:text="充电进程"
138
                android:textColor="@color/ui_68"
138
                android:textColor="@color/ui_68"
139
                android:textSize="12sp"
140
                android:layout_alignParentTop="true"
141
                android:layout_centerHorizontal="true" />
139
                android:textSize="12sp" />
142
140
143
            <TextView
141
            <TextView
144
                android:id="@+id/tv_jindu"
142
                android:id="@+id/tv_jindu"
145
                android:layout_width="wrap_content"
143
                android:layout_width="wrap_content"
146
                android:layout_height="wrap_content"
144
                android:layout_height="wrap_content"
145
                android:layout_alignParentBottom="true"
146
                android:layout_centerHorizontal="true"
147
                android:text="--"
147
                android:text="--"
148
                android:textColor="@color/ui_65"
148
                android:textColor="@color/ui_65"
149
                android:textSize="17sp"
150
                android:layout_alignParentBottom="true"
151
                android:layout_centerHorizontal="true"/>
149
                android:textSize="17sp" />
152
150
153
        </RelativeLayout>
151
        </RelativeLayout>
154
152
159
        android:layout_width="172dp"
157
        android:layout_width="172dp"
160
        android:layout_height="172dp"
158
        android:layout_height="172dp"
161
        android:layout_centerHorizontal="true"
159
        android:layout_centerHorizontal="true"
160
        android:layout_gravity="center_horizontal"
162
        android:layout_marginTop="40dp"
161
        android:layout_marginTop="40dp"
163
        android:background="@drawable/bg_charging"
164
        android:layout_gravity="center_horizontal">
162
        android:background="@drawable/bg_charging">
165
163
166
        <me.itangqi.waveloadingview.WaveLoadingView
164
        <me.itangqi.waveloadingview.WaveLoadingView
167
            android:id="@+id/waveLoadingView"
165
            android:id="@+id/waveLoadingView"
168
            android:layout_width="match_parent"
166
            android:layout_width="match_parent"
169
            android:layout_height="match_parent"
167
            android:layout_height="match_parent"
170
            app:wlv_borderColor="#00ffffff"
168
            app:wlv_borderColor="#00ffffff"
171
            app:wlv_wave_background_Color="#00ffffff"
172
            app:wlv_borderWidth="1dp"
169
            app:wlv_borderWidth="1dp"
173
            app:wlv_shapeType="circle"
174
            app:wlv_round_rectangle="false"
170
            app:wlv_round_rectangle="false"
171
            app:wlv_shapeType="circle"
175
            app:wlv_titleCenterStrokeColor="@android:color/holo_blue_dark"
172
            app:wlv_titleCenterStrokeColor="@android:color/holo_blue_dark"
176
            app:wlv_titleCenterStrokeWidth="3dp"
173
            app:wlv_titleCenterStrokeWidth="3dp"
177
            app:wlv_waveAmplitude="60"
174
            app:wlv_waveAmplitude="60"
178
            app:wlv_waveColor="#3fffffff"/>
175
            app:wlv_waveColor="#3fffffff"
176
            app:wlv_wave_background_Color="#00ffffff" />
179
177
180
178
181
        <!--<com.loonggg.circleprogressbarlibrary.view.CircleProgressBar-->
179
        <!--<com.loonggg.circleprogressbarlibrary.view.CircleProgressBar-->
182
            <!--android:id="@+id/pb"-->
183
            <!--android:layout_width="143dp"-->
184
            <!--android:layout_height="143dp"-->
185
            <!--android:visibility="gone"-->
186
            <!--android:layout_centerInParent="true"-->
187
            <!--loonggg:bgProgressBarColor="#efefef"-->
188
            <!--loonggg:circleStrokeWidth="5dp" />-->
180
        <!--android:id="@+id/pb"-->
181
        <!--android:layout_width="143dp"-->
182
        <!--android:layout_height="143dp"-->
183
        <!--android:visibility="gone"-->
184
        <!--android:layout_centerInParent="true"-->
185
        <!--loonggg:bgProgressBarColor="#efefef"-->
186
        <!--loonggg:circleStrokeWidth="5dp" />-->
189
187
190
        <LinearLayout
188
        <LinearLayout
191
            android:layout_width="wrap_content"
189
            android:layout_width="wrap_content"
221
        android:layout_width="wrap_content"
219
        android:layout_width="wrap_content"
222
        android:layout_height="wrap_content"
220
        android:layout_height="wrap_content"
223
        android:layout_gravity="center_horizontal"
221
        android:layout_gravity="center_horizontal"
224
        android:gravity="center_vertical"
225
        android:textColor="@color/ui_62"
222
        android:layout_marginTop="33dp"
226
        android:drawableLeft="@drawable/icon_zhan_name"
223
        android:drawableLeft="@drawable/icon_zhan_name"
227
        android:drawablePadding="8dp"
224
        android:drawablePadding="8dp"
225
        android:gravity="center_vertical"
228
        android:text=""
226
        android:text=""
229
        android:textSize="18sp"
230
        android:layout_marginTop="33dp" />
227
        android:textColor="@color/ui_62"
228
        android:textSize="18sp" />
231
229
232
    <LinearLayout
230
    <LinearLayout
233
        android:layout_width="match_parent"
231
        android:layout_width="match_parent"
243
            <TextView
241
            <TextView
244
                android:layout_width="wrap_content"
242
                android:layout_width="wrap_content"
245
                android:layout_height="wrap_content"
243
                android:layout_height="wrap_content"
244
                android:layout_alignParentTop="true"
245
                android:layout_centerHorizontal="true"
246
                android:text="充电时长"
246
                android:text="充电时长"
247
                android:textSize="12sp"
248
                android:textColor="@color/ui_68"
247
                android:textColor="@color/ui_68"
249
                android:layout_alignParentTop="true"
250
                android:layout_centerHorizontal="true"/>
248
                android:textSize="12sp" />
251
249
252
            <TextView
250
            <TextView
253
                android:id="@+id/tv_time"
251
                android:id="@+id/tv_time"
254
                android:layout_width="wrap_content"
252
                android:layout_width="wrap_content"
255
                android:layout_height="wrap_content"
253
                android:layout_height="wrap_content"
256
                android:layout_alignParentBottom="true"
254
                android:layout_alignParentBottom="true"
255
                android:layout_centerHorizontal="true"
257
                android:text="--"
256
                android:text="--"
258
                android:textSize="21sp"
259
                android:textColor="@color/ui_62"
257
                android:textColor="@color/ui_62"
260
                android:layout_centerHorizontal="true"/>
258
                android:textSize="21sp" />
261
259
262
        </RelativeLayout>
260
        </RelativeLayout>
263
261
264
        <View
262
        <View
265
            android:layout_width="0.5dp"
263
            android:layout_width="0.5dp"
266
            android:layout_height="match_parent"
264
            android:layout_height="match_parent"
267
            android:background="@color/ui_6d"/>
265
            android:background="@color/ui_6d" />
268
266
269
        <RelativeLayout
267
        <RelativeLayout
270
            android:layout_width="0dp"
268
            android:layout_width="0dp"
274
            <TextView
272
            <TextView
275
                android:layout_width="wrap_content"
273
                android:layout_width="wrap_content"
276
                android:layout_height="wrap_content"
274
                android:layout_height="wrap_content"
275
                android:layout_alignParentTop="true"
276
                android:layout_centerHorizontal="true"
277
                android:text="充电金额"
277
                android:text="充电金额"
278
                android:textSize="12sp"
279
                android:textColor="@color/ui_68"
278
                android:textColor="@color/ui_68"
280
                android:layout_alignParentTop="true"
281
                android:layout_centerHorizontal="true" />
279
                android:textSize="12sp" />
282
280
283
            <TextView
281
            <TextView
284
                android:id="@+id/tv_cost"
282
                android:id="@+id/tv_cost"
286
                android:layout_height="wrap_content"
284
                android:layout_height="wrap_content"
287
                android:layout_alignParentBottom="true"
285
                android:layout_alignParentBottom="true"
288
                android:layout_centerHorizontal="true"
286
                android:layout_centerHorizontal="true"
287
                android:layout_centerVertical="true"
289
                android:text="--"
288
                android:text="--"
290
                android:textSize="21sp"
291
                android:textColor="@color/ui_62"
289
                android:textColor="@color/ui_62"
292
                android:layout_centerVertical="true"/>
290
                android:textSize="21sp" />
293
291
294
        </RelativeLayout>
292
        </RelativeLayout>
295
293
296
    </LinearLayout>
294
    </LinearLayout>
297
295
298
296
299
300
    <RelativeLayout
297
    <RelativeLayout
301
        android:layout_width="match_parent"
298
        android:layout_width="match_parent"
302
        android:layout_height="match_parent">
299
        android:layout_height="match_parent">
309
            android:layout_alignParentRight="true"
306
            android:layout_alignParentRight="true"
310
            android:layout_marginTop="21dp"
307
            android:layout_marginTop="21dp"
311
            android:layout_marginRight="13dp"
308
            android:layout_marginRight="13dp"
312
            android:visibility="gone"/>
309
            android:visibility="gone" />
313
310
314
        <TextView
311
        <TextView
315
            android:id="@+id/tv_activity"
312
            android:id="@+id/tv_activity"
319
            android:layout_centerHorizontal="true"
316
            android:layout_centerHorizontal="true"
320
            android:paddingTop="20dp"
317
            android:paddingTop="20dp"
321
            android:paddingBottom="15dp"
318
            android:paddingBottom="15dp"
322
            android:textSize="14sp"
323
            android:text=""
319
            android:text=""
324
            android:textColor="#ffa900"
320
            android:textColor="#ffa900"
325
            android:visibility="visible"/>
321
            android:textSize="14sp"
322
            android:visibility="visible" />
326
323
327
        <TextView
324
        <TextView
328
            android:id="@+id/tv_stop"
325
            android:id="@+id/tv_stop"
329
            android:layout_width="165dp"
330
            android:layout_height="39dp"
331
            android:background="@drawable/bg_text_yuanlvline_whitebg"
332
            android:text="结束充电"
326
            android:layout_width="match_parent"
327
            android:layout_height="40dp"
328
            android:layout_alignParentBottom="true"
329
            android:layout_marginLeft="15dp"
330
            android:layout_marginRight="15dp"
331
            android:layout_marginBottom="15dp"
332
            android:background="@drawable/bg_tv_stop_green"
333
            android:gravity="center"
333
            android:gravity="center"
334
            android:layout_centerInParent="true"
335
            android:textSize="16sp"
336
            android:textColor="@color/lvse"/>
337
334
            android:text="结束充电"
335
            android:textColor="@color/white"
336
            android:textSize="16sp" />
338
    </RelativeLayout>
337
    </RelativeLayout>
339
338
340
</LinearLayout>
339
</LinearLayout>

+ 0 - 87
zxing/src/main/java/com/google/zxing/client/android/CaptureActivity.java

1388
            }
1388
            }
1389
        });
1389
        });
1390
    }
1390
    }
1391
1392
//    private void getChargingPile(final String result){
1393
//        String web_url = url+"/zhannew/basic/web/index.php/interface/info?flag=1&user_id="+user_id+"&url="+result;
1394
//        Log.e(TAG, web_url );
1395
//        OkHttpUtils.get().url(web_url).build().execute(new StringCallback() {
1396
//            @Override
1397
//            public void onError(Call call, Exception e) {
1398
//
1399
//            }
1400
//
1401
//            @Override
1402
//            public void onResponse(String response) {
1403
//                if (loadingDialog.isShowing()){
1404
//                    loadingDialog.dismiss();
1405
//                }
1406
//                Log.e(TAG, "onResponse: getChargingPile11="+response );
1407
//                String code = JsonUtils.getKeyResult(response,"code");
1408
//                if (code.equals("200")){
1409
//                    String group_id = JsonUtils.getKeyResult(response,"group_id");
1410
//                    String eletype = JsonUtils.getKeyResult(response,"eletype");
1411
//                    String type = JsonUtils.getKeyResult(response,"type");
1412
//                    String pile_code = JsonUtils.getKeyResult(response,"pile_code");
1413
//                    if (type.equals("jd")){
1414
//                        startHssy(pile_code,group_id,type);
1415
//                    }else {
1416
//                        Intent intent = new Intent();
1417
//                        intent.setClassName("com.electric.chargingpile", "com.electric.chargingpile.activity.TLDLoadingActivity");
1418
//                        intent.putExtra("type",type);
1419
//                        intent.putExtra("eletype",eletype);
1420
//                        intent.putExtra("chargingCode",pile_code);
1421
//                        intent.putExtra("group_id",group_id);
1422
//                        startActivity(intent);
1423
//                        finish();
1424
//                    }
1425
//
1426
//                }else {
1427
//                    String error_message = JsonUtils.getKeyResult(response,"error_message");
1428
////                    ToastUtils.showShort("");
1429
//                    ToastUtil.showToast(getApplicationContext(),error_message,Toast.LENGTH_SHORT);
1430
//                    new Handler().postDelayed(new Runnable() {
1431
//                        public void run() {
1432
//                            restartPreviewAfterDelay(0L);
1433
//                        }
1434
//                    }, 1500);
1435
//                }
1436
//            }
1437
//        });
1438
//    }
1439
//
1440
//    private void startHssy(String pile_code,String group_id,String type){
1441
//        long appTime1 = System.currentTimeMillis() / 1000;
1442
//        long updatetime = appTime1 - cha - 3;
1443
//        String token = String.valueOf(updatetime);
1444
//        String s = "group_id="+group_id+"&password="+user_password+"&pile_code="+pile_code+"&timer="+token+"&type="+type+"&user_id="+user_id+"&key=661f9efdcb4f46fe7ab5f2e78a705a2a";
1445
//        String web_url = url+"/zhannew/basic/web/index.php/interface/start_v2?" +
1446
//                "ver=1.0&type="+type+"&timer="+token+"&user_id="+user_id+"&pile_code="
1447
//                +pile_code+"&group_id="+group_id+"&password="+user_password+"&sign="+ Md5Util.md5(s);
1448
//        Log.e(TAG, "startHssy: url="+web_url );
1449
//        OkHttpUtils.get().url(web_url).build().execute(new StringCallback() {
1450
//            @Override
1451
//            public void onError(Call call, Exception e) {
1452
//
1453
//            }
1454
//
1455
//            @Override
1456
//            public void onResponse(String response) {
1457
//                Log.e(TAG, "onResponse: startHssy="+response );
1458
//                String code = JsonUtils.getKeyResult(response,"code");
1459
//                if (code.equals("200")){
1460
//                    Intent intent = new Intent();
1461
//                    intent.setClassName("com.electric.chargingpile", "com.electric.chargingpile.activity.ChargingStatusActivity");
1462
//                    startActivity(intent);
1463
//                    finish();
1464
//                }else {
1465
//                    String error_message = JsonUtils.getKeyResult(response,"error_message");
1466
//                    ToastUtil.showToast(getApplicationContext(),error_message,Toast.LENGTH_SHORT);
1467
//                    new Handler().postDelayed(new Runnable() {
1468
//                        public void run() {
1469
//                            restartPreviewAfterDelay(0L);
1470
//                        }
1471
//                    }, 1500);
1472
//                }
1473
//            }
1474
//        });
1475
//    }
1476
1477
1478
}
1391
}

推荐功能开发 · d495da0a56 - Gogs: Go Git Service
Sfoglia il codice sorgente

推荐功能开发

huyuguo 6 anni fa
parent
commit
d495da0a56

+ 2 - 2
README.md

13
13
14
## 列表(地图首页右上角,旧功能由推荐替换)
14
## 列表(地图首页右上角,旧功能由推荐替换)
15
ZhanListActivity.java   
15
ZhanListActivity.java   
16
activity_main_map.xml
16
activity_zhan_list.xml
17
17
18
## 推荐
18
## 推荐
19
RecommendChargingStationActivity.java
19
RecommendChargingStationActivity.java  
20
activity_recommend_charging_station.xml
20
activity_recommend_charging_station.xml
21
21

+ 239 - 238
app/src/main/AndroidManifest.xml

4
    android:versionCode="80"
4
    android:versionCode="80"
5
    android:versionName="3.4.2">
5
    android:versionName="3.4.2">
6
    <!-- 极光 -->
6
    <!-- 极光 -->
7
    <permission
8
        android:name="${applicationId}.permission.JPUSH_MESSAGE"
9
        android:protectionLevel="signature" /> <!-- 往SDCard写入数据权限 -->
10
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
12
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
13
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
14
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
15
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
16
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
17
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
18
    <uses-permission android:name="android.permission.INTERNET" />
19
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
20
    <uses-permission android:name="android.permission.WAKE_LOCK" />
21
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
22
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
23
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
24
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
25
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
26
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
27
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
28
    <uses-permission android:name="android.permission.CALL_PHONE" />
29
    <uses-permission android:name="android.permission.CAMERA" />
30
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
31
    <uses-permission android:name="android.permission.GET_TASKS" />
32
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
33
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
34
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
35
    <uses-permission android:name="android.permission.READ_LOGS" />
36
    <uses-permission android:name="android.permission.VIBRATE" />
37
    <uses-permission android:name="android.permission.INTERNET" />
38
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- 极光 -->
39
    <uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
40
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
41
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
42
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
43
    <!-- <uses-permission android:name="android.permission.WAKE_LOCK" /> -->
44
    <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" /> -->
45
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
46
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
47
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
48
    <uses-permission android:name="android.permission.VIBRATE" /> <!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> -->
49
    <!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
50
    <!-- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> -->
51
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 极光 -->
52
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
53
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
54
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
55
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
56
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
57
    <uses-permission android:name="android.permission.REORDER_TASKS" /> <!-- 【常用】 信鸽SDK所需权限 -->
58
    <!-- <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> -->
59
    <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
60
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
61
    <!-- 【可选】 信鸽SDK所需权限 -->
62
    <!-- <uses-permission android:name="android.permission.RESTART_PACKAGES" /> -->
63
    <!-- <uses-permission android:name="android.permission.BROADCAST_STICKY" /> -->
64
    <!-- <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> -->
65
    <!-- <uses-permission android:name="android.permission.READ_LOGS" /> -->
66
    <!-- <uses-permission android:name="android.permission.BATTERY_STATS" /> -->
67
    <!-- 蓝牙分享所需的权限 -->
68
    <!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
69
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> -->
70
    <!-- 权限 :  GPS定位 -->
71
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
72
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
73
    <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
74
75
    <uses-feature android:name="android.hardware.camera" />
76
    <uses-feature android:name="android.hardware.camera.autofocus" /> <!-- 权限 : AGPS定位 -->
77
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
78
79
    <application
7
    <application
80
        android:name=".application.MainApplication"
8
        android:name=".application.MainApplication"
81
        android:allowBackup="true"
9
        android:allowBackup="true"
84
        android:largeHeap="true"
12
        android:largeHeap="true"
85
        android:resizeableActivity="true"
13
        android:resizeableActivity="true"
86
        android:theme="@style/AppTheme">
14
        android:theme="@style/AppTheme">
15
        <activity android:name=".activity.RecommendChargingStationActivity"></activity>
87
        <activity
16
        <activity
88
            android:name=".activity.ChatContentListActivity"
17
            android:name=".activity.ChatContentListActivity"
89
            android:screenOrientation="portrait"></activity>
18
            android:screenOrientation="portrait" />
90
        <activity android:name=".activity.UserPageActivity" />
19
        <activity android:name=".activity.UserPageActivity" />
91
20
92
        <meta-data
93
            android:name="com.amap.api.v2.apikey"
94
            android:value="fabcfbf869745789b151d0c88e9b4807" />
95
        <meta-data
96
            android:name="com.baidu.lbsapi.API_KEY"
97
            android:value="qmitBFE5Am7H53UVylGwG6b0" /> <!-- android:value="Zl49XczhF1ZFHSWFyBEnGYVz" />开发 -->
98
        <meta-data
99
            android:name="design_width"
100
            android:value="1080" />
101
        <meta-data
102
            android:name="design_height"
103
            android:value="1920" />
104
105
        <provider
106
            android:name="android.support.v4.content.FileProvider"
107
            android:authorities="${applicationId}.provider"
108
            android:exported="false"
109
            android:grantUriPermissions="true">
110
            <meta-data
111
                android:name="android.support.FILE_PROVIDER_PATHS"
112
                android:resource="@xml/provider_paths" />
113
        </provider> <!-- <provider -->
114
        <!-- android:name="android.support.v4.content.FileProvider" -->
115
        <!-- android:authorities="com.electric.chargingpile.fileprovider" -->
116
        <!-- android:exported="true" -->
117
        <!-- android:grantUriPermissions="true"> -->
118
        <!-- &lt;!&ndash;<meta-data&ndash;&gt; -->
119
        <!-- &lt;!&ndash;android:name="android.support.FILE_PROVIDER_PATHS"&ndash;&gt; -->
120
        <!-- &lt;!&ndash;android:resource="@xml/filepaths" />&ndash;&gt; -->
121
        <!-- </provider> -->
122
        <activity
21
        <activity
123
            android:name=".activity.WelcomeActivity"
22
            android:name=".activity.WelcomeActivity"
124
            android:configChanges="keyboardHidden|orientation"
23
            android:configChanges="keyboardHidden|orientation"
139
            android:label="@string/main_name"
38
            android:label="@string/main_name"
140
            android:launchMode="singleTask"
39
            android:launchMode="singleTask"
141
            android:screenOrientation="portrait"
40
            android:screenOrientation="portrait"
142
            android:windowSoftInputMode="stateHidden|adjustUnspecified" />
41
            android:windowSoftInputMode="stateHidden|adjustUnspecified" /> <!-- android:value="Zl49XczhF1ZFHSWFyBEnGYVz" />开发 -->
143
        <activity
42
        <activity
144
            android:name=".activity.RegisterActivity"
43
            android:name=".activity.RegisterActivity"
145
            android:configChanges="keyboardHidden|orientation"
44
            android:configChanges="keyboardHidden|orientation"
154
            android:launchMode="singleTop"
53
            android:launchMode="singleTop"
155
            android:screenOrientation="portrait"
54
            android:screenOrientation="portrait"
156
            android:windowSoftInputMode="stateHidden|adjustUnspecified" />
55
            android:windowSoftInputMode="stateHidden|adjustUnspecified" />
56
157
        <activity
57
        <activity
158
            android:name=".activity.FeedbackActivity"
58
            android:name=".activity.FeedbackActivity"
159
            android:configChanges="keyboardHidden|orientation"
59
            android:configChanges="keyboardHidden|orientation"
160
            android:label="@string/feedback_name"
60
            android:label="@string/feedback_name"
161
            android:launchMode="singleTop"
61
            android:launchMode="singleTop"
162
            android:screenOrientation="portrait"
62
            android:screenOrientation="portrait"
163
            android:windowSoftInputMode="stateHidden|adjustUnspecified" />
63
            android:windowSoftInputMode="stateHidden|adjustUnspecified" /> <!-- <provider -->
64
        <!-- android:name="android.support.v4.content.FileProvider" -->
65
        <!-- android:authorities="com.electric.chargingpile.fileprovider" -->
66
        <!-- android:exported="true" -->
67
        <!-- android:grantUriPermissions="true"> -->
68
        <!-- &lt;!&ndash;<meta-data&ndash;&gt; -->
69
        <!-- &lt;!&ndash;android:name="android.support.FILE_PROVIDER_PATHS"&ndash;&gt; -->
70
        <!-- &lt;!&ndash;android:resource="@xml/filepaths" />&ndash;&gt; -->
71
        <!-- </provider> -->
164
        <activity
72
        <activity
165
            android:name=".activity.AboutActivity"
73
            android:name=".activity.AboutActivity"
166
            android:configChanges="keyboardHidden|orientation"
74
            android:configChanges="keyboardHidden|orientation"
181
            android:label="@string/my_search_name"
89
            android:label="@string/my_search_name"
182
            android:launchMode="singleTop"
90
            android:launchMode="singleTop"
183
            android:screenOrientation="portrait"
91
            android:screenOrientation="portrait"
184
            android:windowSoftInputMode="adjustResize" /> <!-- 微信分享回调 -->
92
            android:windowSoftInputMode="adjustResize" />
185
        <activity
93
        <activity
186
            android:name=".wxapi.WXEntryActivity"
94
            android:name=".wxapi.WXEntryActivity"
187
            android:configChanges="keyboardHidden|orientation|screenSize"
95
            android:configChanges="keyboardHidden|orientation|screenSize"
194
            android:exported="true"
102
            android:exported="true"
195
            android:screenOrientation="portrait"
103
            android:screenOrientation="portrait"
196
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
104
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
197
198
        <meta-data
199
            android:name="UMENG_APPKEY"
200
            android:value="54c65228fd98c583210001c9" />
201
        <meta-data
202
            android:name="UMENG_CHANNEL"
203
            android:value="${UMENG_CHANNEL_VALUE}" />
204
205
        <activity
105
        <activity
206
            android:name=".activity.AlterOneActivity"
106
            android:name=".activity.AlterOneActivity"
207
            android:configChanges="keyboardHidden|orientation|screenSize"
107
            android:configChanges="keyboardHidden|orientation|screenSize"
222
            android:label="@string/title_activity_share_two"
122
            android:label="@string/title_activity_share_two"
223
            android:launchMode="singleTask"
123
            android:launchMode="singleTask"
224
            android:screenOrientation="portrait"
124
            android:screenOrientation="portrait"
225
            android:windowSoftInputMode="adjustPan" />
125
            android:windowSoftInputMode="adjustPan" /> <!-- 微信分享回调 -->
226
        <activity
126
        <activity
227
            android:name=".activity.ZhanDetailsNew"
127
            android:name=".activity.ZhanDetailsNew"
228
            android:label="@string/title_activity_zhan_details_new"
128
            android:label="@string/title_activity_zhan_details_new"
235
            android:label="@string/title_activity_my_share"
135
            android:label="@string/title_activity_my_share"
236
            android:launchMode="singleTop"
136
            android:launchMode="singleTop"
237
            android:screenOrientation="portrait" />
137
            android:screenOrientation="portrait" />
138
238
        <activity
139
        <activity
239
            android:name=".activity.MyCollectActivity"
140
            android:name=".activity.MyCollectActivity"
240
            android:configChanges="keyboardHidden|orientation"
141
            android:configChanges="keyboardHidden|orientation"
245
            android:name=".activity.MyAlterActivity"
146
            android:name=".activity.MyAlterActivity"
246
            android:label="@string/title_activity_my_alter"
147
            android:label="@string/title_activity_my_alter"
247
            android:screenOrientation="portrait" />
148
            android:screenOrientation="portrait" />
149
248
        <activity
150
        <activity
249
            android:name=".activity.LoginActivity"
151
            android:name=".activity.LoginActivity"
250
            android:label="@string/title_activity_login"
152
            android:label="@string/title_activity_login"
485
        <activity
387
        <activity
486
            android:name=".activity.ZoomingPhotoTextActivity"
388
            android:name=".activity.ZoomingPhotoTextActivity"
487
            android:launchMode="singleTask"
389
            android:launchMode="singleTask"
390
            android:screenOrientation="portrait" />
391
        <activity
392
            android:name=".activity.FindActivity"
393
            android:launchMode="singleTask"
394
            android:screenOrientation="portrait" />
395
        <activity
396
            android:name=".activity.ShareMapActivity"
397
            android:screenOrientation="portrait" />
398
        <activity
399
            android:name=".activity.ChargeCostWayActivity"
400
            android:screenOrientation="portrait" />
401
        <activity
402
            android:name=".activity.EDaiJiaActivity"
403
            android:screenOrientation="portrait" />
404
        <activity
405
            android:name=".activity.HomeAdActivity"
406
            android:screenOrientation="portrait" />
407
        <activity
408
            android:name=".activity.HomeWebActivity"
409
            android:screenOrientation="portrait" />
410
        <activity
411
            android:name=".activity.WebQianDaoActivity"
488
            android:screenOrientation="portrait" /> <!-- 【必须】 信鸽receiver广播接收 -->
412
            android:screenOrientation="portrait" /> <!-- 【必须】 信鸽receiver广播接收 -->
489
        <!-- <receiver -->
413
        <!-- <receiver -->
490
        <!-- android:name="com.tencent.android.tpush.XGPushReceiver" -->
414
        <!-- android:name="com.tencent.android.tpush.XGPushReceiver" -->
512
        <!-- <action android:name="android.intent.action" /> -->
436
        <!-- <action android:name="android.intent.action" /> -->
513
        <!-- </intent-filter> -->
437
        <!-- </intent-filter> -->
514
        <!-- </activity> -->
438
        <!-- </activity> -->
515
        <service android:name="com.amap.api.location.APSService" /> <!-- 【必须】 信鸽service -->
439
        <activity
440
            android:name=".activity.SwitchCityActivity"
441
            android:screenOrientation="portrait" /> <!-- 【必须】 信鸽service -->
516
        <!-- <service -->
442
        <!-- <service -->
517
        <!-- android:name="com.tencent.android.tpush.service.XGPushService" -->
443
        <!-- android:name="com.tencent.android.tpush.service.XGPushService" -->
518
        <!-- android:exported="true" -->
444
        <!-- android:exported="true" -->
535
        <!-- android:name="XG_V2_ACCESS_KEY" -->
461
        <!-- android:name="XG_V2_ACCESS_KEY" -->
536
        <!-- android:value="AT7Q84BLL26L" /> -->
462
        <!-- android:value="AT7Q84BLL26L" /> -->
537
        <activity
463
        <activity
538
            android:name=".activity.FindActivity"
539
            android:launchMode="singleTask"
540
            android:screenOrientation="portrait" />
541
        <activity
542
            android:name=".activity.ShareMapActivity"
543
            android:screenOrientation="portrait" />
544
        <activity
545
            android:name=".activity.ChargeCostWayActivity"
546
            android:screenOrientation="portrait" />
547
        <activity
548
            android:name=".activity.EDaiJiaActivity"
549
            android:screenOrientation="portrait" />
550
        <activity
551
            android:name=".activity.HomeAdActivity"
552
            android:screenOrientation="portrait" />
553
        <activity
554
            android:name=".activity.HomeWebActivity"
555
            android:screenOrientation="portrait" />
556
        <activity
557
            android:name=".activity.WebQianDaoActivity"
558
            android:screenOrientation="portrait" />
559
        <activity
560
            android:name=".activity.SwitchCityActivity"
561
            android:screenOrientation="portrait" />
562
        <activity
563
            android:name=".activity.MainMapActivity"
464
            android:name=".activity.MainMapActivity"
564
            android:launchMode="singleTask"
465
            android:launchMode="singleTask"
565
            android:screenOrientation="portrait" />
466
            android:screenOrientation="portrait" />
584
        <activity
485
        <activity
585
            android:name=".activity.MainScanActivity"
486
            android:name=".activity.MainScanActivity"
586
            android:screenOrientation="portrait" />
487
            android:screenOrientation="portrait" />
587
        <!--
588
 ATTENTION: This was auto-generated to add Google Play services to your project for
589
     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information.
590
        -->
591
        <meta-data
592
            android:name="com.google.android.gms.version"
593
            android:value="@integer/google_play_services_version" />
594
595
        <activity
488
        <activity
596
            android:name=".activity.OderDetailsActivity"
489
            android:name=".activity.OderDetailsActivity"
597
            android:screenOrientation="portrait" />
490
            android:screenOrientation="portrait" />
601
        <activity
494
        <activity
602
            android:name=".activity.InputCodeActivity"
495
            android:name=".activity.InputCodeActivity"
603
            android:exported="true"
496
            android:exported="true"
604
            android:screenOrientation="portrait" /> <!-- <intent-filter > -->
605
        <!-- &lt;!&ndash; action随便设置,但必须保证唯一 &ndash;&gt; -->
606
        <!-- <action android:name="input_code"/> -->
607
        <!-- <category android:name="android.intent.category.DEFAULT"/> -->
608
        <!-- </intent-filter> -->
609
        <!-- <activity android:name=".wxapi.WXPayEntryActivity"/> -->
497
            android:screenOrientation="portrait" />
610
        <activity
498
        <activity
611
            android:name=".activity.H5Activity"
499
            android:name=".activity.H5Activity"
612
            android:screenOrientation="portrait" />
500
            android:screenOrientation="portrait" />
621
            android:screenOrientation="portrait" />
509
            android:screenOrientation="portrait" />
622
        <activity
510
        <activity
623
            android:name=".activity.CreditActivity"
511
            android:name=".activity.CreditActivity"
624
            android:screenOrientation="portrait" /> <!-- 极光 -->
512
            android:screenOrientation="portrait" />
513
        <!--
514
 ATTENTION: This was auto-generated to add Google Play services to your project for
515
     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information.
516
        -->
625
        <activity
517
        <activity
626
            android:name="cn.jpush.android.ui.PopWinActivity"
518
            android:name="cn.jpush.android.ui.PopWinActivity"
627
            android:exported="false"
519
            android:exported="false"
628
            android:theme="@style/MyDialogStyle" />
520
            android:theme="@style/MyDialogStyle" />
521
629
        <activity
522
        <activity
630
            android:name="cn.jpush.android.ui.PushActivity"
523
            android:name="cn.jpush.android.ui.PushActivity"
631
            android:configChanges="orientation|keyboardHidden"
524
            android:configChanges="orientation|keyboardHidden"
638
                <category android:name="${applicationId}" />
531
                <category android:name="${applicationId}" />
639
            </intent-filter>
532
            </intent-filter>
640
        </activity>
533
        </activity>
641
642
        <service android:name="com.amap.api.location.APSService" />
643
        <service
644
            android:name="cn.jpush.android.service.DownloadService"
645
            android:enabled="true"
646
            android:exported="false" />
647
        <service
648
            android:name="cn.jpush.android.service.PushService"
649
            android:enabled="true"
650
            android:exported="false">
651
            <intent-filter>
652
                <action android:name="cn.jpush.android.intent.REGISTER" />
653
                <action android:name="cn.jpush.android.intent.REPORT" />
654
                <action android:name="cn.jpush.android.intent.PushService" />
655
                <action android:name="cn.jpush.android.intent.PUSH_TIME" />
656
            </intent-filter>
657
        </service>
658
        <service
659
            android:name="cn.jpush.android.service.DaemonService"
660
            android:enabled="true"
661
            android:exported="true">
662
            <intent-filter>
663
                <action android:name="cn.jpush.android.intent.DaemonService" />
664
665
                <category android:name="${applicationId}" />
666
            </intent-filter>
667
        </service>
668
669
        <receiver
670
            android:name="cn.jpush.android.service.PushReceiver"
671
            android:enabled="true"
672
            android:exported="false">
673
            <intent-filter android:priority="1000">
674
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!-- Required  显示通知栏 -->
675
                <category android:name="${applicationId}" />
676
            </intent-filter>
677
            <intent-filter>
678
                <action android:name="android.intent.action.USER_PRESENT" />
679
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
680
            </intent-filter>
681
            <!-- Optional -->
682
            <intent-filter>
683
                <action android:name="android.intent.action.PACKAGE_ADDED" />
684
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
685
686
                <data android:scheme="package" />
687
            </intent-filter>
688
        </receiver>
689
        <receiver
690
            android:name="cn.jpush.android.service.AlarmReceiver"
691
            android:exported="false" />
692
        <receiver
693
            android:name=".view.MyReceiver"
694
            android:enabled="true"
695
            android:exported="false">
696
            <intent-filter>
697
                <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!-- Required  用户注册SDK的intent -->
698
                <action android:name="cn.jpush.android.intent.UNREGISTRATION" />
699
                <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!-- Required  用户接收SDK消息的intent -->
700
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!-- Required  用户接收SDK通知栏信息的intent -->
701
                <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Required  用户打开自定义通知栏的intent -->
702
                <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" /> <!-- Optional 用户接受Rich Push Javascript 回调函数的intent -->
703
                <action android:name="cn.jpush.android.intent.CONNECTION" /> <!-- 接收网络变化 连接/断开 since 1.6.3 -->
704
                <category android:name="${applicationId}" />
705
            </intent-filter>
706
        </receiver>
707
708
        <meta-data
709
            android:name="JPUSH_CHANNEL"
710
            android:value="developer-default" />
711
        <meta-data
712
            android:name="JPUSH_APPKEY"
713
            android:value="19fde8a6fe56b6918522bfa3" /> <!-- </>值来自开发者平台取得的AppKey -->
714
        <activity
534
        <activity
715
            android:name=".activity.ShowBuildLocationActivity"
535
            android:name=".activity.ShowBuildLocationActivity"
716
            android:screenOrientation="portrait" />
536
            android:screenOrientation="portrait" />
717
        <activity
537
        <activity
718
            android:name=".activity.ChargingQianDaoActivity"
538
            android:name=".activity.ChargingQianDaoActivity"
719
            android:screenOrientation="portrait" />
539
            android:screenOrientation="portrait" /> <!-- <intent-filter > -->
540
        <!-- &lt;!&ndash; action随便设置,但必须保证唯一 &ndash;&gt; -->
541
        <!-- <action android:name="input_code"/> -->
542
        <!-- <category android:name="android.intent.category.DEFAULT"/> -->
543
        <!-- </intent-filter> -->
544
        <!-- <activity android:name=".wxapi.WXPayEntryActivity"/> -->
720
        <activity
545
        <activity
721
            android:name=".activity.RoutePlanMapActivity"
546
            android:name=".activity.RoutePlanMapActivity"
722
            android:screenOrientation="portrait"
547
            android:screenOrientation="portrait"
733
            android:screenOrientation="portrait" />
558
            android:screenOrientation="portrait" />
734
        <activity
559
        <activity
735
            android:name=".activity.RouteEditAddressActivity"
560
            android:name=".activity.RouteEditAddressActivity"
736
            android:screenOrientation="portrait" />
561
            android:screenOrientation="portrait" /> <!-- 极光 -->
737
        <activity
562
        <activity
738
            android:name=".activity.RouteSelectPointActivity"
563
            android:name=".activity.RouteSelectPointActivity"
739
            android:screenOrientation="portrait" />
564
            android:screenOrientation="portrait" />
740
        <activity
565
        <activity
741
            android:name=".activity.SelectCarActivity"
566
            android:name=".activity.SelectCarActivity"
742
            android:screenOrientation="portrait" />
567
            android:screenOrientation="portrait" />
568
743
        <activity
569
        <activity
744
            android:name=".activity.ZhanCommentActivity"
570
            android:name=".activity.ZhanCommentActivity"
745
            android:configChanges="keyboardHidden|orientation|screenSize"
571
            android:configChanges="keyboardHidden|orientation|screenSize"
755
        <activity
581
        <activity
756
            android:name=".activity.PrivateZhuangMapActivity"
582
            android:name=".activity.PrivateZhuangMapActivity"
757
            android:screenOrientation="portrait" />
583
            android:screenOrientation="portrait" />
584
758
        <activity
585
        <activity
759
            android:name=".activity.PrivateZhuangInfoActivity"
586
            android:name=".activity.PrivateZhuangInfoActivity"
760
            android:screenOrientation="portrait"
587
            android:screenOrientation="portrait"
765
        <activity
592
        <activity
766
            android:name=".activity.AlbumPrivateActivity"
593
            android:name=".activity.AlbumPrivateActivity"
767
            android:screenOrientation="portrait" />
594
            android:screenOrientation="portrait" />
595
768
        <activity
596
        <activity
769
            android:name=".activity.BuildTypeActivity"
597
            android:name=".activity.BuildTypeActivity"
770
            android:screenOrientation="portrait" />
598
            android:screenOrientation="portrait" />
771
        <activity
599
        <activity
772
            android:name=".activity.CaptureActivity"
600
            android:name=".activity.CaptureActivity"
773
            android:launchMode="singleTask"
601
            android:launchMode="singleTask"
774
            android:screenOrientation="portrait" />
602
            android:screenOrientation="portrait" /> <!-- </>值来自开发者平台取得的AppKey -->
775
        <activity
603
        <activity
776
            android:name=".activity.RankingListActivity"
604
            android:name=".activity.RankingListActivity"
777
            android:screenOrientation="portrait" />
605
            android:screenOrientation="portrait" />
811
            android:screenOrientation="portrait" />
639
            android:screenOrientation="portrait" />
812
        <activity
640
        <activity
813
            android:name=".activity.TLDLoadingActivity"
641
            android:name=".activity.TLDLoadingActivity"
814
            android:screenOrientation="portrait" /> <!-- <activity -->
815
        <!-- android:name=".activity.MyCaptureActivity" -->
816
        <!-- android:launchMode="singleTask" -->
817
        <!-- android:screenOrientation="portrait" /> -->
642
            android:screenOrientation="portrait" />
818
        <activity
643
        <activity
819
            android:name=".activity.MemberCoinRecordActivity"
644
            android:name=".activity.MemberCoinRecordActivity"
820
            android:screenOrientation="portrait" />
645
            android:screenOrientation="portrait" />
870
        <activity
695
        <activity
871
            android:name=".activity.QaActivity"
696
            android:name=".activity.QaActivity"
872
            android:launchMode="singleTask"
697
            android:launchMode="singleTask"
873
            android:screenOrientation="portrait" />
698
            android:screenOrientation="portrait" /> <!-- <activity -->
699
        <!-- android:name=".activity.MyCaptureActivity" -->
700
        <!-- android:launchMode="singleTask" -->
701
        <!-- android:screenOrientation="portrait" /> -->
874
        <activity
702
        <activity
875
            android:name=".activity.ChatActivity"
703
            android:name=".activity.ChatActivity"
876
            android:launchMode="singleTask"
704
            android:launchMode="singleTask"
972
            android:name=".activity.TopicDetailActivity"
800
            android:name=".activity.TopicDetailActivity"
973
            android:launchMode="singleTask"
801
            android:launchMode="singleTask"
974
            android:screenOrientation="portrait" />
802
            android:screenOrientation="portrait" />
975
    </application>
803
        <meta-data
804
            android:name="com.amap.api.v2.apikey"
805
            android:value="fabcfbf869745789b151d0c88e9b4807" />
806
        <meta-data
807
            android:name="com.baidu.lbsapi.API_KEY"
808
            android:value="qmitBFE5Am7H53UVylGwG6b0" />
809
        <meta-data
810
            android:name="design_width"
811
            android:value="1080" />
812
        <meta-data
813
            android:name="design_height"
814
            android:value="1920" />
815
        <meta-data
816
            android:name="UMENG_APPKEY"
817
            android:value="54c65228fd98c583210001c9" />
818
        <meta-data
819
            android:name="UMENG_CHANNEL"
820
            android:value="${UMENG_CHANNEL_VALUE}" />
821
        <meta-data
822
            android:name="com.google.android.gms.version"
823
            android:value="@integer/google_play_services_version" />
824
        <meta-data
825
            android:name="JPUSH_CHANNEL"
826
            android:value="developer-default" />
827
        <meta-data
828
            android:name="JPUSH_APPKEY"
829
            android:value="19fde8a6fe56b6918522bfa3" />
830
        <provider
831
            android:name="android.support.v4.content.FileProvider"
832
            android:authorities="${applicationId}.provider"
833
            android:exported="false"
834
            android:grantUriPermissions="true">
835
            <meta-data
836
                android:name="android.support.FILE_PROVIDER_PATHS"
837
                android:resource="@xml/provider_paths" />
838
        </provider>
839
        <receiver
840
            android:name="cn.jpush.android.service.PushReceiver"
841
            android:enabled="true"
842
            android:exported="false">
843
            <intent-filter android:priority="1000">
844
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!-- Required  显示通知栏 -->
845
                <category android:name="${applicationId}" />
846
            </intent-filter>
847
            <intent-filter>
848
                <action android:name="android.intent.action.USER_PRESENT" />
849
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
850
            </intent-filter>
851
            <!-- Optional -->
852
            <intent-filter>
853
                <action android:name="android.intent.action.PACKAGE_ADDED" />
854
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
855
856
                <data android:scheme="package" />
857
            </intent-filter>
858
        </receiver>
859
        <receiver
860
            android:name="cn.jpush.android.service.AlarmReceiver"
861
            android:exported="false" />
862
        <receiver
863
            android:name=".view.MyReceiver"
864
            android:enabled="true"
865
            android:exported="false">
866
            <intent-filter>
867
                <action android:name="cn.jpush.android.intent.REGISTRATION" /> <!-- Required  用户注册SDK的intent -->
868
                <action android:name="cn.jpush.android.intent.UNREGISTRATION" />
869
                <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <!-- Required  用户接收SDK消息的intent -->
870
                <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <!-- Required  用户接收SDK通知栏信息的intent -->
871
                <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <!-- Required  用户打开自定义通知栏的intent -->
872
                <action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" /> <!-- Optional 用户接受Rich Push Javascript 回调函数的intent -->
873
                <action android:name="cn.jpush.android.intent.CONNECTION" /> <!-- 接收网络变化 连接/断开 since 1.6.3 -->
874
                <category android:name="${applicationId}" />
875
            </intent-filter>
876
        </receiver>
877
        <service android:name="com.amap.api.location.APSService" />
878
        <service android:name="com.amap.api.location.APSService" />
879
        <service
880
            android:name="cn.jpush.android.service.DownloadService"
881
            android:enabled="true"
882
            android:exported="false" />
883
        <service
884
            android:name="cn.jpush.android.service.PushService"
885
            android:enabled="true"
886
            android:exported="false">
887
            <intent-filter>
888
                <action android:name="cn.jpush.android.intent.REGISTER" />
889
                <action android:name="cn.jpush.android.intent.REPORT" />
890
                <action android:name="cn.jpush.android.intent.PushService" />
891
                <action android:name="cn.jpush.android.intent.PUSH_TIME" />
892
            </intent-filter>
893
        </service>
894
        <service
895
            android:name="cn.jpush.android.service.DaemonService"
896
            android:enabled="true"
897
            android:exported="true">
898
            <intent-filter>
899
                <action android:name="cn.jpush.android.intent.DaemonService" />
900
901
                <category android:name="${applicationId}" />
902
            </intent-filter>
903
        </service>
904
    </application> <!-- 往SDCard写入数据权限 -->
905
    <permission
906
        android:name="${applicationId}.permission.JPUSH_MESSAGE"
907
        android:protectionLevel="signature" />
908
    <uses-feature android:name="android.hardware.camera" />
909
    <uses-feature android:name="android.hardware.camera.autofocus" />
910
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
911
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
912
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
913
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
914
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
915
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
916
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
917
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
918
    <uses-permission android:name="android.permission.INTERNET" />
919
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
920
    <uses-permission android:name="android.permission.WAKE_LOCK" />
921
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
922
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
923
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
924
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
925
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
926
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
927
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
928
    <uses-permission android:name="android.permission.CALL_PHONE" />
929
    <uses-permission android:name="android.permission.CAMERA" />
930
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
931
    <uses-permission android:name="android.permission.GET_TASKS" />
932
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
933
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
934
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
935
    <uses-permission android:name="android.permission.READ_LOGS" /> <!-- 极光 -->
936
    <uses-permission android:name="android.permission.VIBRATE" />
937
    <uses-permission android:name="android.permission.INTERNET" />
938
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
939
    <uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
940
    <!-- <uses-permission android:name="android.permission.WAKE_LOCK" /> -->
941
    <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" /> -->
942
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
943
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
944
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
945
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> -->
946
    <!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
947
    <!-- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> -->
948
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 极光 -->
949
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
950
    <uses-permission android:name="android.permission.VIBRATE" />
951
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
952
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
953
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
954
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 【常用】 信鸽SDK所需权限 -->
955
    <!-- <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> -->
956
    <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
957
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
958
    <!-- 【可选】 信鸽SDK所需权限 -->
959
    <!-- <uses-permission android:name="android.permission.RESTART_PACKAGES" /> -->
960
    <!-- <uses-permission android:name="android.permission.BROADCAST_STICKY" /> -->
961
    <!-- <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> -->
962
    <!-- <uses-permission android:name="android.permission.READ_LOGS" /> -->
963
    <!-- <uses-permission android:name="android.permission.BATTERY_STATS" /> -->
964
    <!-- 蓝牙分享所需的权限 -->
965
    <!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
966
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> -->
967
    <!-- 权限 :  GPS定位 -->
968
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
969
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
970
    <uses-permission android:name="android.permission.REORDER_TASKS" />
971
972
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
973
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 权限 : AGPS定位 -->
974
    <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
975
976
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
976
977
977
</manifest>
978
</manifest>

+ 1 - 1
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

2894
2894
2895
                if (null != jing && null != wei) {
2895
                if (null != jing && null != wei) {
2896
                    MobclickAgent.onEvent(getApplicationContext(), "0109");
2896
                    MobclickAgent.onEvent(getApplicationContext(), "0109");
2897
                    Intent intent = new Intent(getApplicationContext(), ZhanListActivity.class);
2897
                    Intent intent = new Intent(getApplicationContext(), RecommendChargingStationActivity.class);
2898
                    intent.putExtra("center_jing", jing);
2898
                    intent.putExtra("center_jing", jing);
2899
                    intent.putExtra("center_wei", wei);
2899
                    intent.putExtra("center_wei", wei);
2900
                    startActivity(intent);
2900
                    startActivity(intent);

+ 184 - 0
app/src/main/java/com/electric/chargingpile/activity/RecommendChargingStationActivity.java

1
package com.electric.chargingpile.activity;
2
3
import android.graphics.Color;
4
import android.support.constraint.ConstraintLayout;
5
import android.support.v7.app.AppCompatActivity;
6
import android.os.Bundle;
7
import android.view.View;
8
import android.widget.Button;
9
import android.widget.ImageView;
10
import android.widget.LinearLayout;
11
import android.widget.TextView;
12
13
import com.electric.chargingpile.R;
14
import com.electric.chargingpile.util.BarColorUtil;
15
16
public class RecommendChargingStationActivity extends AppCompatActivity implements View.OnClickListener {
17
18
    private LinearLayout first_condition;
19
    private TextView first_condition_text;
20
    private ImageView first_condition_image;
21
22
    private int firstCondition = 1;
23
    private TextView first_can_charging;
24
    private TextView first_free_parking;
25
    private TextView first_quick_charging;
26
    private TextView first_slow_charging;
27
28
    private Boolean firstCanCharging = false;
29
    private Boolean firstFreeParking = false;
30
    private Boolean firstQuickCharging = false;
31
    private Boolean firstSlowCharging = false;
32
    private ConstraintLayout condition_second_bar;
33
    private Button second_1;
34
    private Button second_2;
35
    private Button second_3;
36
    private Button second_4;
37
    private Button second_5;
38
39
40
    @Override
41
    protected void onCreate(Bundle savedInstanceState) {
42
        super.onCreate(savedInstanceState);
43
        setContentView(R.layout.activity_recommend_charging_station);
44
        BarColorUtil.initStatusBarColor(RecommendChargingStationActivity.this);
45
        initView();
46
    }
47
48
    private void initView() {
49
        findViewById(R.id.iv_back).setOnClickListener(this);
50
51
        first_condition = findViewById(R.id.first_condition);
52
        first_condition.setOnClickListener(this);
53
        first_condition_text = findViewById(R.id.first_condition_text);
54
        first_condition_image = findViewById(R.id.first_condition_image);
55
56
        first_can_charging = findViewById(R.id.first_can_charging);
57
        first_can_charging.setOnClickListener(this);
58
59
        first_free_parking = findViewById(R.id.first_free_parking);
60
        first_free_parking.setOnClickListener(this);
61
62
        first_quick_charging = findViewById(R.id.first_quick_charging);
63
        first_quick_charging.setOnClickListener(this);
64
65
        first_slow_charging = findViewById(R.id.first_slow_charging);
66
        first_slow_charging.setOnClickListener(this);
67
68
        condition_second_bar = findViewById(R.id.condition_second_bar);
69
        second_1 = findViewById(R.id.second_1);
70
        second_2 = findViewById(R.id.second_2);
71
        second_3 = findViewById(R.id.second_3);
72
        second_4 = findViewById(R.id.second_4);
73
        second_5 = findViewById(R.id.second_5);
74
        second_1.setOnClickListener(this);
75
        second_2.setOnClickListener(this);
76
        second_3.setOnClickListener(this);
77
        second_4.setOnClickListener(this);
78
        second_5.setOnClickListener(this);
79
    }
80
81
    @Override
82
    public void onClick(View v) {
83
        switch (v.getId()) {
84
            case R.id.iv_back:
85
                finish();
86
                break;
87
            case R.id.first_condition:
88
                if (condition_second_bar.getVisibility() == View.VISIBLE) {
89
                    foldSecondCondition();
90
                } else {
91
                    unfoldSecondCondition();
92
                }
93
94
                break;
95
            case R.id.first_can_charging:
96
                firstCanCharging = !firstCanCharging;
97
                first_can_charging.setTextColor(firstCanCharging ? Color.parseColor("#2FC45B") : Color.parseColor("#222222"));
98
                foldSecondCondition();
99
                break;
100
            case R.id.first_free_parking:
101
                firstFreeParking = !firstFreeParking;
102
                first_free_parking.setTextColor(firstFreeParking ? Color.parseColor("#2FC45B") : Color.parseColor("#222222"));
103
                foldSecondCondition();
104
                break;
105
            case R.id.first_quick_charging:
106
                firstQuickCharging = !firstQuickCharging;
107
                first_quick_charging.setTextColor(firstQuickCharging ? Color.parseColor("#2FC45B") : Color.parseColor("#222222"));
108
                foldSecondCondition();
109
                break;
110
            case R.id.first_slow_charging:
111
                firstSlowCharging = !firstSlowCharging;
112
                first_slow_charging.setTextColor(firstSlowCharging ? Color.parseColor("#2FC45B") : Color.parseColor("#222222"));
113
                foldSecondCondition();
114
                break;
115
            case R.id.second_1:
116
            case R.id.second_2:
117
            case R.id.second_3:
118
            case R.id.second_4:
119
            case R.id.second_5:
120
                chooseSecondCondition(v.getId());
121
                break;
122
        }
123
    }
124
125
    // 折叠
126
    private void foldSecondCondition() {
127
        condition_second_bar.setVisibility(View.GONE);
128
        first_condition_image.setImageDrawable(getResources().getDrawable(R.drawable.recommend_fold));
129
    }
130
131
    // 打开
132
    private void unfoldSecondCondition() {
133
        condition_second_bar.setVisibility(View.VISIBLE);
134
        first_condition_image.setImageDrawable(getResources().getDrawable(R.drawable.recommend_unfold));
135
    }
136
137
    private void chooseSecondCondition(int id) {
138
        second_1.setBackground(getResources().getDrawable(R.drawable.recommend_btn_normal));
139
        second_2.setBackground(getResources().getDrawable(R.drawable.recommend_btn_normal));
140
        second_3.setBackground(getResources().getDrawable(R.drawable.recommend_btn_normal));
141
        second_4.setBackground(getResources().getDrawable(R.drawable.recommend_btn_normal));
142
        second_5.setBackground(getResources().getDrawable(R.drawable.recommend_btn_normal));
143
        second_1.setTextColor(Color.parseColor("#2FC45B"));
144
        second_2.setTextColor(Color.parseColor("#2FC45B"));
145
        second_3.setTextColor(Color.parseColor("#2FC45B"));
146
        second_4.setTextColor(Color.parseColor("#2FC45B"));
147
        second_5.setTextColor(Color.parseColor("#2FC45B"));
148
149
        switch (id) {
150
            case R.id.second_1:
151
                firstCondition = 1;
152
                second_1.setBackground(getResources().getDrawable(R.drawable.recommend_btn_selected));
153
                second_1.setTextColor(Color.parseColor("#FFFFFF"));
154
                first_condition_text.setText("智能推荐");
155
                break;
156
            case R.id.second_2:
157
                firstCondition = 2;
158
                second_2.setBackground(getResources().getDrawable(R.drawable.recommend_btn_selected));
159
                second_2.setTextColor(Color.parseColor("#FFFFFF"));
160
                first_condition_text.setText("价格最低");
161
                break;
162
            case R.id.second_3:
163
                firstCondition = 3;
164
                second_3.setBackground(getResources().getDrawable(R.drawable.recommend_btn_selected));
165
                second_3.setTextColor(Color.parseColor("#FFFFFF"));
166
                first_condition_text.setText("距离最近");
167
                break;
168
            case R.id.second_4:
169
                firstCondition = 4;
170
                second_4.setBackground(getResources().getDrawable(R.drawable.recommend_btn_selected));
171
                second_4.setTextColor(Color.parseColor("#FFFFFF"));
172
                first_condition_text.setText("空闲最多");
173
                break;
174
            case R.id.second_5:
175
                firstCondition = 5;
176
                second_5.setBackground(getResources().getDrawable(R.drawable.recommend_btn_selected));
177
                second_5.setTextColor(Color.parseColor("#FFFFFF"));
178
                first_condition_text.setText("评分最高");
179
                break;
180
        }
181
        foldSecondCondition();
182
    }
183
184
}

BIN
app/src/main/res/drawable-hdpi/recommend_fold.png


BIN
app/src/main/res/drawable-hdpi/recommend_unfold.png


BIN
app/src/main/res/drawable-mdpi/recommend_fold.png


BIN
app/src/main/res/drawable-mdpi/recommend_unfold.png


BIN
app/src/main/res/drawable-xhdpi/recommend_fold.png


BIN
app/src/main/res/drawable-xhdpi/recommend_unfold.png


BIN
app/src/main/res/drawable-xxhdpi/recommend_fold.png


BIN
app/src/main/res/drawable-xxhdpi/recommend_unfold.png


BIN
app/src/main/res/drawable-xxxhdpi/recommend_fold.png


BIN
app/src/main/res/drawable-xxxhdpi/recommend_unfold.png


+ 9 - 0
app/src/main/res/drawable/recommend_btn_normal.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#F6FDF8"></solid>
5
    <!-- 边框颜色、宽度  -->
6
    <stroke android:width="0.5dip" android:color="#83D287"></stroke>
7
    <!-- 边框圆角 -->
8
    <corners android:radius="3dp"></corners>
9
</shape>

+ 7 - 0
app/src/main/res/drawable/recommend_btn_selected.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#83d287"></solid>
5
    <!-- 边框圆角 -->
6
    <corners android:radius="3dp"></corners>
7
</shape>

+ 289 - 0
app/src/main/res/layout/activity_recommend_charging_station.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="#ffffff"
8
    tools:context=".activity.RecommendChargingStationActivity">
9
10
    <android.support.constraint.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="44dp"
14
        app:layout_constraintLeft_toLeftOf="parent"
15
        app:layout_constraintRight_toRightOf="parent"
16
        app:layout_constraintTop_toTopOf="parent">
17
18
        <ImageView
19
            android:id="@+id/iv_back"
20
            android:layout_width="wrap_content"
21
            android:layout_height="match_parent"
22
            android:contentDescription="@null"
23
            android:paddingLeft="15dp"
24
            android:paddingRight="15dp"
25
            android:src="@drawable/icon_lvback1119"
26
            app:layout_constraintBottom_toBottomOf="parent"
27
            app:layout_constraintLeft_toLeftOf="parent"
28
            app:layout_constraintTop_toTopOf="parent" />
29
30
        <TextView
31
            android:layout_width="match_parent"
32
            android:layout_height="match_parent"
33
            android:gravity="center"
34
            android:text="推荐"
35
            android:textColor="#222222"
36
            android:textSize="18sp" />
37
38
        <View
39
            android:layout_width="match_parent"
40
            android:layout_height="0.5dp"
41
            android:background="#dddddd"
42
            app:layout_constraintBottom_toBottomOf="parent"
43
            app:layout_constraintLeft_toLeftOf="parent"
44
            app:layout_constraintRight_toRightOf="parent" />
45
    </android.support.constraint.ConstraintLayout>
46
47
    <android.support.constraint.ConstraintLayout
48
        android:id="@+id/condition_first_bar"
49
        android:layout_width="match_parent"
50
        android:layout_height="40dp"
51
        app:layout_constraintLeft_toLeftOf="parent"
52
        app:layout_constraintRight_toRightOf="parent"
53
        app:layout_constraintTop_toBottomOf="@+id/nav_bar">
54
55
        <LinearLayout
56
            android:layout_width="match_parent"
57
            android:layout_height="match_parent"
58
            android:gravity="center"
59
            android:orientation="horizontal">
60
61
            <LinearLayout
62
                android:id="@+id/first_condition"
63
                android:layout_width="0dp"
64
                android:layout_height="match_parent"
65
                android:layout_weight="0.224"
66
                android:gravity="center"
67
                android:orientation="horizontal">
68
69
                <TextView
70
                    android:id="@+id/first_condition_text"
71
                    android:layout_width="wrap_content"
72
                    android:layout_height="wrap_content"
73
                    android:gravity="center"
74
                    android:text="智能推荐"
75
                    android:textColor="#2fc45b"
76
                    android:textSize="12sp" />
77
78
                <ImageView
79
                    android:id="@+id/first_condition_image"
80
                    android:layout_width="wrap_content"
81
                    android:layout_height="wrap_content"
82
                    android:layout_marginLeft="5dp"
83
                    android:src="@drawable/recommend_fold" />
84
            </LinearLayout>
85
86
            <View
87
                android:layout_width="1dp"
88
                android:layout_height="10dp"
89
                android:background="#d8d8d8" />
90
91
            <TextView
92
                android:id="@+id/first_can_charging"
93
                android:layout_width="0dp"
94
                android:layout_height="match_parent"
95
                android:layout_weight="0.272"
96
                android:gravity="center"
97
                android:text="本APP可充电"
98
                android:textColor="#222222"
99
                android:textSize="12sp" />
100
101
            <View
102
                android:layout_width="1dp"
103
                android:layout_height="10dp"
104
                android:background="#d8d8d8" />
105
106
            <TextView
107
                android:id="@+id/first_free_parking"
108
                android:layout_width="0dp"
109
                android:layout_height="match_parent"
110
                android:layout_weight="0.211"
111
                android:gravity="center"
112
                android:text="免费停车"
113
                android:textColor="#222222"
114
                android:textSize="12sp" />
115
116
            <View
117
                android:layout_width="1dp"
118
                android:layout_height="10dp"
119
                android:background="#d8d8d8" />
120
121
            <TextView
122
                android:id="@+id/first_quick_charging"
123
                android:layout_width="0dp"
124
                android:layout_height="match_parent"
125
                android:layout_weight="0.147"
126
                android:gravity="center"
127
                android:text="快充"
128
                android:textColor="#222222"
129
                android:textSize="12sp" />
130
131
            <View
132
                android:layout_width="1dp"
133
                android:layout_height="10dp"
134
                android:background="#d8d8d8" />
135
136
            <TextView
137
                android:id="@+id/first_slow_charging"
138
                android:layout_width="0dp"
139
                android:layout_height="match_parent"
140
                android:layout_weight="0.147"
141
                android:gravity="center"
142
                android:text="慢充"
143
                android:textColor="#222222"
144
                android:textSize="12sp" />
145
        </LinearLayout>
146
147
        <View
148
            android:layout_width="match_parent"
149
            android:layout_height="0.5dp"
150
            android:background="#dddddd"
151
            app:layout_constraintBottom_toBottomOf="parent"
152
            app:layout_constraintLeft_toLeftOf="parent"
153
            app:layout_constraintRight_toRightOf="parent" />
154
155
    </android.support.constraint.ConstraintLayout>
156
157
    <android.support.constraint.ConstraintLayout
158
        android:id="@+id/condition_second_bar"
159
        android:layout_width="match_parent"
160
        android:layout_height="0dp"
161
        android:visibility="gone"
162
        app:layout_constraintBottom_toBottomOf="parent"
163
        app:layout_constraintTop_toBottomOf="@+id/condition_first_bar"
164
        tools:visibility="visible">
165
166
        <View
167
            android:layout_width="match_parent"
168
            android:layout_height="match_parent"
169
            android:alpha="0.29"
170
            android:background="#000000" />
171
172
        <LinearLayout
173
            android:layout_width="match_parent"
174
            android:layout_height="120dp"
175
            android:background="#ffffff"
176
            android:orientation="vertical"
177
            android:paddingLeft="22dp"
178
            android:paddingTop="21dp"
179
            android:paddingRight="23dp"
180
            app:layout_constraintTop_toTopOf="parent">
181
182
            <LinearLayout
183
                android:layout_width="match_parent"
184
                android:layout_height="30dp"
185
                android:orientation="horizontal">
186
187
                <Button
188
                    android:id="@+id/second_1"
189
                    android:layout_width="0dp"
190
                    android:layout_height="match_parent"
191
                    android:layout_weight="1"
192
                    android:background="@drawable/recommend_btn_selected"
193
                    android:text="智能推荐"
194
                    android:textColor="#ffffff"
195
                    android:textSize="12sp" />
196
197
                <View
198
                    android:layout_width="10dp"
199
                    android:layout_height="match_parent" />
200
201
                <Button
202
                    android:id="@+id/second_2"
203
                    android:layout_width="0dp"
204
                    android:layout_height="match_parent"
205
                    android:layout_weight="1"
206
                    android:background="@drawable/recommend_btn_normal"
207
                    android:text="价格最低"
208
                    android:textColor="#2FC45B"
209
                    android:textSize="12sp" />
210
211
                <View
212
                    android:layout_width="10dp"
213
                    android:layout_height="match_parent" />
214
215
                <Button
216
                    android:id="@+id/second_3"
217
                    android:layout_width="0dp"
218
                    android:layout_height="match_parent"
219
                    android:layout_weight="1"
220
                    android:background="@drawable/recommend_btn_normal"
221
                    android:text="距离最近"
222
                    android:textColor="#2FC45B"
223
                    android:textSize="12sp" />
224
225
                <View
226
                    android:layout_width="10dp"
227
                    android:layout_height="match_parent" />
228
229
                <Button
230
                    android:id="@+id/second_4"
231
                    android:layout_width="0dp"
232
                    android:layout_height="match_parent"
233
                    android:layout_weight="1"
234
                    android:background="@drawable/recommend_btn_normal"
235
                    android:text="空闲最多"
236
                    android:textColor="#2FC45B"
237
                    android:textSize="12sp" />
238
            </LinearLayout>
239
240
            <LinearLayout
241
                android:layout_width="match_parent"
242
                android:layout_height="30dp"
243
                android:layout_marginTop="15dp">
244
245
                <Button
246
                    android:id="@+id/second_5"
247
                    android:layout_width="0dp"
248
                    android:layout_height="match_parent"
249
                    android:layout_weight="1"
250
                    android:background="@drawable/recommend_btn_normal"
251
                    android:text="评分最高"
252
                    android:textColor="#2FC45B"
253
                    android:textSize="12sp" />
254
255
                <View
256
                    android:layout_width="10dp"
257
                    android:layout_height="match_parent" />
258
259
                <View
260
                    android:layout_width="0dp"
261
                    android:layout_height="match_parent"
262
                    android:layout_weight="1" />
263
264
                <View
265
                    android:layout_width="10dp"
266
                    android:layout_height="match_parent" />
267
268
                <View
269
                    android:layout_width="0dp"
270
                    android:layout_height="match_parent"
271
                    android:layout_weight="1" />
272
273
                <View
274
                    android:layout_width="10dp"
275
                    android:layout_height="match_parent" />
276
277
                <View
278
                    android:layout_width="0dp"
279
                    android:layout_height="match_parent"
280
                    android:layout_weight="1" />
281
            </LinearLayout>
282
283
284
        </LinearLayout>
285
286
287
    </android.support.constraint.ConstraintLayout>
288
289
</android.support.constraint.ConstraintLayout>