浏览代码

上报停车位功能去除

huyuguo 3 年之前
父节点
当前提交
d240eb2b8a
共有 35 个文件被更改,包括 5 次插入601 次删除
  1. 0 178
      app/src/main/java/com/electric/chargingpile/fragment/DetailsFragment.java
  2. 0 145
      app/src/main/java/com/electric/chargingpile/fragment/ReportParkingDialogFragment.java
  3. 二进制
      app/src/main/res/drawable-hdpi/detail_no_parking.png
  4. 二进制
      app/src/main/res/drawable-hdpi/detail_parking.png
  5. 二进制
      app/src/main/res/drawable-hdpi/detail_parking_alert_first.png
  6. 二进制
      app/src/main/res/drawable-hdpi/detail_parking_alert_second.png
  7. 二进制
      app/src/main/res/drawable-hdpi/detail_parking_alert_third.png
  8. 二进制
      app/src/main/res/drawable-hdpi/detail_report_parking.png
  9. 二进制
      app/src/main/res/drawable-mdpi/detail_no_parking.png
  10. 二进制
      app/src/main/res/drawable-mdpi/detail_parking.png
  11. 二进制
      app/src/main/res/drawable-mdpi/detail_parking_alert_first.png
  12. 二进制
      app/src/main/res/drawable-mdpi/detail_parking_alert_second.png
  13. 二进制
      app/src/main/res/drawable-mdpi/detail_parking_alert_third.png
  14. 二进制
      app/src/main/res/drawable-mdpi/detail_report_parking.png
  15. 二进制
      app/src/main/res/drawable-xhdpi/detail_no_parking.png
  16. 二进制
      app/src/main/res/drawable-xhdpi/detail_parking.png
  17. 二进制
      app/src/main/res/drawable-xhdpi/detail_parking_alert_first.png
  18. 二进制
      app/src/main/res/drawable-xhdpi/detail_parking_alert_second.png
  19. 二进制
      app/src/main/res/drawable-xhdpi/detail_parking_alert_third.png
  20. 二进制
      app/src/main/res/drawable-xhdpi/detail_report_parking.png
  21. 二进制
      app/src/main/res/drawable-xxhdpi/detail_no_parking.png
  22. 二进制
      app/src/main/res/drawable-xxhdpi/detail_parking.png
  23. 二进制
      app/src/main/res/drawable-xxhdpi/detail_parking_alert_first.png
  24. 二进制
      app/src/main/res/drawable-xxhdpi/detail_parking_alert_second.png
  25. 二进制
      app/src/main/res/drawable-xxhdpi/detail_parking_alert_third.png
  26. 二进制
      app/src/main/res/drawable-xxhdpi/detail_report_parking.png
  27. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_no_parking.png
  28. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_parking.png
  29. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_parking_alert_first.png
  30. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_parking_alert_second.png
  31. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_parking_alert_third.png
  32. 二进制
      app/src/main/res/drawable-xxxhdpi/detail_report_parking.png
  33. 0 36
      app/src/main/res/layout/activity_new_zhan_details.xml
  34. 5 18
      app/src/main/res/layout/fragmen_details_new.xml
  35. 0 224
      app/src/main/res/layout/fragment_dialog_report_parking.xml

+ 0 - 178
app/src/main/java/com/electric/chargingpile/fragment/DetailsFragment.java

@ -522,7 +522,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
522 522
                            detail_up_or_down.setImageDrawable(getResources().getDrawable(R.drawable.icon_detail_up));
523 523
                        }
524 524
525
                        getVacancy();
526 525
                    } catch (Exception e) {
527 526
                        e.printStackTrace();
528 527
                    }
@ -789,7 +788,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
789 788
            }
790 789
        }
791 790
    };
792
    private ImageView parking_icon;
793 791
    private String zongjia;
794 792
795 793
    @Override
@ -933,8 +931,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
933 931
        iv_new_icon = (CircleImageView) v.findViewById(R.id.iv_new_icon);
934 932
        ll_yunyingshang = (LinearLayout) v.findViewById(R.id.ll_yunyingshang);
935 933
        view_789 = v.findViewById(R.id.view_789);
936
        parking_icon = v.findViewById(R.id.parking_icon);
937
        parking_icon.setOnClickListener(this);
938 934
    }
939 935
940 936
    @Override
@ -973,62 +969,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
973 969
                MobclickAgent.onEvent(getActivity(), "0209");
974 970
                startActivity(new Intent(getActivity(), ChargingQianDaoActivity.class));
975 971
                break;
976
//            case R.id.chat_share_bar: // 聊聊入口
977
//                MobclickAgent.onEvent(getContext(), "1122");
978
//                Intent i = new Intent(getContext(), ChatActivity.class);//聊聊页面
979
//                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
980
//                startActivity(i);
981
//                break;
982
            case R.id.parking_icon:  // 停车位相关操作
983
                LatLng latLng = new LatLng(Double.parseDouble(poi_wei), Double.parseDouble(poi_jing));
984
                if ("1".equals(freeStatus)) { // 有状态的站点
985
                    if ("0".equals(acableNum) && "0".equals(dcableNum)) { // 无空闲桩
986
                        ReportParkingDialogFragment reportParkingDialogFragment = ReportParkingDialogFragment.newInstance(ReportParkingDialogFragment.TYPE_THIRD);
987
                        reportParkingDialogFragment.show(getFragmentManager(), "没有充电车位");
988
                        MobclickAgent.onEvent(getContext(), "1127");
989
                    } else {
990
                        if (MainApplication.center == null) {
991
                            ToastUtil.showToast(getContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
992
                        } else {
993
                            double distance = AMapUtils.calculateLineDistance(MainApplication.center, latLng);
994
                            if (distance > 100) {
995
                                ReportParkingDialogFragment reportParkingDialogFragment = ReportParkingDialogFragment.newInstance(ReportParkingDialogFragment.TYPE_FIRST);
996
                                reportParkingDialogFragment.show(getFragmentManager(), "超过100米,无法上报充电车位");
997
                            } else {
998
                                ReportParkingDialogFragment reportParkingDialogFragment = ReportParkingDialogFragment.newInstance(ReportParkingDialogFragment.TYPE_SECOND);
999
                                reportParkingDialogFragment.setOnReportParkingDialogFragmentListener(new ReportParkingDialogFragment.OnReportParkingDialogFragmentListener() {
1000
                                    @Override
1001
                                    public void report() {
1002
                                        addVacancy();
1003
                                    }
1004
                                });
1005
                                reportParkingDialogFragment.show(getFragmentManager(), "上报车位");
1006
                            }
1007
                            MobclickAgent.onEvent(getContext(), "1126");
1008
                        }
1009
                    }
1010
                } else {
1011
                    if (MainApplication.center == null) {
1012
                        ToastUtil.showToast(getContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
1013
                    } else {
1014
                        double distance = AMapUtils.calculateLineDistance(MainApplication.center, latLng);
1015
                        if (distance > 100) {
1016
                            ReportParkingDialogFragment reportParkingDialogFragment = ReportParkingDialogFragment.newInstance(ReportParkingDialogFragment.TYPE_FIRST);
1017
                            reportParkingDialogFragment.show(getFragmentManager(), "超过100米,无法上报充电车位");
1018
                        } else {
1019
                            ReportParkingDialogFragment reportParkingDialogFragment = ReportParkingDialogFragment.newInstance(ReportParkingDialogFragment.TYPE_SECOND);
1020
                            reportParkingDialogFragment.setOnReportParkingDialogFragmentListener(new ReportParkingDialogFragment.OnReportParkingDialogFragmentListener() {
1021
                                @Override
1022
                                public void report() {
1023
                                    addVacancy();
1024
                                }
1025
                            });
1026
                            reportParkingDialogFragment.show(getFragmentManager(), "上报车位");
1027
                        }
1028
                        MobclickAgent.onEvent(getContext(), "1126");
1029
                    }
1030
                }
1031
                break;
1032 972
        }
1033 973
    }
1034 974
@ -1037,19 +977,13 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1037 977
        new Thread(new Runnable() {
1038 978
            @Override
1039 979
            public void run() {
1040
1041
//                Log.i("!!!!!", NewZhanDetailsActivity.zhan_id);
1042
1043 980
                String url = MainApplication.url + "/zhannew/basic/web/index.php/zhanlist/zhan-info2?zhan_id=" + NewZhanDetailsActivity.zhan_id + "&version=" + MainApplication.current_code;
1044
//                Log.e(TAG, "run: url="+url );
1045 981
                submitPic(url);
1046 982
            }
1047 983
        }).start();
1048 984
    }
1049 985
1050 986
    private void submitPic(String sms) {
1051
1052
//        Log.e("url", sms);
1053 987
        Request request = new Request.Builder().url(sms).build();
1054 988
        Response response = null;
1055 989
        try {
@ -1459,7 +1393,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1459 1393
        mChart.getDescription().setEnabled(false);
1460 1394
        mChart.getXAxis().setAxisLineColor(R.color.grey);
1461 1395
        mChart.getLegend().setTextColor(MainApplication.context.getResources().getColor(R.color.ui_68));
1462
//        mChart.getLegend().setEnabled(false);
1463 1396
1464 1397
        // draw bars behind lines
1465 1398
        mChart.setDrawOrder(new CombinedChart.DrawOrder[]{
@ -1473,10 +1406,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1473 1406
        l.setOrientation(Legend.LegendOrientation.HORIZONTAL);
1474 1407
        l.setDrawInside(false);
1475 1408
1476
//        YAxis rightAxis = mChart.getAxisRight();
1477
//        rightAxis.setDrawGridLines(false);
1478
//        rightAxis.setAxisMinimum(0f); // this replaces setStartAtZero(true)
1479
1480 1409
        YAxis leftAxis = mChart.getAxisLeft();
1481 1410
        leftAxis.setDrawGridLines(true);
1482 1411
        leftAxis.setAxisLineColor(R.color.grey);
@ -1512,20 +1441,8 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1512 1441
        CombinedData data = new CombinedData();
1513 1442
1514 1443
        data.setData(generateLineData(num));
1515
//        data.setData(generateBarData());
1516
//        data.setData(generateBubbleData());
1517
//        data.setData(generateScatterData());
1518
//        data.setData(generateCandleData());
1519
1520
//        data.setValueTypeface(mTfLight);
1521
1522 1444
        xAxis.setAxisMaximum(data.getXMax());
1523
//        setData(mSeekBarX.getProgress() + 1, mSeekBarY.getProgress());
1524
//        mChart.setFitBars(true);
1525
//        mChart.invalidate();
1526
1527 1445
        mChart.setData(data);
1528
1529 1446
        mChart.invalidate();
1530 1447
    }
1531 1448
@ -1590,100 +1507,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1590 1507
        this.detailsFragmentListener = listener;
1591 1508
    }
1592 1509
1593
    /**
1594
     * 获取站空位
1595
     */
1596
    private void getVacancy() {
1597
        Map<String, String> map = new HashMap<>();
1598
        map.put("zhanid", NewZhanDetailsActivity.zhan_id + "");
1599
        CommonParams.addCommonParams(map);
1600
        String query = Util.convertMap2Query(map);
1601
1602
        String url = MainApplication.url + ":9080/get_vacancy?" + query;
1603
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
1604
            @Override
1605
            public void onError(Call call, Exception e) {
1606
                loadingDialog.dismiss();
1607
                parking_icon.setVisibility(View.GONE);
1608
            }
1609
1610
            @Override
1611
            public void onResponse(String response) {
1612
                loadingDialog.dismiss();
1613
                vacancyCode = JsonUtils.getKeyResult(response, "rtnCode");
1614
                updateParkingIcon();
1615
            }
1616
        });
1617
    }
1618
1619
    /**
1620
     * 上传空车位
1621
     */
1622
1623
    private void addVacancy() {
1624
        if (!MainApplication.isLogin()) {
1625
            startActivity(new Intent(getActivity().getApplicationContext(), LoginActivity.class));
1626
            ToastUtil.showToast(getActivity().getApplicationContext(), "请先登录", Toast.LENGTH_SHORT);
1627
            return;
1628
        }
1629
1630
        loadingDialog.show();
1631
        MobclickAgent.onEvent(getContext(), "1128");
1632
        Map<String, String> map = new HashMap<>();
1633
        map.put("zhanid", NewZhanDetailsActivity.zhan_id + "");
1634
        map.put("userid", MainApplication.userId);
1635
        String timer = getMD5(String.valueOf((System.currentTimeMillis() / 1000 - MainMapActivity.cha) / 10) + "qwerty");
1636
        map.put("timer", timer);
1637
        CommonParams.addCommonParams(map);
1638
        String query = Util.convertMap2Query(map);
1639
        String url = MainApplication.url + ":9080/add_vacancy?" + query;
1640
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
1641
            @Override
1642
            public void onError(Call call, Exception e) {
1643
                loadingDialog.dismiss();
1644
            }
1645
1646
            @Override
1647
            public void onResponse(String response) {
1648
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
1649
                String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
1650
                if ("0".equals(rtnCode)) {
1651
                    ToastUtil.showToast(getContext(), rtnMsg, Toast.LENGTH_SHORT);
1652
                    getVacancy();
1653
                } else {
1654
                    loadingDialog.dismiss();
1655
                    ToastUtil.showToast(getContext(), rtnMsg, Toast.LENGTH_SHORT);
1656
                }
1657
1658
            }
1659
        });
1660
    }
1661
1662
    private void updateParkingIcon() {
1663
        if ("2000".equals(vacancyCode)) { //
1664
            parking_icon.setVisibility(View.GONE);
1665
        } else {
1666
            parking_icon.setVisibility(View.VISIBLE);
1667
            if ("1".equals(freeStatus)) { // 有状态的站点
1668
                if ("0".equals(acableNum) && "0".equals(dcableNum)) { // 无空闲桩
1669
                    parking_icon.setImageDrawable(getResources().getDrawable(R.drawable.detail_no_parking));
1670
                } else {
1671
                    if ("1002".equals(vacancyCode)) { // 无有空闲桩
1672
                        parking_icon.setImageDrawable(getResources().getDrawable(R.drawable.detail_report_parking));
1673
                    } else { // 有空闲桩
1674
                        parking_icon.setImageDrawable(getResources().getDrawable(R.drawable.detail_parking));
1675
                    }
1676
                }
1677
            } else {
1678
                if ("1002".equals(vacancyCode)) { // 无有空闲桩
1679
                    parking_icon.setImageDrawable(getResources().getDrawable(R.drawable.detail_report_parking));
1680
                } else { // 有空闲桩
1681
                    parking_icon.setImageDrawable(getResources().getDrawable(R.drawable.detail_parking));
1682
                }
1683
            }
1684
        }
1685
    }
1686
1687 1510
    @Override
1688 1511
    public void onDestroyView() {
1689 1512
        try {
@ -1695,7 +1518,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1695 1518
    }
1696 1519
1697 1520
    public static String getMD5(String content) {
1698
1699 1521
        try {
1700 1522
1701 1523
            MessageDigest digest = MessageDigest.getInstance("MD5");

+ 0 - 145
app/src/main/java/com/electric/chargingpile/fragment/ReportParkingDialogFragment.java

@ -1,145 +0,0 @@
1
package com.electric.chargingpile.fragment;
2
3
import android.app.Dialog;
4
import android.os.Bundle;
5
import androidx.constraintlayout.widget.ConstraintLayout;
6
import androidx.fragment.app.DialogFragment;
7
import android.view.Gravity;
8
import android.view.View;
9
import android.view.Window;
10
import android.view.WindowManager;
11
import android.widget.Button;
12
import android.widget.ImageView;
13
14
import com.electric.chargingpile.R;
15
16
public class ReportParkingDialogFragment extends DialogFragment implements View.OnClickListener {
17
18
    public static final String TYPE_FIRST = "first";
19
    public static final String TYPE_SECOND = "second";
20
    public static final String TYPE_THIRD = "third";
21
22
    private static Dialog mDialog;
23
    private String mType;
24
    private ConstraintLayout container;
25
    private ConstraintLayout first;
26
    private ImageView first_close;
27
    private ConstraintLayout second;
28
    private ImageView second_close;
29
    private Button cancel_report;
30
    private Button report;
31
    private ConstraintLayout third;
32
    private ImageView third_close;
33
    private OnReportParkingDialogFragmentListener reportParkingDialogFragmentListener;
34
35
    public static ReportParkingDialogFragment newInstance(String type) {
36
        Bundle args = new Bundle();
37
        args.putSerializable("type", type);
38
        ReportParkingDialogFragment fragment = new ReportParkingDialogFragment();
39
        fragment.setArguments(args);
40
        return fragment;
41
    }
42
43
    @Override
44
    public Dialog onCreateDialog(Bundle savedInstanceState) {
45
        mDialog = new Dialog(getActivity(), R.style.CenterDialog);
46
        mDialog.setCancelable(true);
47
        mDialog.setCanceledOnTouchOutside(true);
48
49
        mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
50
        mDialog.setContentView(R.layout.fragment_dialog_report_parking);
51
52
        Window window = mDialog.getWindow();
53
        WindowManager.LayoutParams layoutParams = window.getAttributes();
54
        // 布局属性位于整个窗口底部
55
        layoutParams.gravity = Gravity.CENTER;
56
        // 布局属性宽度填充整个窗口,默认是有margin的
57
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
58
        window.setAttributes(layoutParams);
59
60
        initDialog();
61
        initListener();
62
63
        return mDialog;
64
    }
65
66
    private void initDialog() {
67
        mType = (String)getArguments().get("type");
68
        container = mDialog.findViewById(R.id.container);
69
        first = mDialog.findViewById(R.id.first);
70
        first_close = mDialog.findViewById(R.id.first_close);
71
72
        second = mDialog.findViewById(R.id.second);
73
        second_close = mDialog.findViewById(R.id.second_close);
74
        cancel_report = mDialog.findViewById(R.id.cancel_report);
75
        report = mDialog.findViewById(R.id.report);
76
77
        third = mDialog.findViewById(R.id.third);
78
        third_close = mDialog.findViewById(R.id.third_close);
79
80
81
        if (TYPE_FIRST.equals(mType)) {
82
            first.setVisibility(View.VISIBLE);
83
            second.setVisibility(View.GONE);
84
            third.setVisibility(View.GONE);
85
        } else if (TYPE_SECOND.equals(mType)) {
86
            first.setVisibility(View.GONE);
87
            second.setVisibility(View.VISIBLE);
88
            third.setVisibility(View.GONE);
89
        } else {
90
            first.setVisibility(View.GONE);
91
            second.setVisibility(View.GONE);
92
            third.setVisibility(View.VISIBLE);
93
        }
94
    }
95
96
    private void initListener() {
97
        container.setOnClickListener(this);
98
99
        first.setOnClickListener(this);
100
        first_close.setOnClickListener(this);
101
102
        second.setOnClickListener(this);
103
        second_close.setOnClickListener(this);
104
        cancel_report.setOnClickListener(this);
105
        report.setOnClickListener(this);
106
107
        third.setOnClickListener(this);
108
        third_close.setOnClickListener(this);
109
    }
110
111
    @Override
112
    public void onClick(View v) {
113
        switch (v.getId()) {
114
            case R.id.container:
115
                mDialog.dismiss();
116
                break;
117
            case R.id.first_close:
118
                mDialog.dismiss();
119
                break;
120
            case R.id.second_close:
121
                mDialog.dismiss();
122
                break;
123
            case R.id.cancel_report:
124
                mDialog.dismiss();
125
                break;
126
            case R.id.report:
127
                if (reportParkingDialogFragmentListener != null) {
128
                    reportParkingDialogFragmentListener.report();
129
                }
130
                mDialog.dismiss();
131
                break;
132
            case R.id.third_close:
133
                mDialog.dismiss();
134
                break;
135
        }
136
    }
137
138
    public interface OnReportParkingDialogFragmentListener {
139
        void report();
140
    }
141
142
    public void setOnReportParkingDialogFragmentListener(OnReportParkingDialogFragmentListener listener) {
143
        this.reportParkingDialogFragmentListener = listener;
144
    }
145
}

二进制
app/src/main/res/drawable-hdpi/detail_no_parking.png


二进制
app/src/main/res/drawable-hdpi/detail_parking.png


二进制
app/src/main/res/drawable-hdpi/detail_parking_alert_first.png


二进制
app/src/main/res/drawable-hdpi/detail_parking_alert_second.png


二进制
app/src/main/res/drawable-hdpi/detail_parking_alert_third.png


二进制
app/src/main/res/drawable-hdpi/detail_report_parking.png


二进制
app/src/main/res/drawable-mdpi/detail_no_parking.png


二进制
app/src/main/res/drawable-mdpi/detail_parking.png


二进制
app/src/main/res/drawable-mdpi/detail_parking_alert_first.png


二进制
app/src/main/res/drawable-mdpi/detail_parking_alert_second.png


二进制
app/src/main/res/drawable-mdpi/detail_parking_alert_third.png


二进制
app/src/main/res/drawable-mdpi/detail_report_parking.png


二进制
app/src/main/res/drawable-xhdpi/detail_no_parking.png


二进制
app/src/main/res/drawable-xhdpi/detail_parking.png


二进制
app/src/main/res/drawable-xhdpi/detail_parking_alert_first.png


二进制
app/src/main/res/drawable-xhdpi/detail_parking_alert_second.png


二进制
app/src/main/res/drawable-xhdpi/detail_parking_alert_third.png


二进制
app/src/main/res/drawable-xhdpi/detail_report_parking.png


二进制
app/src/main/res/drawable-xxhdpi/detail_no_parking.png


二进制
app/src/main/res/drawable-xxhdpi/detail_parking.png


二进制
app/src/main/res/drawable-xxhdpi/detail_parking_alert_first.png


二进制
app/src/main/res/drawable-xxhdpi/detail_parking_alert_second.png


二进制
app/src/main/res/drawable-xxhdpi/detail_parking_alert_third.png


二进制
app/src/main/res/drawable-xxhdpi/detail_report_parking.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_no_parking.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_parking.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_first.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_second.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_third.png


二进制
app/src/main/res/drawable-xxxhdpi/detail_report_parking.png


+ 0 - 36
app/src/main/res/layout/activity_new_zhan_details.xml

@ -352,42 +352,6 @@
352 352
            android:textAppearance="?android:attr/textAppearanceMedium"
353 353
            android:textColor="@color/white" />
354 354
355
356
        <!--<TextView-->
357
        <!--android:id="@+id/tv_chenggong"-->
358
        <!--android:layout_width="wrap_content"-->
359
        <!--android:layout_height="wrap_content"-->
360
        <!--android:paddingLeft="8dp"-->
361
        <!--android:paddingRight="8dp"-->
362
        <!--android:paddingBottom="4dp"-->
363
        <!--android:paddingTop="4dp"-->
364
        <!--android:text="成功"-->
365
        <!--android:textColor="@color/white"-->
366
        <!--android:background="@drawable/textview_bglv"-->
367
        <!--android:textSize="16sp"-->
368
        <!--android:layout_marginRight="16dp"-->
369
        <!--android:layout_alignTop="@+id/tv_shibai"-->
370
        <!--android:layout_toLeftOf="@+id/tv_shibai"-->
371
        <!--android:layout_toStartOf="@+id/tv_shibai" />-->
372
373
        <!--<TextView-->
374
        <!--android:id="@+id/tv_shibai"-->
375
        <!--android:layout_width="wrap_content"-->
376
        <!--android:layout_height="wrap_content"-->
377
        <!--android:paddingLeft="8dp"-->
378
        <!--android:paddingRight="8dp"-->
379
        <!--android:paddingBottom="4dp"-->
380
        <!--android:paddingTop="4dp"-->
381
        <!--android:text="失败"-->
382
        <!--android:textColor="@color/white"-->
383
        <!--android:background="@drawable/textview_bgju"-->
384
        <!--android:textSize="16sp"-->
385
        <!--android:layout_marginRight="16dp"-->
386
        <!--android:layout_centerVertical="true"-->
387
        <!--android:layout_alignParentRight="true"-->
388
        <!--android:layout_alignParentEnd="true" />-->
389
390 355
    </LinearLayout>
391 356
392
393 357
</LinearLayout>

+ 5 - 18
app/src/main/res/layout/fragmen_details_new.xml

@ -448,8 +448,8 @@
448 448
                        android:layout_width="0dp"
449 449
                        android:layout_height="wrap_content"
450 450
                        android:layout_weight="3"
451
                        tools:background="#00ff00"
452
                        android:orientation="vertical">
451
                        android:orientation="vertical"
452
                        tools:background="#00ff00">
453 453
454 454
                        <LinearLayout
455 455
                            android:layout_width="wrap_content"
@ -489,8 +489,8 @@
489 489
                        android:layout_width="0dp"
490 490
                        android:layout_height="match_parent"
491 491
                        android:layout_weight="2"
492
                        tools:background="#ff0000"
493
                        android:gravity="center_vertical|right">
492
                        android:gravity="center_vertical|right"
493
                        tools:background="#ff0000">
494 494
495 495
                        <TextView
496 496
                            android:layout_width="wrap_content"
@ -499,6 +499,7 @@
499 499
                            android:text="电价详情"
500 500
                            android:textColor="@color/color_222222"
501 501
                            android:textSize="14sp" />
502
502 503
                        <ImageView
503 504
                            android:layout_width="wrap_content"
504 505
                            android:layout_height="wrap_content"
@ -827,19 +828,5 @@
827 828
            </RelativeLayout>
828 829
829 830
        </LinearLayout>
830
831 831
    </com.electric.chargingpile.view.CustomScrollView>
832
833
    <ImageView
834
        android:id="@+id/parking_icon"
835
        android:layout_width="wrap_content"
836
        android:layout_height="wrap_content"
837
        android:layout_marginRight="15dp"
838
        android:layout_marginBottom="15dp"
839
        android:src="@drawable/detail_report_parking"
840
        android:visibility="gone"
841
        app:layout_constraintBottom_toBottomOf="parent"
842
        app:layout_constraintRight_toRightOf="parent"
843
        tools:visibility="visible" />
844
845 832
</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 224
app/src/main/res/layout/fragment_dialog_report_parking.xml

@ -1,224 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.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:id="@+id/container"
6
    android:layout_width="match_parent"
7
    android:layout_height="match_parent"
8
    android:background="#a0000000">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/first"
12
        android:layout_width="310dp"
13
        android:layout_height="255dp"
14
        android:visibility="gone"
15
        app:layout_constraintBottom_toBottomOf="parent"
16
        app:layout_constraintLeft_toLeftOf="parent"
17
        app:layout_constraintRight_toRightOf="parent"
18
        app:layout_constraintTop_toTopOf="parent">
19
20
        <ImageView
21
            android:layout_width="match_parent"
22
            android:layout_height="match_parent"
23
            android:src="@drawable/detail_parking_alert_first" />
24
25
        <ImageView
26
            android:id="@+id/first_close"
27
            android:layout_width="wrap_content"
28
            android:layout_height="wrap_content"
29
            android:layout_marginTop="40dp"
30
            android:padding="10dp"
31
            android:src="@drawable/report_parking_close"
32
            app:layout_constraintRight_toRightOf="parent"
33
            app:layout_constraintTop_toTopOf="parent" />
34
35
        <TextView
36
            android:id="@+id/first_msg"
37
            android:layout_width="match_parent"
38
            android:layout_height="wrap_content"
39
            android:layout_marginLeft="28dp"
40
            android:layout_marginTop="90dp"
41
            android:layout_marginRight="28dp"
42
            android:text="对不起,请在该充电站100米范围内上报“有充电车位”信息"
43
            android:textColor="#222222"
44
            android:textSize="14sp"
45
            app:layout_constraintLeft_toLeftOf="parent"
46
            app:layout_constraintRight_toRightOf="parent"
47
            app:layout_constraintTop_toTopOf="parent" />
48
49
        <TextView
50
            android:layout_width="match_parent"
51
            android:layout_height="wrap_content"
52
            android:layout_marginLeft="28dp"
53
            android:layout_marginTop="10dp"
54
            android:layout_marginRight="28dp"
55
            android:text="非常感谢,您的信息可以帮助到更多的充电用户"
56
            android:textColor="#bcbcbc"
57
            android:textSize="14sp"
58
            app:layout_constraintLeft_toLeftOf="parent"
59
            app:layout_constraintRight_toRightOf="parent"
60
            app:layout_constraintTop_toBottomOf="@+id/first_msg" />
61
62
        <TextView
63
            android:layout_width="match_parent"
64
            android:layout_height="wrap_content"
65
            android:layout_marginBottom="10dp"
66
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
67
            android:textAlignment="center"
68
            android:textColor="#a7a7a7"
69
            android:textSize="12sp"
70
            app:layout_constraintBottom_toBottomOf="parent"
71
            app:layout_constraintLeft_toLeftOf="parent"
72
            app:layout_constraintRight_toRightOf="parent" />
73
74
    </androidx.constraintlayout.widget.ConstraintLayout>
75
76
    <androidx.constraintlayout.widget.ConstraintLayout
77
        android:id="@+id/second"
78
        android:layout_width="310dp"
79
        android:layout_height="320dp"
80
        android:visibility="gone"
81
        app:layout_constraintBottom_toBottomOf="parent"
82
        app:layout_constraintLeft_toLeftOf="parent"
83
        app:layout_constraintRight_toRightOf="parent"
84
        app:layout_constraintTop_toTopOf="parent">
85
86
        <ImageView
87
            android:layout_width="match_parent"
88
            android:layout_height="match_parent"
89
            android:src="@drawable/detail_parking_alert_second" />
90
91
        <ImageView
92
            android:id="@+id/second_close"
93
            android:layout_width="wrap_content"
94
            android:layout_height="wrap_content"
95
            android:layout_marginTop="40dp"
96
            android:padding="10dp"
97
            android:src="@drawable/report_parking_close"
98
            app:layout_constraintRight_toRightOf="parent"
99
            app:layout_constraintTop_toTopOf="parent" />
100
101
        <TextView
102
            android:id="@+id/second_msg"
103
            android:layout_width="match_parent"
104
            android:layout_height="wrap_content"
105
            android:layout_marginLeft="28dp"
106
            android:layout_marginTop="90dp"
107
            android:layout_marginRight="28dp"
108
            android:text="您上报的“有充电车位”信息,可以作为其他用户到此充电的重要参考依据,务必真实上报"
109
            android:textColor="#222222"
110
            android:textSize="14sp"
111
            app:layout_constraintLeft_toLeftOf="parent"
112
            app:layout_constraintRight_toRightOf="parent"
113
            app:layout_constraintTop_toTopOf="parent" />
114
115
        <TextView
116
            android:id="@+id/second_desc"
117
            android:layout_width="match_parent"
118
            android:layout_height="wrap_content"
119
            android:layout_marginLeft="28dp"
120
            android:layout_marginTop="10dp"
121
            android:layout_marginRight="28dp"
122
            android:text="非常感谢,您的信息可以帮助到更多的充电用户"
123
            android:textColor="#bcbcbc"
124
            android:textSize="14sp"
125
            app:layout_constraintLeft_toLeftOf="parent"
126
            app:layout_constraintRight_toRightOf="parent"
127
            app:layout_constraintTop_toBottomOf="@+id/second_msg" />
128
129
        <LinearLayout
130
            android:layout_width="match_parent"
131
            android:layout_height="35dp"
132
            android:layout_marginTop="20dp"
133
            android:gravity="center"
134
            app:layout_constraintTop_toBottomOf="@+id/second_desc">
135
136
            <Button
137
                android:id="@+id/cancel_report"
138
                android:layout_width="100dp"
139
                android:layout_height="match_parent"
140
                android:background="@drawable/cancel_report_parking_shap"
141
                android:text="取消上报"
142
                android:textColor="#999999"
143
                android:textSize="13sp" />
144
145
            <Button
146
                android:id="@+id/report"
147
                android:layout_width="100dp"
148
                android:layout_height="match_parent"
149
                android:layout_marginLeft="10dp"
150
                android:background="@drawable/report_parking_shape"
151
                android:text="上报空停车位"
152
                android:textColor="#ffffff"
153
                android:textSize="13sp" />
154
155
        </LinearLayout>
156
157
158
        <TextView
159
            android:layout_width="match_parent"
160
            android:layout_height="wrap_content"
161
            android:layout_marginBottom="10dp"
162
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
163
            android:textAlignment="center"
164
            android:textColor="#a7a7a7"
165
            android:textSize="12sp"
166
            app:layout_constraintBottom_toBottomOf="parent"
167
            app:layout_constraintLeft_toLeftOf="parent"
168
            app:layout_constraintRight_toRightOf="parent" />
169
170
    </androidx.constraintlayout.widget.ConstraintLayout>
171
172
    <androidx.constraintlayout.widget.ConstraintLayout
173
        android:id="@+id/third"
174
        android:layout_width="310dp"
175
        android:layout_height="200dp"
176
        app:layout_constraintBottom_toBottomOf="parent"
177
        app:layout_constraintLeft_toLeftOf="parent"
178
        app:layout_constraintRight_toRightOf="parent"
179
        app:layout_constraintTop_toTopOf="parent">
180
181
        <ImageView
182
            android:layout_width="match_parent"
183
            android:layout_height="match_parent"
184
            android:src="@drawable/detail_parking_alert_third" />
185
186
        <ImageView
187
            android:id="@+id/third_close"
188
            android:layout_width="wrap_content"
189
            android:layout_height="wrap_content"
190
            android:layout_marginTop="40dp"
191
            android:padding="10dp"
192
            android:src="@drawable/report_parking_close"
193
            app:layout_constraintRight_toRightOf="parent"
194
            app:layout_constraintTop_toTopOf="parent" />
195
196
        <TextView
197
            android:id="@+id/third_msg"
198
            android:layout_width="match_parent"
199
            android:layout_height="wrap_content"
200
            android:layout_marginLeft="28dp"
201
            android:layout_marginTop="90dp"
202
            android:layout_marginRight="28dp"
203
            android:text="该充电站目前没有充电车位"
204
            android:textColor="#222222"
205
            android:textSize="14sp"
206
            app:layout_constraintLeft_toLeftOf="parent"
207
            app:layout_constraintRight_toRightOf="parent"
208
            app:layout_constraintTop_toTopOf="parent" />
209
210
        <TextView
211
            android:layout_width="match_parent"
212
            android:layout_height="wrap_content"
213
            android:layout_marginBottom="10dp"
214
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
215
            android:textAlignment="center"
216
            android:textColor="#a7a7a7"
217
            android:textSize="12sp"
218
            app:layout_constraintBottom_toBottomOf="parent"
219
            app:layout_constraintLeft_toLeftOf="parent"
220
            app:layout_constraintRight_toRightOf="parent" />
221
222
    </androidx.constraintlayout.widget.ConstraintLayout>
223
224
</androidx.constraintlayout.widget.ConstraintLayout>