Browse Source

代码修改

huyuguo 4 years ago
parent
commit
041a09647c
37 changed files with 994 additions and 498 deletions
  1. 4 0
      app/src/main/AndroidManifest.xml
  2. 2 5
      app/src/main/java/com/electric/chargingpile/activity/CarBrandActivity.java
  3. 83 9
      app/src/main/java/com/electric/chargingpile/activity/CarModelActivity.java
  4. 26 31
      app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateActivity.java
  5. 3 0
      app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateListActivity.java
  6. 75 0
      app/src/main/java/com/electric/chargingpile/activity/CarSeriesActivity.java
  7. 1 1
      app/src/main/java/com/electric/chargingpile/activity/RegisterActivity.java
  8. 6 6
      app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java
  9. 19 4
      app/src/main/java/com/electric/chargingpile/activity/UserInfoActivity.java
  10. 11 2
      app/src/main/java/com/electric/chargingpile/adapter/CarBrandGroupedListAdapter.java
  11. 20 12
      app/src/main/java/com/electric/chargingpile/adapter/CarModelGroupedListAdapter.java
  12. 16 19
      app/src/main/java/com/electric/chargingpile/adapter/CarOwnerCertificateListAdapter.java
  13. 97 0
      app/src/main/java/com/electric/chargingpile/adapter/CarSeriesGroupedListAdapter.java
  14. 9 2
      app/src/main/java/com/electric/chargingpile/adapter/ZhanCommentsAapter.java
  15. 10 8
      app/src/main/java/com/electric/chargingpile/entity/CarCompanyEntity.java
  16. 30 0
      app/src/main/java/com/electric/chargingpile/entity/CarModelChildEntity.java
  17. 141 0
      app/src/main/java/com/electric/chargingpile/entity/CarModelEntity.java
  18. 32 0
      app/src/main/java/com/electric/chargingpile/entity/CarModelGroupEntity.java
  19. 19 0
      app/src/main/java/com/electric/chargingpile/event/CarModelEvent.java
  20. 2 2
      app/src/main/java/com/electric/chargingpile/event/CarSerieEvent.java
  21. 0 29
      app/src/main/java/com/electric/chargingpile/fragment/ZhanCommentFragment.java
  22. 2 0
      app/src/main/java/com/electric/chargingpile/util/CarTypeUtil.java
  23. 25 8
      app/src/main/java/com/electric/chargingpile/view/MyReceiver.java
  24. BIN
      app/src/main/res/drawable-hdpi/certified_icon.png
  25. BIN
      app/src/main/res/drawable-mdpi/certified_icon.png
  26. BIN
      app/src/main/res/drawable-xhdpi/certified_icon.png
  27. BIN
      app/src/main/res/drawable-xxhdpi/certified_icon.png
  28. BIN
      app/src/main/res/drawable-xxxhdpi/certified_icon.png
  29. 14 1
      app/src/main/res/layout/activity_car_model.xml
  30. 17 10
      app/src/main/res/layout/activity_car_owner_certificate.xml
  31. 57 0
      app/src/main/res/layout/activity_car_series.xml
  32. 1 1
      app/src/main/res/layout/activity_user_center.xml
  33. 37 0
      app/src/main/res/layout/activity_user_info.xml
  34. 7 42
      app/src/main/res/layout/adapter_child_car_model.xml
  35. 78 0
      app/src/main/res/layout/adapter_child_car_series.xml
  36. 19 0
      app/src/main/res/layout/adapter_header_car_series.xml
  37. 131 306
      app/src/main/res/layout/item_zhancomments.xml

+ 4 - 0
app/src/main/AndroidManifest.xml

@ -86,6 +86,10 @@
86 86
            android:launchMode="singleTop"
87 87
            android:screenOrientation="portrait" />
88 88
        <activity
89
            android:name=".activity.CarSeriesActivity"
90
            android:launchMode="singleTop"
91
            android:screenOrientation="portrait" />
92
        <activity
89 93
            android:name=".activity.CarBrandActivity"
90 94
            android:launchMode="singleTop"
91 95
            android:screenOrientation="portrait" />

+ 2 - 5
app/src/main/java/com/electric/chargingpile/activity/CarBrandActivity.java

@ -6,7 +6,6 @@ import androidx.recyclerview.widget.RecyclerView;
6 6
7 7
import android.content.Intent;
8 8
import android.os.Bundle;
9
import android.util.Log;
10 9
import android.view.View;
11 10
import android.widget.TextView;
12 11
@ -49,13 +48,11 @@ public class CarBrandActivity extends AppCompatActivity implements View.OnClickL
49 48
        CarBrandEvent event = EventBus.getDefault().removeStickyEvent(CarBrandEvent.class);
50 49
        if (event != null) {
51 50
            groups = event.getGroups();
52
            Log.e("abs======================",   groups.size() + "");
53 51
            String[] letters = new String[groups.size()];
54 52
            for (int i = 0; i < groups.size(); i++) {
55 53
                letters[i] = groups.get(i).getInitial();
56
                Log.e("abs======================",   letters[i] + "+" + groups.get(i).getInitial());
57 54
            }
58
//            LetterSideView.letters = letters;
55
            LetterSideView.letters = letters;
59 56
        }
60 57
        findViewById(R.id.iv_back).setOnClickListener(this::onClick);
61 58
        letter_side_view = findViewById(R.id.letter_side_view);
@ -94,7 +91,7 @@ public class CarBrandActivity extends AppCompatActivity implements View.OnClickL
94 91
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
95 92
                ArrayList<CarCompanyEntity> companyList = groups.get(groupPosition).getBrandList().get(childPosition).getCompanyList();
96 93
                EventBus.getDefault().postSticky(new CarCompanyEvent(companyList));
97
                startActivity(new Intent(CarBrandActivity.this, CarModelActivity.class));
94
                startActivity(new Intent(CarBrandActivity.this, CarSeriesActivity.class));
98 95
            }
99 96
        });
100 97

+ 83 - 9
app/src/main/java/com/electric/chargingpile/activity/CarModelActivity.java

@ -7,28 +7,44 @@ import androidx.recyclerview.widget.RecyclerView;
7 7
import android.content.Intent;
8 8
import android.os.Bundle;
9 9
import android.view.View;
10
import android.widget.TextView;
11
import android.widget.Toast;
10 12
11 13
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
12 14
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
13 15
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
14 16
import com.electric.chargingpile.R;
15 17
import com.electric.chargingpile.adapter.CarModelGroupedListAdapter;
16
import com.electric.chargingpile.entity.CarCompanyEntity;
18
import com.electric.chargingpile.entity.CarModelChildEntity;
19
import com.electric.chargingpile.entity.CarModelEntity;
20
import com.electric.chargingpile.entity.CarModelGroupEntity;
17 21
import com.electric.chargingpile.entity.CarSeriesEntity;
18
import com.electric.chargingpile.event.CarCompanyEvent;
19
import com.electric.chargingpile.event.CarSerieEvent;
22
import com.electric.chargingpile.event.CarModelEvent;
23
import com.electric.chargingpile.event.CarSeriesEvent;
20 24
import com.electric.chargingpile.util.BarColorUtil;
25
import com.electric.chargingpile.util.JsonUtils;
26
import com.electric.chargingpile.util.LoadingDialog;
27
import com.electric.chargingpile.util.ToastUtil;
28
import com.google.gson.Gson;
29
import com.google.gson.reflect.TypeToken;
30
import com.zhy.http.okhttp.OkHttpUtils;
31
import com.zhy.http.okhttp.callback.StringCallback;
21 32
22 33
import org.greenrobot.eventbus.EventBus;
23 34
24 35
import java.util.ArrayList;
25 36
37
import okhttp3.Call;
38
26 39
public class CarModelActivity extends AppCompatActivity implements View.OnClickListener {
27 40
28 41
    private RecyclerView recycler_view;
29 42
    private StickyHeaderLayout sticky_header_layout;
30 43
    private CarModelGroupedListAdapter adapter;
31
    private ArrayList<CarCompanyEntity> companyList;
44
    private CarSeriesEntity carSeriesEntity;
45
    private ArrayList<CarModelGroupEntity> groups = new ArrayList<>();
46
    private LoadingDialog loadDialog;
47
    private TextView no_data;
32 48
33 49
    @Override
34 50
    protected void onCreate(Bundle savedInstanceState) {
@ -39,22 +55,44 @@ public class CarModelActivity extends AppCompatActivity implements View.OnClickL
39 55
    }
40 56
41 57
    private void initViews() {
58
        loadDialog = new LoadingDialog(this);
59
        loadDialog.setCanceledOnTouchOutside(false);
42 60
        findViewById(R.id.nav_bar).setOnClickListener(this::onClick);
43
        CarCompanyEvent event = EventBus.getDefault().removeStickyEvent(CarCompanyEvent.class);
61
        CarSeriesEvent event = EventBus.getDefault().removeStickyEvent(CarSeriesEvent.class);
44 62
        if (event != null) {
45
            companyList = event.getCompanyList();
63
            carSeriesEntity = event.getCarSeriesEntity();
64
            loadDialog.show();
65
            getModelList();
46 66
        }
47 67
68
        no_data = findViewById(R.id.no_data);
69
48 70
        recycler_view = (RecyclerView) findViewById(R.id.recycler_view);
49 71
        sticky_header_layout = (StickyHeaderLayout) findViewById(R.id.sticky_header_layout);
50 72
51 73
        recycler_view.setLayoutManager(new LinearLayoutManager(this));
52
        adapter = new CarModelGroupedListAdapter(this, companyList);
74
        adapter = new CarModelGroupedListAdapter(this, groups, carSeriesEntity.getMasterPic());
53 75
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
54 76
            @Override
55 77
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
56
                CarSeriesEntity carSeriesEntity = companyList.get(groupPosition).getSerieslist().get(childPosition);
57
                EventBus.getDefault().post(new CarSerieEvent(carSeriesEntity));
78
                CarModelChildEntity carModelChildEntity = groups.get(groupPosition).getList().get(childPosition);
79
                CarModelEntity carModelEntity = new CarModelEntity();
80
81
                carModelEntity.setBrandName(carSeriesEntity.getBrandName());
82
                carModelEntity.setCompanyId(carSeriesEntity.getCompanyId());
83
                carModelEntity.setCompanyName(carSeriesEntity.getCompanyName());
84
                carModelEntity.setSeriesId(carSeriesEntity.getSeriesId());
85
                carModelEntity.setSeriesName(carSeriesEntity.getSeriesName());
86
                carModelEntity.setSalePrice(carSeriesEntity.getSalePrice());
87
                carModelEntity.setIcon(carSeriesEntity.getIcon());
88
                carModelEntity.setMasterPic(carSeriesEntity.getMasterPic());
89
                carModelEntity.setMaxSalePrice(carSeriesEntity.getMaxSalePrice());
90
                carModelEntity.setMinSalePrice(carSeriesEntity.getMinSalePrice());
91
92
                carModelEntity.setModelId(carModelChildEntity.getModelId());
93
                carModelEntity.setModelName(carModelChildEntity.getModelName());
94
95
                EventBus.getDefault().post(new CarModelEvent(carModelEntity));
58 96
                startActivity(new Intent(CarModelActivity.this, CarOwnerCertificateActivity.class));
59 97
            }
60 98
        });
@ -64,6 +102,42 @@ public class CarModelActivity extends AppCompatActivity implements View.OnClickL
64 102
        sticky_header_layout.setSticky(true);
65 103
    }
66 104
105
    private void getModelList() {
106
        String url = "https://www.d1ev.com/car/api/v1000/series/model/list.do?seriesId=" + carSeriesEntity.getSeriesId();
107
        OkHttpUtils.get().url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
108
            @Override
109
            public void onError(Call call, Exception e) {
110
                e.printStackTrace();
111
                loadDialog.dismiss();
112
                Toast.makeText(getApplicationContext(), e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
113
            }
114
115
            @Override
116
            public void onResponse(String response) {
117
                loadDialog.dismiss();
118
                String code = JsonUtils.getKeyResult(response, "code");
119
                String desc = JsonUtils.getKeyResult(response, "desc");
120
                if ("1000".equals(code)) {
121
                    if ("1000".equals(code)) {
122
                        String data = JsonUtils.getKeyResult(response, "data");
123
                        Gson gson = new Gson();
124
                        groups = gson.fromJson(data, new TypeToken<ArrayList<CarModelGroupEntity>>() {
125
                        }.getType());
126
                        if (groups == null || groups.size() == 0) {
127
                            ToastUtil.showToast(getApplicationContext(), "暂无车型", Toast.LENGTH_SHORT);
128
                            no_data.setVisibility(View.VISIBLE);
129
                        } else {
130
                            adapter.setGroups(groups);
131
                            no_data.setVisibility(View.GONE);
132
                        }
133
                    } else {
134
                        ToastUtil.showToast(getApplicationContext(), desc, Toast.LENGTH_SHORT);
135
                    }
136
                }
137
            }
138
        });
139
    }
140
67 141
    @Override
68 142
    public void onClick(View v) {
69 143
        switch (v.getId()) {

+ 26 - 31
app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateActivity.java

@ -16,7 +16,6 @@ import android.net.Uri;
16 16
import android.os.Bundle;
17 17
import android.text.TextUtils;
18 18
import android.util.Base64;
19
import android.util.Log;
20 19
import android.view.View;
21 20
import android.view.WindowManager;
22 21
import android.widget.Button;
@ -28,28 +27,24 @@ import android.widget.Toast;
28 27
29 28
import com.bumptech.glide.Glide;
30 29
import com.bumptech.glide.load.engine.DiskCacheStrategy;
31
import com.bumptech.glide.request.Request;
32 30
import com.bumptech.glide.request.target.CustomTarget;
33
import com.bumptech.glide.request.target.SizeReadyCallback;
34
import com.bumptech.glide.request.target.Target;
35 31
import com.bumptech.glide.request.transition.Transition;
36 32
import com.electric.chargingpile.R;
37 33
import com.electric.chargingpile.application.MainApplication;
38 34
import com.electric.chargingpile.data.CarOwnerCertificateBean;
39 35
import com.electric.chargingpile.entity.CarBrandGroupEntity;
36
import com.electric.chargingpile.entity.CarModelEntity;
40 37
import com.electric.chargingpile.entity.CarSeriesEntity;
41 38
import com.electric.chargingpile.event.CarBrandEvent;
42
import com.electric.chargingpile.event.CarSerieEvent;
39
import com.electric.chargingpile.event.CarModelEvent;
40
import com.electric.chargingpile.event.CarSeriesEvent;
43 41
import com.electric.chargingpile.util.BarColorUtil;
44
import com.electric.chargingpile.util.Base64Util;
45 42
import com.electric.chargingpile.util.DES3;
46 43
import com.electric.chargingpile.util.FileUtils;
47
import com.electric.chargingpile.util.ImageUitl;
48 44
import com.electric.chargingpile.util.JsonUtils;
49 45
import com.electric.chargingpile.util.LoadingDialog;
50 46
import com.electric.chargingpile.util.ToastUtil;
51 47
import com.electric.chargingpile.view.TextImageView;
52
import com.electric.chargingpile.view.xrichtext.SDCardUtil;
53 48
import com.google.gson.Gson;
54 49
import com.google.gson.reflect.TypeToken;
55 50
import com.zhihu.matisse.Matisse;
@ -65,10 +60,7 @@ import org.greenrobot.eventbus.ThreadMode;
65 60
66 61
import java.io.ByteArrayOutputStream;
67 62
import java.io.File;
68
import java.io.FileInputStream;
69 63
import java.io.IOException;
70
import java.io.InputStream;
71
import java.net.URLEncoder;
72 64
import java.util.ArrayList;
73 65
import java.util.HashMap;
74 66
import java.util.List;
@ -82,7 +74,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
82 74
import io.reactivex.disposables.Disposable;
83 75
import io.reactivex.schedulers.Schedulers;
84 76
import okhttp3.Call;
85
import okhttp3.MediaType;
86 77
import pub.devrel.easypermissions.AfterPermissionGranted;
87 78
import pub.devrel.easypermissions.EasyPermissions;
88 79
@ -106,12 +97,12 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
106 97
    private TextView add_car_model_btn;
107 98
    private LoadingDialog loadDialog;
108 99
    private ArrayList<CarBrandGroupEntity> groups;
109
    private CarSeriesEntity carSeriesEntity;
100
    private CarModelEntity carModelEntity;
110 101
    private ConstraintLayout car_model_constraint_layout;
111 102
    private ConstraintLayout car_model_selected_constraint_layout;
112 103
    private ImageView car_icon;
113
    private TextView car_name;
114 104
    private TextView car_series;
105
    private TextView car_model;
115 106
    private ConstraintLayout driving_license;
116 107
    private ImageView driving_license_icon;
117 108
    private ImageView driving_license_upload_icon;
@ -170,7 +161,7 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
170 161
        car_model_selected_constraint_layout.setOnClickListener(this);
171 162
172 163
        car_icon = findViewById(R.id.car_icon);
173
        car_name = findViewById(R.id.car_name);
164
        car_model = findViewById(R.id.car_model);
174 165
        car_series = findViewById(R.id.car_series);
175 166
176 167
        driving_license = findViewById(R.id.driving_license);
@ -202,8 +193,8 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
202 193
203 194
        if (edit) {
204 195
            Gson gson = new Gson();
205
            CarSerieEvent event = new CarSerieEvent(gson.fromJson(carOwnerCertificateBean.getChexing(), CarSeriesEntity.class));
206
            onCarSeriesMessage(event);
196
            CarModelEvent event = new CarModelEvent(gson.fromJson(carOwnerCertificateBean.getChexing(), CarModelEntity.class));
197
            onCarModelMessage(event);
207 198
208 199
            if (!TextUtils.isEmpty(carOwnerCertificateBean.getLicense_img1())) {
209 200
@ -220,7 +211,6 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
220 211
221 212
                    }
222 213
                });
223
//                Glide.with(this).load(MainApplication.pic_url + carOwnerCertificateBean.getLicense_img1()).into(driving_license_icon);
224 214
                driving_license_upload_icon.setVisibility(View.GONE);
225 215
                driving_license_text_view.setVisibility(View.GONE);
226 216
                driving_license_info.setVisibility(View.VISIBLE);
@ -254,7 +244,7 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
254 244
            loadDialog.show();
255 245
        // https://www.jianshu.com/p/10382cc71127
256 246
//        String url = "https://api.touchev.com:83/car/api/v1000/brand/list.do";
257
        String url = "http://car.d1ev.com/car/api/v1000/brand/list.do";
247
        String url = "http://car.d1ev.com/car/api/v1000/brand/list.do?from=cdz";
258 248
        OkHttpUtils.get().url(url).build().connTimeOut(30000).readTimeOut(30000).execute(new StringCallback() {
259 249
            @Override
260 250
            public void onError(Call call, Exception e) {
@ -337,16 +327,22 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
337 327
    }
338 328
339 329
    @Subscribe(threadMode = ThreadMode.MAIN)
340
    public void onCarSeriesMessage(CarSerieEvent event) {
341
        if (event != null && event.getCarSeriesEntity() != null) {
342
            carSeriesEntity = event.getCarSeriesEntity();
330
    public void onCarModelMessage(CarModelEvent event) {
331
        if (event != null && event.getCarModelEntity() != null) {
332
            carModelEntity = event.getCarModelEntity();
343 333
            car_model_constraint_layout.setVisibility(View.GONE);
344 334
            car_model_selected_constraint_layout.setVisibility(View.VISIBLE);
345
            car_name.setText(carSeriesEntity.getBrandName());
346
            car_series.setText(carSeriesEntity.getSeriesName());
347
            Glide.with(CarOwnerCertificateActivity.this).load(carSeriesEntity.getMasterPic()).placeholder(android.R.color.white).fitCenter().into(car_icon);
335
            car_series.setText(carModelEntity.getSeriesName());
336
            car_model.setText(carModelEntity.getModelName());
337
            try {
338
                String[] imgNames = carModelEntity.getMasterPic().split("!w");
339
                imgNames[1] = imgNames[1].replace("480", "240");
340
                Glide.with(CarOwnerCertificateActivity.this).load(imgNames[0] + "!w" + imgNames[1]).placeholder(android.R.color.white).dontAnimate().diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(car_icon);
341
            } catch (Exception e) {
342
                e.printStackTrace();
343
            }
348 344
        } else {
349
            carSeriesEntity = null;
345
            carModelEntity = null;
350 346
            car_model_constraint_layout.setVisibility(View.VISIBLE);
351 347
            car_model_selected_constraint_layout.setVisibility(View.GONE);
352 348
        }
@ -538,7 +534,7 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
538 534
    }
539 535
540 536
    private void addCarOwnerCertification() {
541
        if (carSeriesEntity == null) {
537
        if (carModelEntity == null) {
542 538
            ToastUtil.showToast(this, "请添加车型", Toast.LENGTH_SHORT);
543 539
            return;
544 540
        }
@ -573,7 +569,7 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
573 569
        }
574 570
        Map<String, String> map = new HashMap<>();
575 571
        Gson gson = new Gson();
576
        String chexing = gson.toJson(carSeriesEntity);
572
        String chexing = gson.toJson(carModelEntity);
577 573
        map.put("chexing", chexing);
578 574
579 575
        if (drivingLicenseBase64Data != null) {
@ -609,11 +605,10 @@ public class CarOwnerCertificateActivity extends AppCompatActivity implements Vi
609 605
                // {"Code":0,"Message":"成功","RequestId":"F84FF659-1D65-48E1-8C12-B253CEFCC4F8","Data":{"plate_num":"京Q52DR5","vehicle_type":"小型轿车","owner":"北京一度用车信息科技有限公司","address":"北京市海淀区中关村东路18号1号楼C日609-1","useCharacter":"葙赁","model":"北京牌BJ7000B3D5-BEV","vin":"LNBSCB3F4HD101254","engine_num":"AD33DH03040031","register_date":"20170525","issueDate":"00170525"}}
610 606
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
611 607
                if ("01".equals(rtnCode)) {
612
                    ToastUtil.showToast(getApplicationContext(), "数据提交成功", Toast.LENGTH_SHORT);
608
                    ToastUtil.showToast(getApplicationContext(), "认证信息提交成功,请等待审核", Toast.LENGTH_SHORT);
613 609
                    finish();
614 610
                } else {
615
                    String rtnMsg = JsonUtils.getKeyResult(response, "rtnMsg");
616
                    ToastUtil.showToast(getApplicationContext(), rtnMsg, Toast.LENGTH_SHORT);
611
                    ToastUtil.showToast(getApplicationContext(), "认证信息提交超时,请重新提交", Toast.LENGTH_SHORT);
617 612
                }
618 613
            }
619 614
        });

+ 3 - 0
app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateListActivity.java

@ -114,6 +114,7 @@ public class CarOwnerCertificateListActivity extends AppCompatActivity {
114 114
        String token = null;
115 115
        try {
116 116
            token = DES3.encode(String.valueOf(tokenTime));
117
            token = URLEncoder.encode(token, "UTF-8");
117 118
        } catch (Exception e) {
118 119
            e.printStackTrace();
119 120
        }
@ -151,6 +152,7 @@ public class CarOwnerCertificateListActivity extends AppCompatActivity {
151 152
        String token = null;
152 153
        try {
153 154
            token = DES3.encode(String.valueOf(tokenTime));
155
            token = URLEncoder.encode(token, "UTF-8");
154 156
        } catch (Exception e) {
155 157
            e.printStackTrace();
156 158
        }
@ -183,6 +185,7 @@ public class CarOwnerCertificateListActivity extends AppCompatActivity {
183 185
        String token = null;
184 186
        try {
185 187
            token = DES3.encode(String.valueOf(tokenTime));
188
            token = URLEncoder.encode(token, "UTF-8");
186 189
        } catch (Exception e) {
187 190
            e.printStackTrace();
188 191
        }

+ 75 - 0
app/src/main/java/com/electric/chargingpile/activity/CarSeriesActivity.java

@ -0,0 +1,75 @@
1
package com.electric.chargingpile.activity;
2
3
import androidx.appcompat.app.AppCompatActivity;
4
import androidx.recyclerview.widget.LinearLayoutManager;
5
import androidx.recyclerview.widget.RecyclerView;
6
7
import android.content.Intent;
8
import android.os.Bundle;
9
import android.view.View;
10
11
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
12
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
13
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
14
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.adapter.CarSeriesGroupedListAdapter;
16
import com.electric.chargingpile.entity.CarCompanyEntity;
17
import com.electric.chargingpile.entity.CarSeriesEntity;
18
import com.electric.chargingpile.event.CarCompanyEvent;
19
import com.electric.chargingpile.event.CarSeriesEvent;
20
import com.electric.chargingpile.util.BarColorUtil;
21
22
import org.greenrobot.eventbus.EventBus;
23
24
import java.util.ArrayList;
25
26
public class CarSeriesActivity extends AppCompatActivity implements View.OnClickListener {
27
28
    private RecyclerView recycler_view;
29
    private StickyHeaderLayout sticky_header_layout;
30
    private CarSeriesGroupedListAdapter adapter;
31
    private ArrayList<CarCompanyEntity> companyList;
32
33
    @Override
34
    protected void onCreate(Bundle savedInstanceState) {
35
        super.onCreate(savedInstanceState);
36
        setContentView(R.layout.activity_car_series);
37
        BarColorUtil.initStatusBarColor(CarSeriesActivity.this);
38
        initViews();
39
    }
40
41
    private void initViews() {
42
        findViewById(R.id.nav_bar).setOnClickListener(this::onClick);
43
        CarCompanyEvent event = EventBus.getDefault().removeStickyEvent(CarCompanyEvent.class);
44
        if (event != null) {
45
            companyList = event.getCompanyList();
46
        }
47
48
        recycler_view = (RecyclerView) findViewById(R.id.recycler_view);
49
        sticky_header_layout = (StickyHeaderLayout) findViewById(R.id.sticky_header_layout);
50
51
        recycler_view.setLayoutManager(new LinearLayoutManager(this));
52
        adapter = new CarSeriesGroupedListAdapter(this, companyList);
53
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
54
            @Override
55
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
56
                CarSeriesEntity carSeriesEntity = companyList.get(groupPosition).getSerieslist().get(childPosition);
57
                EventBus.getDefault().postSticky(new CarSeriesEvent(carSeriesEntity));
58
                startActivity(new Intent(CarSeriesActivity.this, CarModelActivity.class));
59
            }
60
        });
61
62
        recycler_view.setAdapter(adapter);
63
        // 设置是否吸顶。
64
        sticky_header_layout.setSticky(true);
65
    }
66
67
    @Override
68
    public void onClick(View v) {
69
        switch (v.getId()) {
70
            case R.id.nav_bar:
71
                finish();
72
                break;
73
        }
74
    }
75
}

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

@ -631,7 +631,7 @@ public class RegisterActivity extends Activity implements OnClickListener {
631 631
                        new Handler().postDelayed(new Runnable() {
632 632
                            public void run() {
633 633
                                ActivityManagerApplication.destoryActivity("login");
634
                                startActivity(new Intent(RegisterActivity.this, SkipUserInfoActivity.class));
634
//                                startActivity(new Intent(RegisterActivity.this, SkipUserInfoActivity.class));
635 635
                                finish();
636 636
                            }
637 637
                        }, 1200);

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

@ -435,9 +435,6 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
435 435
436 436
437 437
        set_loginShow();
438
439
        getCarOwnerCertificateList("init");
440
441 438
    }
442 439
443 440
    private void getSharePrompt(String user_id) {
@ -795,6 +792,7 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
795 792
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
796 793
                    startActivity(new Intent(getApplication(), LoginActivity.class));
797 794
                } else {
795
                    loadDialog.show();
798 796
                    getCarOwnerCertificateList("certificate");
799 797
                }
800 798
                break;
@ -803,6 +801,7 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
803 801
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
804 802
                    startActivity(new Intent(getApplication(), LoginActivity.class));
805 803
                } else {
804
                    loadDialog.show();
806 805
                    getCarOwnerCertificateList("price");
807 806
                }
808 807
                break;
@ -1065,11 +1064,11 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
1065 1064
    }
1066 1065
1067 1066
    private void getCarOwnerCertificateList(String from) {
1068
        loadDialog.show();
1069 1067
        long tokenTime = System.currentTimeMillis() / 1000 - MainMapActivity.cha - 1;
1070 1068
        String token = null;
1071 1069
        try {
1072 1070
            token = DES3.encode(String.valueOf(tokenTime));
1071
            token = URLEncoder.encode(token, "UTF-8");
1073 1072
        } catch (Exception e) {
1074 1073
            e.printStackTrace();
1075 1074
        }
@ -1176,8 +1175,9 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
1176 1175
                userIcon.setImageResource(R.drawable.icon_face2_0);
1177 1176
            }
1178 1177
        }
1179
1180
1178
        if (MainApplication.isLogin()) {
1179
            getCarOwnerCertificateList("init");
1180
        }
1181 1181
    }
1182 1182
1183 1183

+ 19 - 4
app/src/main/java/com/electric/chargingpile/activity/UserInfoActivity.java

@ -86,6 +86,7 @@ import java.io.ByteArrayOutputStream;
86 86
import java.io.File;
87 87
import java.io.FileOutputStream;
88 88
import java.io.IOException;
89
import java.net.URLEncoder;
89 90
import java.util.ArrayList;
90 91
import java.util.HashMap;
91 92
import java.util.List;
@ -243,6 +244,12 @@ public class UserInfoActivity extends Activity implements View.OnClickListener,
243 244
        go_title = findViewById(R.id.go_title);
244 245
        go_desc = findViewById(R.id.go_desc);
245 246
        go_cursor = findViewById(R.id.go_cursor);
247
248
        TextView phone = findViewById(R.id.phone);
249
        String userPhone = MainApplication.userPhone;
250
        if (userPhone.length() == 11) {
251
            phone.setText(userPhone.substring(0, 3) + "****" + userPhone.substring(7, userPhone.length()));
252
        }
246 253
    }
247 254
248 255
    private void setIcon() {
@ -258,12 +265,10 @@ public class UserInfoActivity extends Activity implements View.OnClickListener,
258 265
259 266
                        @Override
260 267
                        public void onBitmapFailed(Drawable drawable) {
261
262 268
                        }
263 269
264 270
                        @Override
265 271
                        public void onPrepareLoad(Drawable drawable) {
266
267 272
                        }
268 273
                    });
269 274
        } else {
@ -1053,7 +1058,17 @@ public class UserInfoActivity extends Activity implements View.OnClickListener,
1053 1058
        if (showLoading) {
1054 1059
            loadDialog.show();
1055 1060
        }
1056
        String url = MainApplication.url + "/zhannew/basic/web/index.php/car/my?userid=" + MainApplication.userId;
1061
1062
        long tokenTime = System.currentTimeMillis() / 1000 - MainMapActivity.cha - 1;
1063
        String token = null;
1064
        try {
1065
            token = DES3.encode(String.valueOf(tokenTime));
1066
            token = URLEncoder.encode(token, "UTF-8");
1067
        } catch (Exception e) {
1068
            e.printStackTrace();
1069
        }
1070
1071
        String url = MainApplication.url + "/zhannew/basic/web/index.php/car/my?userid=" + MainApplication.userId + "&token=" + token;
1057 1072
        OkHttpUtils.get().url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
1058 1073
            @Override
1059 1074
            public void onError(Call call, Exception e) {
@ -1104,7 +1119,7 @@ public class UserInfoActivity extends Activity implements View.OnClickListener,
1104 1119
                        go_cursor.setVisibility(View.VISIBLE);
1105 1120
                    }
1106 1121
1107
                    if (certificateStatus == 1) {
1122
                    if (certificateStatus == 1 && showLoading) {
1108 1123
                        startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
1109 1124
                    }
1110 1125

+ 11 - 2
app/src/main/java/com/electric/chargingpile/adapter/CarBrandGroupedListAdapter.java

@ -1,14 +1,18 @@
1 1
package com.electric.chargingpile.adapter;
2 2
3 3
import android.content.Context;
4
import android.graphics.Bitmap;
4 5
import android.view.LayoutInflater;
5 6
import android.view.View;
6 7
import android.view.ViewGroup;
7 8
import android.widget.Button;
8 9
import android.widget.ImageView;
9 10
11
import androidx.annotation.Nullable;
12
10 13
import com.bumptech.glide.Glide;
11 14
import com.bumptech.glide.load.engine.DiskCacheStrategy;
15
import com.bumptech.glide.request.target.ImageViewTarget;
12 16
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
13 17
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
14 18
import com.electric.chargingpile.R;
@ -92,7 +96,12 @@ public class CarBrandGroupedListAdapter extends GroupedRecyclerViewAdapter {
92 96
            holder.setVisible(R.id.line, View.VISIBLE);
93 97
        }
94 98
        ImageView icon = holder.getImageView(R.id.icon);
95
        final float scale = mContext.getResources().getDisplayMetrics().density;
96
        Glide.with(mContext).load(entity.getIcon()).placeholder(android.R.color.white).dontAnimate().override((int)(40*scale), (int)(40*scale)).fitCenter().into(icon);
99
        try {
100
            String[] imgNames = entity.getIcon().split("!w");
101
            imgNames[1] = imgNames[1].replace("480", "144");
102
            Glide.with(mContext).load(imgNames[0] + "!w" + imgNames[1]).placeholder(android.R.color.white).dontAnimate().diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(icon);
103
        } catch (Exception e) {
104
            e.printStackTrace();
105
        }
97 106
    }
98 107
}

+ 20 - 12
app/src/main/java/com/electric/chargingpile/adapter/CarModelGroupedListAdapter.java

@ -11,16 +11,20 @@ import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
11 11
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
12 12
import com.electric.chargingpile.R;
13 13
import com.electric.chargingpile.entity.CarCompanyEntity;
14
import com.electric.chargingpile.entity.CarModelChildEntity;
15
import com.electric.chargingpile.entity.CarModelGroupEntity;
14 16
import com.electric.chargingpile.entity.CarSeriesEntity;
15 17
16 18
import java.util.ArrayList;
17 19
18 20
public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
19
    protected ArrayList<CarCompanyEntity> groups;
21
    protected ArrayList<CarModelGroupEntity> groups;
22
    private String masterPic = "";
20 23
21
    public CarModelGroupedListAdapter(Context context, ArrayList<CarCompanyEntity> groups) {
24
    public CarModelGroupedListAdapter(Context context, ArrayList<CarModelGroupEntity> groups, String masterPic) {
22 25
        super(context);
23 26
        this.groups = groups;
27
        this.masterPic = masterPic;
24 28
    }
25 29
26 30
    public void clear() {
@ -28,7 +32,7 @@ public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
28 32
        notifyDataChanged();
29 33
    }
30 34
31
    public void setGroups(ArrayList<CarCompanyEntity> groups) {
35
    public void setGroups(ArrayList<CarModelGroupEntity> groups) {
32 36
        this.groups = groups;
33 37
        notifyDataChanged();
34 38
    }
@ -40,7 +44,7 @@ public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
40 44
41 45
    @Override
42 46
    public int getChildrenCount(int groupPosition) {
43
        ArrayList<CarSeriesEntity> children = groups.get(groupPosition).getSerieslist();
47
        ArrayList<CarModelChildEntity> children = groups.get(groupPosition).getList();
44 48
        return children == null ? 0 : children.size();
45 49
    }
46 50
@ -71,8 +75,8 @@ public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
71 75
72 76
    @Override
73 77
    public void onBindHeaderViewHolder(BaseViewHolder holder, int groupPosition) {
74
        CarCompanyEntity entity = groups.get(groupPosition);
75
        holder.setText(R.id.title, entity.getCompanyName());
78
        CarModelGroupEntity entity = groups.get(groupPosition);
79
        holder.setText(R.id.title, entity.getYear());
76 80
    }
77 81
78 82
    @Override
@ -82,17 +86,21 @@ public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
82 86
83 87
    @Override
84 88
    public void onBindChildViewHolder(BaseViewHolder holder, int groupPosition, int childPosition) {
85
        CarSeriesEntity entity = groups.get(groupPosition).getSerieslist().get(childPosition);
86
        holder.setText(R.id.title, entity.getSeriesName());
89
        CarModelChildEntity entity = groups.get(groupPosition).getList().get(childPosition);
90
        holder.setText(R.id.model_name, entity.getModelName());
87 91
        if (childPosition == 0) {
88 92
            holder.setVisible(R.id.line, View.GONE);
89 93
        } else {
90 94
            holder.setVisible(R.id.line, View.VISIBLE);
91 95
        }
92 96
        ImageView master_pic = holder.getImageView(R.id.master_pic);
93
        final float scale = mContext.getResources().getDisplayMetrics().density;
94
        Glide.with(mContext).load(entity.getMasterPic()).placeholder(android.R.color.white).dontAnimate().override((int)(scale*120), (int)(scale*80)).diskCacheStrategy(DiskCacheStrategy.RESOURCE).fitCenter().into(master_pic);
95
        holder.setText(R.id.sale_price, entity.getSalePrice());
96
    }
97 97
98
        try {
99
            String[] imgNames = masterPic.split("!w");
100
            imgNames[1] = imgNames[1].replace("480", "240");
101
            Glide.with(mContext).load(imgNames[0] + "!w" + imgNames[1]).placeholder(android.R.color.white).dontAnimate().diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(master_pic);
102
        } catch (Exception e) {
103
            e.printStackTrace();
104
        }
105
    }
98 106
}

+ 16 - 19
app/src/main/java/com/electric/chargingpile/adapter/CarOwnerCertificateListAdapter.java

@ -14,8 +14,11 @@ import androidx.annotation.NonNull;
14 14
import androidx.recyclerview.widget.RecyclerView;
15 15
16 16
import com.bumptech.glide.Glide;
17
import com.bumptech.glide.load.engine.DiskCacheStrategy;
17 18
import com.electric.chargingpile.R;
19
import com.electric.chargingpile.activity.CarOwnerCertificateActivity;
18 20
import com.electric.chargingpile.data.CarOwnerCertificateBean;
21
import com.electric.chargingpile.entity.CarModelEntity;
19 22
import com.electric.chargingpile.entity.CarSeriesEntity;
20 23
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
21 24
import com.electric.chargingpile.util.DateUtils;
@ -48,10 +51,16 @@ public class CarOwnerCertificateListAdapter extends RecyclerView.Adapter<CarOwne
48 51
    public void onBindViewHolder(@NonNull CarOwnerCertificateListHolder holder, int position) {
49 52
        CarOwnerCertificateBean bean = mList.get(position);
50 53
        Gson gson = new Gson();
51
        CarSeriesEntity carSeriesEntity = gson.fromJson(bean.getChexing(), CarSeriesEntity.class);
52
        Glide.with(mContext).load(carSeriesEntity.getIcon()).into(holder.master_pic);
53
        holder.name.setText(carSeriesEntity.getCompanyName());
54
        holder.detail_name.setText(carSeriesEntity.getSeriesName());
54
        CarModelEntity carModelEntity = gson.fromJson(bean.getChexing(), CarModelEntity.class);
55
        try {
56
            String[] imgNames = carModelEntity.getMasterPic().split("!w");
57
            imgNames[1] = imgNames[1].replace("480", "240");
58
            Glide.with(mContext).load(imgNames[0] + "!w" + imgNames[1]).placeholder(android.R.color.white).dontAnimate().diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(holder.master_pic);
59
        } catch (Exception e) {
60
            e.printStackTrace();
61
        }
62
        holder.name.setText(carModelEntity.getSeriesName());
63
        holder.detail_name.setText(carModelEntity.getModelName());
55 64
56 65
        holder.main.setVisibility(View.GONE);
57 66
        holder.set_main.setVisibility(View.GONE);
@ -104,7 +113,7 @@ public class CarOwnerCertificateListAdapter extends RecyclerView.Adapter<CarOwne
104 113
            @Override
105 114
            public void onClick(View v) {
106 115
                new AlertDialogTwo(mContext).builder()
107
                        .setMsg("是否设置为主车型" + carSeriesEntity.getSeriesName() + "?")
116
                        .setMsg("是否设置为主车型" + carModelEntity.getSeriesName() + " " + carModelEntity.getModelName() + "?")
108 117
                        .setPositiveButton("是", new View.OnClickListener() {
109 118
                            @Override
110 119
                            public void onClick(View v) {
@ -122,7 +131,7 @@ public class CarOwnerCertificateListAdapter extends RecyclerView.Adapter<CarOwne
122 131
            @Override
123 132
            public void onClick(View v) {
124 133
                new AlertDialogTwo(mContext).builder()
125
                        .setMsg("是否删除" + carSeriesEntity.getSeriesName() + "?")
134
                        .setMsg("是否删除" + carModelEntity.getSeriesName() + " " + carModelEntity.getModelName() + "?")
126 135
                        .setPositiveButton("是", new View.OnClickListener() {
127 136
                            @Override
128 137
                            public void onClick(View v) {
@ -139,19 +148,7 @@ public class CarOwnerCertificateListAdapter extends RecyclerView.Adapter<CarOwne
139 148
        holder.edit.setOnClickListener(new View.OnClickListener() {
140 149
            @Override
141 150
            public void onClick(View v) {
142
                new AlertDialogTwo(mContext).builder()
143
                        .setMsg("是否编辑" + carSeriesEntity.getSeriesName() + "?")
144
                        .setPositiveButton("是", new View.OnClickListener() {
145
                            @Override
146
                            public void onClick(View v) {
147
                                recyclerItemTypeClickListener.onItemClickListener(position, 2);
148
                            }
149
                        }).setNegativeButton("否", new View.OnClickListener() {
150
                    @Override
151
                    public void onClick(View v) {
152
153
                    }
154
                }).show();
151
                recyclerItemTypeClickListener.onItemClickListener(position, 2);
155 152
            }
156 153
        });
157 154
    }

+ 97 - 0
app/src/main/java/com/electric/chargingpile/adapter/CarSeriesGroupedListAdapter.java

@ -0,0 +1,97 @@
1
package com.electric.chargingpile.adapter;
2
3
import android.content.Context;
4
import android.view.View;
5
import android.widget.ImageView;
6
7
import com.bumptech.glide.Glide;
8
import com.bumptech.glide.load.engine.DiskCacheStrategy;
9
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
10
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
11
import com.electric.chargingpile.R;
12
import com.electric.chargingpile.entity.CarCompanyEntity;
13
import com.electric.chargingpile.entity.CarSeriesEntity;
14
15
import java.util.ArrayList;
16
17
public class CarSeriesGroupedListAdapter extends GroupedRecyclerViewAdapter {
18
    protected ArrayList<CarCompanyEntity> groups;
19
20
    public CarSeriesGroupedListAdapter(Context context, ArrayList<CarCompanyEntity> groups) {
21
        super(context);
22
        this.groups = groups;
23
    }
24
25
    public void clear() {
26
        groups.clear();
27
        notifyDataChanged();
28
    }
29
30
    public void setGroups(ArrayList<CarCompanyEntity> groups) {
31
        this.groups = groups;
32
        notifyDataChanged();
33
    }
34
35
    @Override
36
    public int getGroupCount() {
37
        return groups == null ? 0 : groups.size();
38
    }
39
40
    @Override
41
    public int getChildrenCount(int groupPosition) {
42
        ArrayList<CarSeriesEntity> children = groups.get(groupPosition).getSerieslist();
43
        return children == null ? 0 : children.size();
44
    }
45
46
    @Override
47
    public boolean hasHeader(int groupPosition) {
48
        return true;
49
    }
50
51
    @Override
52
    public boolean hasFooter(int groupPosition) {
53
        return false;
54
    }
55
56
    @Override
57
    public int getHeaderLayout(int viewType) {
58
        return R.layout.adapter_header_car_series;
59
    }
60
61
    @Override
62
    public int getFooterLayout(int viewType) {
63
        return 0;
64
    }
65
66
    @Override
67
    public int getChildLayout(int viewType) {
68
        return R.layout.adapter_child_car_series;
69
    }
70
71
    @Override
72
    public void onBindHeaderViewHolder(BaseViewHolder holder, int groupPosition) {
73
        CarCompanyEntity entity = groups.get(groupPosition);
74
        holder.setText(R.id.title, entity.getCompanyName());
75
    }
76
77
    @Override
78
    public void onBindFooterViewHolder(BaseViewHolder holder, int groupPosition) {
79
80
    }
81
82
    @Override
83
    public void onBindChildViewHolder(BaseViewHolder holder, int groupPosition, int childPosition) {
84
        CarSeriesEntity entity = groups.get(groupPosition).getSerieslist().get(childPosition);
85
        holder.setText(R.id.title, entity.getSeriesName());
86
        if (childPosition == 0) {
87
            holder.setVisible(R.id.line, View.GONE);
88
        } else {
89
            holder.setVisible(R.id.line, View.VISIBLE);
90
        }
91
        ImageView master_pic = holder.getImageView(R.id.master_pic);
92
        final float scale = mContext.getResources().getDisplayMetrics().density;
93
//        Glide.with(mContext).load(entity.getMasterPic()).placeholder(android.R.color.white).dontAnimate().override(216, 144).diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(master_pic);
94
        Glide.with(mContext).load(entity.getMasterPic().replace("480", "144")).diskCacheStrategy(DiskCacheStrategy.ALL).fitCenter().into(master_pic);
95
        holder.setText(R.id.sale_price, entity.getSalePrice());
96
    }
97
}

+ 9 - 2
app/src/main/java/com/electric/chargingpile/adapter/ZhanCommentsAapter.java

@ -136,6 +136,7 @@ public class ZhanCommentsAapter extends BaseAdapter {
136 136
            holder.lv_scomment = (ListView) convertView.findViewById(R.id.lv_scomment);
137 137
138 138
            holder.iv_picon = (ImageView) convertView.findViewById(R.id.iv_picon);
139
            holder.certified_icon = (ImageView)convertView.findViewById(R.id.certified_icon);
139 140
            holder.iv_pgrade = (ImageView) convertView.findViewById(R.id.iv_pgrade);
140 141
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
141 142
            holder.iv_level_img = (ImageView) convertView.findViewById(R.id.iv_level_img);
@ -237,8 +238,14 @@ public class ZhanCommentsAapter extends BaseAdapter {
237 238
                holder.tv_ptime.setText(TimeStamp2Date(datas.get(position).getString("addtime"), "yyyy-MM-dd"));
238 239
                //父级评论人车型
239 240
                String chexing = datas.get(position).getString("hascar");
240
241
                int isCertifiedOwner = datas.get(position).getInt("is_certified_owner");
241 242
                holder.tv_pcar.setText(CarTypeUtil.getCarType(chexing));
243
//                holder.tv_pcar.setText(carSeries);
244
                if (isCertifiedOwner == 1) {
245
                    holder.certified_icon.setVisibility(View.VISIBLE);
246
                } else {
247
                    holder.certified_icon.setVisibility(View.GONE);
248
                }
242 249
243 250
                //父级回复
244 251
                holder.tv_preply.setOnClickListener(new View.OnClickListener() {
@ -518,7 +525,7 @@ public class ZhanCommentsAapter extends BaseAdapter {
518 525
519 526
    private class ViewHolder {
520 527
        TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
521
        ImageView iv_picon;
528
        ImageView iv_picon, certified_icon;
522 529
        LinearLayout ll_pzan;
523 530
        ImageView iv_havemessage, iv_commentPic;
524 531
        ImageView iv_pgrade, iv_pzan, iv_level_img;

+ 10 - 8
app/src/main/java/com/electric/chargingpile/entity/CarCompanyEntity.java

@ -8,14 +8,6 @@ public class CarCompanyEntity {
8 8
    private int brandId;
9 9
    private ArrayList<CarSeriesEntity> serieslist;
10 10
11
    public CarCompanyEntity(int companyId, String companyName, int brandId, ArrayList<CarSeriesEntity> serieslist) {
12
        this.companyId = companyId;
13
        this.companyName = companyName;
14
        this.brandId = brandId;
15
        this.serieslist = serieslist;
16
    }
17
18
19 11
    public int getCompanyId() {
20 12
        return companyId;
21 13
    }
@ -47,4 +39,14 @@ public class CarCompanyEntity {
47 39
    public void setSerieslist(ArrayList<CarSeriesEntity> serieslist) {
48 40
        this.serieslist = serieslist;
49 41
    }
42
43
    @Override
44
    public String toString() {
45
        return "CarCompanyEntity{" +
46
                "companyId=" + companyId +
47
                ", companyName='" + companyName + '\'' +
48
                ", brandId=" + brandId +
49
                ", serieslist=" + serieslist +
50
                '}';
51
    }
50 52
}

+ 30 - 0
app/src/main/java/com/electric/chargingpile/entity/CarModelChildEntity.java

@ -0,0 +1,30 @@
1
package com.electric.chargingpile.entity;
2
3
public class CarModelChildEntity {
4
    private int modelId;
5
    private String modelName;
6
7
    public int getModelId() {
8
        return modelId;
9
    }
10
11
    public void setModelId(int modelId) {
12
        this.modelId = modelId;
13
    }
14
15
    public String getModelName() {
16
        return modelName;
17
    }
18
19
    public void setModelName(String modelName) {
20
        this.modelName = modelName;
21
    }
22
23
    @Override
24
    public String toString() {
25
        return "CarModelEntity{" +
26
                "modelId=" + modelId +
27
                ", modelName='" + modelName + '\'' +
28
                '}';
29
    }
30
}

+ 141 - 0
app/src/main/java/com/electric/chargingpile/entity/CarModelEntity.java

@ -0,0 +1,141 @@
1
package com.electric.chargingpile.entity;
2
3
public class CarModelEntity {
4
    private String brandId;
5
    private String brandName;
6
    private String companyId;
7
    private String companyName;
8
    private String seriesId;
9
    private String seriesName;
10
    private String salePrice;
11
    private String icon;
12
    private String masterPic;
13
    private String maxSalePrice;
14
    private String minSalePrice;
15
16
    private int modelId;
17
    private String modelName;
18
19
    public String getBrandId() {
20
        return brandId;
21
    }
22
23
    public void setBrandId(String brandId) {
24
        this.brandId = brandId;
25
    }
26
27
    public String getBrandName() {
28
        return brandName;
29
    }
30
31
    public void setBrandName(String brandName) {
32
        this.brandName = brandName;
33
    }
34
35
    public String getCompanyId() {
36
        return companyId;
37
    }
38
39
    public void setCompanyId(String companyId) {
40
        this.companyId = companyId;
41
    }
42
43
    public String getCompanyName() {
44
        return companyName;
45
    }
46
47
    public void setCompanyName(String companyName) {
48
        this.companyName = companyName;
49
    }
50
51
    public String getSeriesId() {
52
        return seriesId;
53
    }
54
55
    public void setSeriesId(String seriesId) {
56
        this.seriesId = seriesId;
57
    }
58
59
    public String getSeriesName() {
60
        return seriesName;
61
    }
62
63
    public void setSeriesName(String seriesName) {
64
        this.seriesName = seriesName;
65
    }
66
67
    public String getSalePrice() {
68
        return salePrice;
69
    }
70
71
    public void setSalePrice(String salePrice) {
72
        this.salePrice = salePrice;
73
    }
74
75
    public String getIcon() {
76
        return icon;
77
    }
78
79
    public void setIcon(String icon) {
80
        this.icon = icon;
81
    }
82
83
    public String getMasterPic() {
84
        return masterPic;
85
    }
86
87
    public void setMasterPic(String masterPic) {
88
        this.masterPic = masterPic;
89
    }
90
91
    public String getMaxSalePrice() {
92
        return maxSalePrice;
93
    }
94
95
    public void setMaxSalePrice(String maxSalePrice) {
96
        this.maxSalePrice = maxSalePrice;
97
    }
98
99
    public String getMinSalePrice() {
100
        return minSalePrice;
101
    }
102
103
    public void setMinSalePrice(String minSalePrice) {
104
        this.minSalePrice = minSalePrice;
105
    }
106
107
    public int getModelId() {
108
        return modelId;
109
    }
110
111
    public void setModelId(int modelId) {
112
        this.modelId = modelId;
113
    }
114
115
    public String getModelName() {
116
        return modelName;
117
    }
118
119
    public void setModelName(String modelName) {
120
        this.modelName = modelName;
121
    }
122
123
    @Override
124
    public String toString() {
125
        return "CarModelEntity{" +
126
                "brandId='" + brandId + '\'' +
127
                ", brandName='" + brandName + '\'' +
128
                ", companyId='" + companyId + '\'' +
129
                ", companyName='" + companyName + '\'' +
130
                ", seriesId='" + seriesId + '\'' +
131
                ", seriesName='" + seriesName + '\'' +
132
                ", salePrice='" + salePrice + '\'' +
133
                ", icon='" + icon + '\'' +
134
                ", masterPic='" + masterPic + '\'' +
135
                ", maxSalePrice='" + maxSalePrice + '\'' +
136
                ", minSalePrice='" + minSalePrice + '\'' +
137
                ", modelId=" + modelId +
138
                ", modelName='" + modelName + '\'' +
139
                '}';
140
    }
141
}

+ 32 - 0
app/src/main/java/com/electric/chargingpile/entity/CarModelGroupEntity.java

@ -0,0 +1,32 @@
1
package com.electric.chargingpile.entity;
2
3
import java.util.ArrayList;
4
5
public class CarModelGroupEntity {
6
    private String year;
7
    private ArrayList<CarModelChildEntity> list;
8
9
    public String getYear() {
10
        return year;
11
    }
12
13
    public void setYear(String year) {
14
        this.year = year;
15
    }
16
17
    public ArrayList<CarModelChildEntity> getList() {
18
        return list;
19
    }
20
21
    public void setList(ArrayList<CarModelChildEntity> list) {
22
        this.list = list;
23
    }
24
25
    @Override
26
    public String toString() {
27
        return "CarModelGroupEntity{" +
28
                "year='" + year + '\'' +
29
                ", list=" + list +
30
                '}';
31
    }
32
}

+ 19 - 0
app/src/main/java/com/electric/chargingpile/event/CarModelEvent.java

@ -0,0 +1,19 @@
1
package com.electric.chargingpile.event;
2
3
import com.electric.chargingpile.entity.CarModelEntity;
4
5
public class CarModelEvent {
6
    private CarModelEntity carModelEntity;
7
8
    public CarModelEvent(CarModelEntity carModelEntity) {
9
        this.carModelEntity = carModelEntity;
10
    }
11
12
    public CarModelEntity getCarModelEntity() {
13
        return carModelEntity;
14
    }
15
16
    public void setCarModelEntity(CarModelEntity carModelEntity) {
17
        this.carModelEntity = carModelEntity;
18
    }
19
}

+ 2 - 2
app/src/main/java/com/electric/chargingpile/event/CarSerieEvent.java

@ -2,10 +2,10 @@ package com.electric.chargingpile.event;
2 2
3 3
import com.electric.chargingpile.entity.CarSeriesEntity;
4 4
5
public class CarSerieEvent {
5
public class CarSeriesEvent {
6 6
    private CarSeriesEntity carSeriesEntity;
7 7
8
    public CarSerieEvent(CarSeriesEntity carSeriesEntity) {
8
    public CarSeriesEvent(CarSeriesEntity carSeriesEntity) {
9 9
        this.carSeriesEntity = carSeriesEntity;
10 10
    }
11 11

+ 0 - 29
app/src/main/java/com/electric/chargingpile/fragment/ZhanCommentFragment.java

@ -285,8 +285,6 @@ public class ZhanCommentFragment extends Fragment {
285 285
286 286
    public void getCommentsData() {
287 287
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
288
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
289
//        Log.e(TAG, "getCommentsData=" + url);
290 288
        OkHttpUtils.get().url(url)
291 289
                .build().connTimeOut(6000).readTimeOut(6000)
292 290
                .execute(new StringCallback() {
@ -297,19 +295,16 @@ public class ZhanCommentFragment extends Fragment {
297 295
298 296
                    @Override
299 297
                    public void onResponse(String response) {
300
//                        Log.e(TAG, "response=" + response);
301 298
                        String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
302 299
                        if (null != rtnCode && rtnCode.equals("01")) {
303 300
                            try {
304 301
                                JSONObject jsonObj = new JSONObject(response);
305 302
                                String commentData = jsonObj.getString("data");
306 303
                                JSONArray jsonArray = new JSONArray(commentData);
307
//                                datas.clear();
308 304
                                for (int j = 0; j < jsonArray.length(); j++) {
309 305
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
310 306
                                    datas.add(jsonObject);
311 307
                                }
312
//                                Log.e(TAG, "dealData: size=" + datas.size());
313 308
                                if (datas.size() == 0) {
314 309
                                    ll_tishi.setVisibility(View.VISIBLE);
315 310
                                    lv_comment.setVisibility(View.GONE);
@ -324,7 +319,6 @@ public class ZhanCommentFragment extends Fragment {
324 319
                                e.printStackTrace();
325 320
                            }
326 321
                        } else {
327
//                            Log.e(TAG, "error");
328 322
                        }
329 323
                    }
330 324
                });
@ -332,8 +326,6 @@ public class ZhanCommentFragment extends Fragment {
332 326
333 327
    private void getPullToRefreshData(final boolean isClear) {
334 328
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=" + index;
335
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
336
//        Log.e(TAG, "getPullToRefreshData=" + url);
337 329
        OkHttpUtils.get().url(url)
338 330
                .build().connTimeOut(6000).readTimeOut(6000)
339 331
                .execute(new StringCallback() {
@ -344,7 +336,6 @@ public class ZhanCommentFragment extends Fragment {
344 336
345 337
                    @Override
346 338
                    public void onResponse(String response) {
347
//                        Log.e(TAG, "response=" + response);
348 339
                        String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
349 340
                        if (null != rtnCode && rtnCode.equals("01")) {
350 341
//                            Gson gson = new Gson();
@ -360,7 +351,6 @@ public class ZhanCommentFragment extends Fragment {
360 351
                                if (isClear == true) {
361 352
                                    datas.clear();
362 353
                                }
363
//                                Log.e(TAG,"datas.size="+datas.size()+"");
364 354
365 355
                                for (int j = 0; j < jsonArray.length(); j++) {
366 356
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
@ -372,15 +362,12 @@ public class ZhanCommentFragment extends Fragment {
372 362
                                        Toast.makeText(MainApplication.context, "已经全部加载完毕", Toast.LENGTH_SHORT).show();
373 363
                                    }
374 364
                                }
375
//                                Log.e(TAG, "dealData: size=" + datas.size());
376 365
                                if (datas.size() == 0) {
377 366
                                    ll_tishi.setVisibility(View.VISIBLE);
378 367
                                    lv_comment.setVisibility(View.GONE);
379
//                                    tv_tips.setVisibility(View.GONE);
380 368
                                } else {
381 369
                                    ll_tishi.setVisibility(View.GONE);
382 370
                                    lv_comment.setVisibility(View.VISIBLE);
383
//                                    tv_tips.setVisibility(View.VISIBLE);
384 371
                                }
385 372
386 373
                                if (null != datas) {
@ -390,7 +377,6 @@ public class ZhanCommentFragment extends Fragment {
390 377
                                        adapter.changeData(datas);
391 378
                                    }
392 379
                                }
393
//                                adapter = new ZhanCommentsAapter(datas, getActivity(), mContext);
394 380
                                lv_comment.setAdapter(adapter);
395 381
396 382
                                adapter.notifyDataSetChanged();
@ -405,7 +391,6 @@ public class ZhanCommentFragment extends Fragment {
405 391
                            }
406 392
407 393
                        } else {
408
//                            Log.e(TAG, "error");
409 394
                        }
410 395
                    }
411 396
                });
@ -416,8 +401,6 @@ public class ZhanCommentFragment extends Fragment {
416 401
        Gson gson = new Gson();
417 402
        PCommentBean pCommentBean = (PCommentBean) gson.fromJson(data, PCommentBean.class);
418 403
        List<PCommentBean.DataBean> list = pCommentBean.getData();
419
//        Log.e(TAG, "list==="+list.size() );
420
421 404
422 405
        JSONObject jsonObj = new JSONObject(data);
423 406
        String commentData = jsonObj.getString("data");
@ -427,7 +410,6 @@ public class ZhanCommentFragment extends Fragment {
427 410
            JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
428 411
            datas.add(jsonObject);
429 412
        }
430
//        Log.e(TAG, "dealData: size=" + datas.size());
431 413
        if (datas.size() == 0) {
432 414
            ll_tishi.setVisibility(View.VISIBLE);
433 415
            lv_comment.setVisibility(View.GONE);
@ -435,8 +417,6 @@ public class ZhanCommentFragment extends Fragment {
435 417
            ll_tishi.setVisibility(View.GONE);
436 418
            lv_comment.setVisibility(View.VISIBLE);
437 419
        }
438
439
440 420
    }
441 421
442 422
@ -444,8 +424,6 @@ public class ZhanCommentFragment extends Fragment {
444 424
    public void setUserVisibleHint(boolean isVisibleToUser) {
445 425
        super.setUserVisibleHint(isVisibleToUser);
446 426
        if (isVisibleToUser) {
447
//            Log.e("123","123");
448
//            getCommentsData(null);
449 427
        }
450 428
    }
451 429
@ -462,7 +440,6 @@ public class ZhanCommentFragment extends Fragment {
462 440
463 441
464 442
    private void addItemToFloatLayout(QMUIFloatLayout floatLayout, CommentTag commentTag) {
465
//        int currentChildCount = floatLayout.getChildCount();
466 443
467 444
        TextView textView = new TextView(getActivity());
468 445
@ -471,7 +448,6 @@ public class ZhanCommentFragment extends Fragment {
471 448
        textView.setPadding(textViewHPadding, textViewVPadding, textViewHPadding, textViewVPadding);
472 449
        textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
473 450
        textView.setTextColor(ContextCompat.getColor(getContext(), R.color.lvse));
474
//        textView.setText(String.valueOf(currentChildCount));
475 451
        textView.setText(commentTag.getName());
476 452
        textView.setBackgroundResource(R.drawable.bg_comment_tag);
477 453
@ -479,10 +455,6 @@ public class ZhanCommentFragment extends Fragment {
479 455
480 456
        ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, textViewSize);
481 457
        floatLayout.addView(textView, lp);
482
483
484
//        lineHeiht = textView.getMeasuredHeight();
485
//        LogUtils.e(lineHeiht);
486 458
    }
487 459
488 460
    private void removeItemFromFloatLayout(QMUIFloatLayout floatLayout) {
@ -491,5 +463,4 @@ public class ZhanCommentFragment extends Fragment {
491 463
        }
492 464
        floatLayout.removeView(floatLayout.getChildAt(floatLayout.getChildCount() - 1));
493 465
    }
494
495 466
}

+ 2 - 0
app/src/main/java/com/electric/chargingpile/util/CarTypeUtil.java

@ -14,6 +14,8 @@ public class CarTypeUtil {
14 14
        if (strarray.length > 1) {
15 15
            name0 = strarray[0];//江淮
16 16
            name1 = strarray[1];//iEV3
17
        } else {
18
            name0 = strarray[0];
17 19
        }
18 20
        if (chexing.equals("$$") || chexing == null || chexing.equals("") || chexing.equals("null") || chexing.equals("品牌$$车型") || chexing.equals("null$$null")) {
19 21
            car = "";

+ 25 - 8
app/src/main/java/com/electric/chargingpile/view/MyReceiver.java

@ -7,13 +7,18 @@ import android.os.Bundle;
7 7
import android.util.Log;
8 8
9 9
import com.electric.chargingpile.activity.MainActicity;
10
import com.electric.chargingpile.activity.MainMapActivity;
11
import com.electric.chargingpile.activity.MyWebViewActivity;
10 12
import com.electric.chargingpile.activity.WelcomeActivity;
11 13
import com.electric.chargingpile.application.MainApplication;
14
import com.electric.chargingpile.util.DES3;
12 15
import com.electric.chargingpile.util.ExampleUtil;
16
import com.umeng.analytics.MobclickAgent;
13 17
14 18
import org.json.JSONException;
15 19
import org.json.JSONObject;
16 20
21
import java.net.URLEncoder;
17 22
import java.util.Iterator;
18 23
19 24
import cn.jpush.android.api.JPushInterface;
@ -84,14 +89,26 @@ public class MyReceiver extends BroadcastReceiver {
84 89
            }
85 90
//			Log.e("articleUrl:", articleUrl);
86 91
            //打开自定义的Activity
87
            Intent i = new Intent(context, WelcomeActivity.class);
88
            i.putExtras(bundle);
89
            //i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
90
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
91
//			i.putExtra("url","https://www.baidu.com/");
92
//			i.putExtra("tag","5");
93
            context.startActivity(i);
94
92
            if ("PushRedBag".equals(type)) {
93
                long appTime4 = System.currentTimeMillis() / 1000;
94
                long updatetime4 = appTime4 - MainMapActivity.cha - 1;
95
                String token4 = String.valueOf(updatetime4);
96
                Intent intent4 = new Intent(context, MyWebViewActivity.class);
97
                String web1 = null;
98
                try {
99
                    web1 = MainApplication.url + "/zhannew/basic/web/index.php/discount/redlist?userid=" + MainApplication.userId + "&token=" + URLEncoder.encode(DES3.encode(token4));
100
                } catch (Exception e) {
101
                    e.printStackTrace();
102
                }
103
                intent4.putExtra("url", web1);
104
                context.startActivity(intent4);
105
                MobclickAgent.onEvent(context, "0808");
106
            } else {
107
                Intent i = new Intent(context, WelcomeActivity.class);
108
                i.putExtras(bundle);
109
                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
110
                context.startActivity(i);
111
            }
95 112
        } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
96 113
            Log.d(TAG, "[MyReceiver] 用户收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
97 114
            //在这里根据 JPushInterface.EXTRA_EXTRA 的内容处理代码,比如打开新的Activity, 打开一个网页等..

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


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


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


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


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


+ 14 - 1
app/src/main/res/layout/activity_car_model.xml

@ -5,7 +5,7 @@
5 5
    android:layout_width="match_parent"
6 6
    android:layout_height="match_parent"
7 7
    android:background="@color/white"
8
    tools:context=".activity.CarModelActivity">
8
    tools:context=".activity.CarSeriesActivity">
9 9
10 10
    <androidx.constraintlayout.widget.ConstraintLayout
11 11
        android:id="@+id/nav_bar"
@ -54,4 +54,17 @@
54 54
            android:layout_width="match_parent"
55 55
            android:layout_height="match_parent" />
56 56
    </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
57
58
    <TextView
59
        android:id="@+id/no_data"
60
        android:layout_width="match_parent"
61
        android:layout_height="wrap_content"
62
        android:gravity="center"
63
        android:text="暂无车型"
64
        android:textColor="#999999"
65
        android:textSize="14sp"
66
        android:visibility="gone"
67
        app:layout_constraintBottom_toBottomOf="parent"
68
        app:layout_constraintTop_toBottomOf="@+id/nav_bar"
69
        tools:visibility="visible" />
57 70
</androidx.constraintlayout.widget.ConstraintLayout>

+ 17 - 10
app/src/main/res/layout/activity_car_owner_certificate.xml

@ -111,30 +111,37 @@
111 111
                    tools:background="#00ff00" />
112 112
113 113
                <TextView
114
                    android:id="@+id/car_name"
115
                    android:layout_width="wrap_content"
114
                    android:id="@+id/car_series"
115
                    android:layout_width="0dp"
116 116
                    android:layout_height="wrap_content"
117 117
                    android:layout_marginLeft="10dp"
118 118
                    android:layout_marginTop="12dp"
119
                    android:layout_marginRight="15dp"
119 120
                    android:textColor="#FF222222"
120 121
                    android:textSize="14sp"
121 122
                    app:layout_constraintLeft_toRightOf="@+id/car_icon"
123
                    app:layout_constraintRight_toLeftOf="@+id/model_cursor"
122 124
                    app:layout_constraintTop_toTopOf="parent"
123
                    tools:text="蔚来ES6" />
125
                    tools:text="本田 CR-V" />
124 126
125 127
                <TextView
126
                    android:id="@+id/car_series"
127
                    android:layout_width="wrap_content"
128
                    android:id="@+id/car_model"
129
                    android:layout_width="0dp"
128 130
                    android:layout_height="wrap_content"
131
                    android:layout_marginLeft="10dp"
132
                    android:layout_marginTop="5dp"
133
                    android:layout_marginRight="15dp"
129 134
                    android:layout_marginBottom="10dp"
130 135
                    android:textColor="#FF0D1120"
131 136
                    android:textSize="14sp"
132 137
                    app:layout_constraintBottom_toBottomOf="parent"
133
                    app:layout_constraintLeft_toLeftOf="@+id/car_name"
134
138
                    app:layout_constraintLeft_toRightOf="@+id/car_icon"
139
                    app:layout_constraintRight_toLeftOf="@+id/model_cursor"
140
                    app:layout_constraintTop_toBottomOf="@+id/car_series"
135 141
                    tools:text="2020款 420KM 运动版" />
136 142
137 143
                <ImageView
144
                    android:id="@+id/model_cursor"
138 145
                    android:layout_width="wrap_content"
139 146
                    android:layout_height="wrap_content"
140 147
                    android:src="@drawable/icon_right_cursor"
@ -191,11 +198,11 @@
191 198
                android:layout_width="match_parent"
192 199
                android:layout_height="wrap_content"
193 200
                android:layout_marginTop="5dp"
194
                android:visibility="gone"
195
                tools:visibility="visible"
196 201
                android:layout_marginBottom="50dp"
197 202
                android:orientation="vertical"
198
                app:layout_constraintTop_toBottomOf="@+id/driving_license">
203
                android:visibility="gone"
204
                app:layout_constraintTop_toBottomOf="@+id/driving_license"
205
                tools:visibility="visible">
199 206
200 207
                <LinearLayout
201 208
                    android:layout_width="match_parent"

+ 57 - 0
app/src/main/res/layout/activity_car_series.xml

@ -0,0 +1,57 @@
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:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/white"
8
    tools:context=".activity.CarSeriesActivity">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="44dp"
14
        app:layout_constraintTop_toTopOf="parent">
15
16
        <TextView
17
            android:id="@+id/nav_title"
18
            android:layout_width="match_parent"
19
            android:layout_height="match_parent"
20
            android:gravity="center"
21
            android:text="车系"
22
            android:textColor="#444444"
23
            android:textSize="18sp" />
24
25
        <ImageView
26
            android:id="@+id/iv_back"
27
            android:layout_width="wrap_content"
28
            android:layout_height="match_parent"
29
            android:layout_alignParentLeft="true"
30
            android:layout_centerVertical="true"
31
            android:contentDescription="@null"
32
            android:paddingLeft="15dp"
33
            android:paddingRight="15dp"
34
            android:src="@drawable/icon_lvback1119"
35
            app:layout_constraintLeft_toLeftOf="parent" />
36
37
        <View
38
            android:layout_width="match_parent"
39
            android:layout_height="0.5dp"
40
            android:background="@color/ui_titleline"
41
            app:layout_constraintBottom_toBottomOf="parent" />
42
    </androidx.constraintlayout.widget.ConstraintLayout>
43
44
    <com.donkingliang.groupedadapter.widget.StickyHeaderLayout
45
        android:id="@+id/sticky_header_layout"
46
        android:layout_width="match_parent"
47
        android:layout_height="0dp"
48
        android:background="#FFF2F6F9"
49
        app:layout_constraintBottom_toBottomOf="parent"
50
        app:layout_constraintTop_toBottomOf="@+id/nav_bar">
51
52
        <androidx.recyclerview.widget.RecyclerView
53
            android:id="@+id/recycler_view"
54
            android:layout_width="match_parent"
55
            android:layout_height="match_parent" />
56
    </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
57
</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 1
app/src/main/res/layout/activity_user_center.xml

@ -505,7 +505,7 @@
505 505
                            android:layout_width="wrap_content"
506 506
                            android:layout_height="match_parent"
507 507
                            android:layout_toLeftOf="@+id/iv_certificate_cursor"
508
                            android:text=""
508
                            android:text="认证车主得充电红包"
509 509
                            android:textSize="14sp"
510 510
                            android:gravity="center_vertical"
511 511
                            android:layout_marginRight="12dp"

+ 37 - 0
app/src/main/res/layout/activity_user_info.xml

@ -153,6 +153,43 @@
153 153
                android:background="@color/ui_line"
154 154
                android:visibility="visible" />
155 155
156
            <RelativeLayout
157
                android:layout_width="fill_parent"
158
                android:layout_height="45dp"
159
                android:background="@color/white">
160
161
                <TextView
162
                    android:layout_width="wrap_content"
163
                    android:layout_height="match_parent"
164
                    android:gravity="center"
165
                    android:paddingLeft="15dp"
166
                    android:text="手机号"
167
                    android:textColor="@color/title_row"
168
                    android:textSize="15sp" />
169
170
                <TextView
171
                    android:id="@+id/phone"
172
                    android:layout_width="wrap_content"
173
                    android:layout_height="130px"
174
                    android:layout_alignParentTop="true"
175
                    android:layout_alignParentEnd="true"
176
                    android:layout_alignParentRight="true"
177
                    android:layout_marginEnd="15dp"
178
                    android:layout_marginRight="15dp"
179
                    android:background="@color/white"
180
                    android:gravity="center|right"
181
                    android:textColor="@color/ui_62"
182
                    android:textSize="15sp" />
183
184
            </RelativeLayout>
185
186
            <View
187
                android:layout_width="match_parent"
188
                android:layout_height="0.5dp"
189
                android:layout_marginLeft="15dp"
190
                android:background="@color/ui_line"
191
                android:visibility="visible" />
192
156 193
157 194
            <RelativeLayout
158 195
                android:id="@+id/go_certificate"

+ 7 - 42
app/src/main/res/layout/adapter_child_car_model.xml

@ -4,8 +4,8 @@
4 4
    xmlns:tools="http://schemas.android.com/tools"
5 5
    android:layout_width="match_parent"
6 6
    android:layout_height="100dp"
7
    android:paddingLeft="15dp"
8 7
    android:background="@color/white"
8
    android:paddingLeft="15dp"
9 9
    tools:background="#cccccc">
10 10
11 11
    <View
@ -26,53 +26,18 @@
26 26
        tools:background="#00ff00" />
27 27
28 28
    <TextView
29
        android:id="@+id/title"
30
        android:layout_width="wrap_content"
29
        android:id="@+id/model_name"
30
        android:layout_width="0dp"
31 31
        android:layout_height="wrap_content"
32 32
        android:layout_gravity="center_vertical"
33 33
        android:layout_marginLeft="10dp"
34
        android:layout_marginTop="27dp"
34
        android:layout_marginRight="15dp"
35 35
        android:textColor="#FF222222"
36 36
        android:textSize="14sp"
37
        app:layout_constraintBottom_toBottomOf="parent"
37 38
        app:layout_constraintLeft_toRightOf="@+id/master_pic"
39
        app:layout_constraintRight_toRightOf="parent"
38 40
        app:layout_constraintTop_toTopOf="parent"
39
        tools:text="奥迪" />
40
41
    <LinearLayout
42
        android:layout_width="wrap_content"
43
        android:layout_height="wrap_content"
44
        android:layout_marginLeft="10dp"
45
        android:layout_marginBottom="28dp"
46
        android:orientation="horizontal"
47
        app:layout_constraintBottom_toBottomOf="parent"
48
        app:layout_constraintLeft_toRightOf="@+id/master_pic">
49
50
        <TextView
51
            android:id="@+id/sale_price"
52
            android:layout_width="wrap_content"
53
            android:layout_height="wrap_content"
54
            android:textColor="#FFE02020"
55
            android:textSize="14sp"
56
            tools:text="33.8-52.3" />
57
58
        <TextView
59
            android:id="@+id/price"
60
            android:layout_width="wrap_content"
61
            android:layout_height="wrap_content"
62
            android:layout_gravity="center_vertical"
63
            android:layout_marginLeft="5dp"
64
            android:text="万"
65
            android:textColor="#FF222222"
66
            android:textSize="12sp" />
67
68
        <TextView
69
            android:id="@+id/endurance"
70
            android:layout_width="wrap_content"
71
            android:layout_height="wrap_content"
72
            android:layout_marginLeft="20dp"
73
            android:textColor="#FF222222"
74
            android:textSize="12sp"
75
            tools:text="续航:300km" />
76
    </LinearLayout>
41
        tools:text="2019款 锐·混动 2.0L 两驱净速版 国V" />
77 42
78 43
</androidx.constraintlayout.widget.ConstraintLayout>

+ 78 - 0
app/src/main/res/layout/adapter_child_car_series.xml

@ -0,0 +1,78 @@
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:layout_width="match_parent"
6
    android:layout_height="100dp"
7
    android:paddingLeft="15dp"
8
    android:background="@color/white"
9
    tools:background="#cccccc">
10
11
    <View
12
        android:id="@+id/line"
13
        android:layout_width="match_parent"
14
        android:layout_height="1dp"
15
        android:background="#E6E6E6"
16
        app:layout_constraintTop_toTopOf="parent" />
17
18
    <ImageView
19
        android:id="@+id/master_pic"
20
        android:layout_width="120dp"
21
        android:layout_height="80dp"
22
        android:scaleType="fitCenter"
23
        app:layout_constraintBottom_toBottomOf="parent"
24
        app:layout_constraintLeft_toLeftOf="parent"
25
        app:layout_constraintTop_toTopOf="parent"
26
        tools:background="#00ff00" />
27
28
    <TextView
29
        android:id="@+id/title"
30
        android:layout_width="wrap_content"
31
        android:layout_height="wrap_content"
32
        android:layout_gravity="center_vertical"
33
        android:layout_marginLeft="10dp"
34
        android:layout_marginTop="27dp"
35
        android:textColor="#FF222222"
36
        android:textSize="14sp"
37
        app:layout_constraintLeft_toRightOf="@+id/master_pic"
38
        app:layout_constraintTop_toTopOf="parent"
39
        tools:text="奥迪" />
40
41
    <LinearLayout
42
        android:layout_width="wrap_content"
43
        android:layout_height="wrap_content"
44
        android:layout_marginLeft="10dp"
45
        android:layout_marginBottom="28dp"
46
        android:orientation="horizontal"
47
        app:layout_constraintBottom_toBottomOf="parent"
48
        app:layout_constraintLeft_toRightOf="@+id/master_pic">
49
50
        <TextView
51
            android:id="@+id/sale_price"
52
            android:layout_width="wrap_content"
53
            android:layout_height="wrap_content"
54
            android:textColor="#FFE02020"
55
            android:textSize="14sp"
56
            tools:text="33.8-52.3" />
57
58
        <TextView
59
            android:id="@+id/price"
60
            android:layout_width="wrap_content"
61
            android:layout_height="wrap_content"
62
            android:layout_gravity="center_vertical"
63
            android:layout_marginLeft="5dp"
64
            android:text="万"
65
            android:textColor="#FF222222"
66
            android:textSize="12sp" />
67
68
        <TextView
69
            android:id="@+id/endurance"
70
            android:layout_width="wrap_content"
71
            android:layout_height="wrap_content"
72
            android:layout_marginLeft="20dp"
73
            android:textColor="#FF222222"
74
            android:textSize="12sp"
75
            tools:text="续航:300km" />
76
    </LinearLayout>
77
78
</androidx.constraintlayout.widget.ConstraintLayout>

+ 19 - 0
app/src/main/res/layout/adapter_header_car_series.xml

@ -0,0 +1,19 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    android:layout_width="match_parent"
5
    android:layout_height="25dp"
6
    android:background="#FFF2F6F9"
7
    android:paddingLeft="15dp"
8
    android:paddingRight="15dp">
9
    
10
    <TextView
11
        android:id="@+id/title"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent"
14
        android:gravity="center_vertical"
15
        android:lines="1"
16
        android:textColor="#FF6F6F7D"
17
        android:textSize="12sp"
18
        tools:text="A" />
19
</LinearLayout>

+ 131 - 306
app/src/main/res/layout/item_zhancomments.xml

@ -1,10 +1,10 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3 4
    xmlns:zhy="http://schemas.android.com/tools"
4 5
    android:id="@+id/ll_zhan_comments"
5 6
    android:layout_width="match_parent"
6 7
    android:layout_height="match_parent"
7
    xmlns:app="http://schemas.android.com/apk/res-auto"
8 8
    android:background="@color/bg_row"
9 9
    android:orientation="vertical">
10 10
@ -18,89 +18,99 @@
18 18
            android:id="@+id/rl_icon"
19 19
            android:layout_width="35dp"
20 20
            android:layout_height="35dp"
21
            android:layout_alignParentTop="true"
22
            android:layout_alignParentLeft="true"
23 21
            android:layout_alignParentStart="true"
24
            android:layout_marginTop="12dp"
22
            android:layout_alignParentLeft="true"
23
            android:layout_alignParentTop="true"
24
            android:layout_gravity="center_vertical"
25 25
            android:layout_marginLeft="15dp"
26
            android:layout_gravity="center_vertical">
26
            android:layout_marginTop="12dp">
27 27
28 28
            <ImageView
29
                android:id="@+id/iv_picon"
29 30
                android:layout_width="35dp"
30 31
                android:layout_height="35dp"
31
                android:id="@+id/iv_picon"
32
                android:src="@drawable/icon_touxiang0128"/>
32
                android:src="@drawable/icon_touxiang0128" />
33 33
34 34
            <ImageView
35 35
                android:id="@+id/iv_level_img"
36 36
                android:layout_width="15dp"
37 37
                android:layout_height="15dp"
38
                android:layout_alignParentBottom="true"
39
                android:layout_alignParentRight="true"/>
38
                android:layout_alignParentRight="true"
39
                android:layout_alignParentBottom="true" />
40 40
41 41
42 42
        </RelativeLayout>
43 43
44 44
45
46 45
        <TextView
46
            android:id="@+id/tv_pname"
47 47
            android:layout_width="wrap_content"
48 48
            android:layout_height="wrap_content"
49
            android:textAppearance="?android:attr/textAppearanceSmall"
50
            android:text="EV200车主"
51
            android:textSize="13sp"
52
            android:id="@+id/tv_pname"
53
            android:textColor="@color/ui_65"
54
            android:maxEms="8"
55
            android:ellipsize="end"
56
            android:singleLine="true"
57
            android:layout_marginLeft="10dp"
58
            android:layout_gravity="center_vertical"
59 49
            android:layout_alignTop="@+id/rl_icon"
50
            android:layout_gravity="center_vertical"
51
            android:layout_marginLeft="10dp"
52
            android:layout_toEndOf="@+id/rl_icon"
60 53
            android:layout_toRightOf="@+id/rl_icon"
61
            android:layout_toEndOf="@+id/rl_icon" />
54
            android:ellipsize="end"
55
            android:maxEms="8"
56
            android:singleLine="true"
57
            android:text="EV200车主"
58
            android:textAppearance="?android:attr/textAppearanceSmall"
59
            android:textColor="@color/ui_65"
60
            android:textSize="13sp" />
61
62
        <ImageView
63
            android:id="@+id/certified_icon"
64
            android:layout_width="18dp"
65
            android:layout_height="18dp"
66
            android:layout_alignTop="@+id/tv_pname"
67
            android:layout_marginTop="2dp"
68
            android:layout_alignBottom="@+id/tv_pname"
69
            android:layout_marginLeft="5dp"
70
            android:layout_toRightOf="@+id/tv_pname"
71
            android:src="@drawable/certified_icon" />
62 72
63 73
        <TextView
74
            android:id="@+id/tv_pcar"
64 75
            android:layout_width="match_parent"
65 76
            android:layout_height="wrap_content"
66
            android:textAppearance="?android:attr/textAppearanceSmall"
67
            android:text="北京市"
68
            android:textSize="13sp"
69
            android:textColor="#888888"
70
            android:id="@+id/tv_pcar"
71
            android:layout_marginLeft="5dp"
72
            android:layout_gravity="center_vertical"
73 77
            android:layout_alignTop="@+id/tv_pname"
74
            android:layout_toRightOf="@+id/tv_pname"
75
            android:layout_toLeftOf="@+id/iv_pgrade"
78
            android:layout_gravity="center_vertical"
79
            android:layout_marginLeft="5dp"
76 80
            android:layout_marginRight="5dp"
81
            android:layout_toLeftOf="@+id/iv_pgrade"
82
            android:layout_toRightOf="@+id/certified_icon"
83
            android:ellipsize="end"
77 84
            android:singleLine="true"
78
            android:ellipsize="end"/>
85
            android:text="北京市"
86
            android:textAppearance="?android:attr/textAppearanceSmall"
87
            android:textColor="#888888"
88
            android:textSize="13sp" />
79 89
80 90
        <ImageView
91
            android:id="@+id/iv_pgrade"
81 92
            android:layout_width="wrap_content"
82 93
            android:layout_height="wrap_content"
83
            android:textAppearance="?android:attr/textAppearanceSmall"
84
            android:id="@+id/iv_pgrade"
85
            android:layout_gravity="center_vertical"
86 94
            android:layout_alignTop="@+id/tv_pname"
87 95
            android:layout_alignParentRight="true"
96
            android:layout_gravity="center_vertical"
88 97
            android:layout_marginRight="15dp"
89
            android:src="@drawable/icon_5xing"/>
98
            android:src="@drawable/icon_5xing"
99
            android:textAppearance="?android:attr/textAppearanceSmall" />
90 100
91 101
        <TextView
102
            android:id="@+id/tv_pcontext"
92 103
            android:layout_width="wrap_content"
93 104
            android:layout_height="wrap_content"
94
            android:textAppearance="?android:attr/textAppearanceSmall"
95
            android:text=""
96
            android:id="@+id/tv_pcontext"
97
            android:textSize="15sp"
98
            android:layout_marginTop="10dp"
99
            android:layout_marginRight="15dp"
100 105
            android:layout_below="@+id/tv_pname"
101
            android:layout_alignLeft="@+id/tv_pname"
102 106
            android:layout_alignStart="@+id/tv_pname"
103
            android:visibility="visible"/>
107
            android:layout_alignLeft="@+id/tv_pname"
108
            android:layout_marginTop="10dp"
109
            android:layout_marginRight="15dp"
110
            android:text=""
111
            android:textAppearance="?android:attr/textAppearanceSmall"
112
            android:textSize="15sp"
113
            android:visibility="visible" />
104 114
105 115
        <com.zhy.view.flowlayout.TagFlowLayout
106 116
            android:id="@+id/fl_ptag"
@ -109,45 +119,45 @@
109 119
            android:layout_below="@+id/tv_pcontext"
110 120
            android:layout_alignLeft="@+id/tv_pcontext"
111 121
            android:layout_marginTop="10dp"
112
            zhy:max_select="-1"
113
            android:visibility="visible"/>
122
            android:visibility="visible"
123
            zhy:max_select="-1" />
114 124
115 125
        <ImageView
126
            android:id="@+id/iv_commentPic"
116 127
            android:layout_width="65dp"
117 128
            android:layout_height="65dp"
118
            android:id="@+id/iv_commentPic"
119
            android:layout_marginTop="10dp"
120 129
            android:layout_below="@+id/fl_ptag"
121 130
            android:layout_alignLeft="@+id/tv_pcontext"
131
            android:layout_marginTop="10dp"
122 132
            android:scaleType="centerCrop"
123
            android:visibility="gone"/>
133
            android:visibility="gone" />
124 134
125 135
        <TextView
136
            android:id="@+id/tv_ptime"
126 137
            android:layout_width="wrap_content"
127 138
            android:layout_height="wrap_content"
128
            android:textAppearance="?android:attr/textAppearanceSmall"
129
            android:text="15分钟前"
130
            android:textSize="12sp"
131
            android:textColor="#c8c8c8"
132
            android:id="@+id/tv_ptime"
133
            android:layout_marginTop="10dp"
134
            android:layout_marginBottom="8dp"
135 139
            android:layout_below="@+id/iv_commentPic"
140
            android:layout_alignStart="@+id/tv_pcontext"
136 141
            android:layout_alignLeft="@+id/tv_pcontext"
137
            android:layout_alignStart="@+id/tv_pcontext" />
142
            android:layout_marginTop="10dp"
143
            android:layout_marginBottom="8dp"
144
            android:text="15分钟前"
145
            android:textAppearance="?android:attr/textAppearanceSmall"
146
            android:textColor="#c8c8c8"
147
            android:textSize="12sp" />
138 148
139 149
        <TextView
140 150
            android:id="@+id/tv_pdelete"
141 151
            android:layout_width="wrap_content"
142 152
            android:layout_height="wrap_content"
143
            android:layout_toRightOf="@+id/tv_ptime"
144 153
            android:layout_alignTop="@+id/tv_ptime"
154
            android:layout_toRightOf="@+id/tv_ptime"
145 155
            android:paddingLeft="12dp"
146 156
            android:paddingRight="12dp"
147 157
            android:text="删除"
148
            android:textSize="12sp"
149 158
            android:textColor="@color/ui_68"
150
            android:visibility="gone"/>
159
            android:textSize="12sp"
160
            android:visibility="gone" />
151 161
152 162
153 163
        <LinearLayout
@ -156,128 +166,125 @@
156 166
            android:layout_height="wrap_content"
157 167
            android:layout_below="@+id/iv_commentPic"
158 168
            android:layout_toLeftOf="@+id/tv_preply"
159
            android:paddingRight="13dp"
169
            android:paddingLeft="10dp"
160 170
            android:paddingTop="10dp"
161
            android:paddingBottom="8dp"
162
            android:paddingLeft="10dp">
171
            android:paddingRight="13dp"
172
            android:paddingBottom="8dp">
163 173
164 174
            <ImageView
175
                android:id="@+id/iv_pzan"
165 176
                android:layout_width="wrap_content"
166 177
                android:layout_height="wrap_content"
167
                android:id="@+id/iv_pzan"
168 178
                android:layout_gravity="center"
169
                android:src="@drawable/icon_comment_zan"/>
179
                android:src="@drawable/icon_comment_zan" />
170 180
171 181
            <TextView
182
                android:id="@+id/tv_pzan"
172 183
                android:layout_width="wrap_content"
173 184
                android:layout_height="wrap_content"
174
                android:textAppearance="?android:attr/textAppearanceSmall"
185
                android:layout_marginLeft="8dp"
186
                android:gravity="center"
175 187
                android:text="0"
176
                android:textSize="12sp"
188
                android:textAppearance="?android:attr/textAppearanceSmall"
177 189
                android:textColor="@color/ui_68"
178
                android:id="@+id/tv_pzan"
179
                android:visibility="visible"
180
                android:layout_marginLeft="8dp"
181
                android:gravity="center" />
190
                android:textSize="12sp"
191
                android:visibility="visible" />
182 192
183 193
        </LinearLayout>
184 194
185 195
186 196
        <TextView
197
            android:id="@+id/tv_preply"
187 198
            android:layout_width="wrap_content"
188 199
            android:layout_height="wrap_content"
189
            android:textAppearance="?android:attr/textAppearanceSmall"
190
            android:text="回复"
191
            android:textSize="12sp"
192
            android:textColor="#2fb3ff"
193
            android:id="@+id/tv_preply"
194
            android:visibility="visible"
195 200
            android:layout_below="@+id/iv_commentPic"
196
            android:layout_alignRight="@+id/tv_pcontext"
197 201
            android:layout_alignEnd="@+id/tv_pcontext"
202
            android:layout_alignRight="@+id/tv_pcontext"
198 203
            android:layout_alignParentRight="true"
199
            android:paddingRight="15dp"
200
            android:paddingTop="10dp"
201 204
            android:paddingLeft="12dp"
202
            android:paddingBottom="8dp"/>
205
            android:paddingTop="10dp"
206
            android:paddingRight="15dp"
207
            android:paddingBottom="8dp"
208
            android:text="回复"
209
            android:textAppearance="?android:attr/textAppearanceSmall"
210
            android:textColor="#2fb3ff"
211
            android:textSize="12sp"
212
            android:visibility="visible" />
203 213
204 214
205 215
        <TextView
216
            android:id="@+id/tv_childName"
206 217
            android:layout_width="wrap_content"
207 218
            android:layout_height="wrap_content"
208
            android:textAppearance="?android:attr/textAppearanceSmall"
209
            android:text="IEV5车主"
210
            android:layout_marginTop="10dp"
211
            android:id="@+id/tv_childName"
212 219
            android:layout_below="@+id/tv_ptime"
213
            android:layout_alignLeft="@+id/tv_ptime"
214 220
            android:layout_alignStart="@+id/tv_ptime"
215
            android:visibility="gone"/>
221
            android:layout_alignLeft="@+id/tv_ptime"
222
            android:layout_marginTop="10dp"
223
            android:text="IEV5车主"
224
            android:textAppearance="?android:attr/textAppearanceSmall"
225
            android:visibility="gone" />
216 226
217 227
        <TextView
228
            android:id="@+id/textView14"
218 229
            android:layout_width="wrap_content"
219 230
            android:layout_height="wrap_content"
220
            android:textAppearance="?android:attr/textAppearanceSmall"
221
            android:text="回复"
222
            android:id="@+id/textView14"
223
            android:layout_marginLeft="8dp"
224 231
            android:layout_alignBaseline="@+id/tv_childName"
225 232
            android:layout_alignBottom="@+id/tv_childName"
233
            android:layout_marginLeft="8dp"
226 234
            android:layout_toRightOf="@+id/tv_childName"
227
            android:visibility="gone"/>
235
            android:text="回复"
236
            android:textAppearance="?android:attr/textAppearanceSmall"
237
            android:visibility="gone" />
228 238
229 239
        <TextView
240
            android:id="@+id/tv_parentName"
230 241
            android:layout_width="wrap_content"
231 242
            android:layout_height="wrap_content"
232
            android:textAppearance="?android:attr/textAppearanceSmall"
233
            android:text="EV200车主:"
234
            android:id="@+id/tv_parentName"
235
            android:layout_marginLeft="8dp"
236 243
            android:layout_alignBottom="@+id/textView14"
237
            android:layout_toRightOf="@+id/textView14"
244
            android:layout_marginLeft="8dp"
238 245
            android:layout_toEndOf="@+id/textView14"
239
            android:visibility="gone"/>
246
            android:layout_toRightOf="@+id/textView14"
247
            android:text="EV200车主:"
248
            android:textAppearance="?android:attr/textAppearanceSmall"
249
            android:visibility="gone" />
240 250
241 251
        <TextView
252
            android:id="@+id/tv_commentDetail"
242 253
            android:layout_width="wrap_content"
243 254
            android:layout_height="wrap_content"
244
            android:textAppearance="?android:attr/textAppearanceSmall"
245
            android:text="有故障!"
246
            android:id="@+id/tv_commentDetail"
247 255
            android:layout_alignBottom="@+id/tv_parentName"
248
            android:layout_toRightOf="@+id/tv_parentName"
249
            android:layout_toEndOf="@+id/tv_parentName"
250 256
            android:layout_marginLeft="8dp"
251
            android:visibility="gone"/>
257
            android:layout_toEndOf="@+id/tv_parentName"
258
            android:layout_toRightOf="@+id/tv_parentName"
259
            android:text="有故障!"
260
            android:textAppearance="?android:attr/textAppearanceSmall"
261
            android:visibility="gone" />
252 262
253 263
        <com.electric.chargingpile.view.MyListView
254 264
            android:id="@+id/lv_scomment"
255 265
            android:layout_width="match_parent"
256 266
            android:layout_height="wrap_content"
257
            android:divider="#dddddd"
258
            android:dividerHeight="0.5dp"
259 267
            android:layout_below="@+id/tv_ptime"
260
            android:background="#fafafa"
261 268
            android:layout_alignLeft="@+id/tv_ptime"
262
            android:paddingLeft="15dp"
263
            android:layout_marginRight="15dp"/>
269
            android:layout_marginRight="15dp"
270
            android:background="#fafafa"
271
            android:divider="#dddddd"
272
            android:dividerHeight="0.5dp"
273
            android:paddingLeft="15dp" />
264 274
265 275
        <TextView
266
        android:id="@+id/tv_more"
267
        android:layout_width="match_parent"
268
        android:layout_height="40dp"
276
            android:id="@+id/tv_more"
277
            android:layout_width="match_parent"
278
            android:layout_height="40dp"
269 279
            android:layout_below="@+id/lv_scomment"
270 280
            android:layout_alignLeft="@+id/lv_scomment"
271 281
            android:layout_alignRight="@+id/lv_scomment"
272
        android:text="查看剩余*条评论 >"
273
        android:textColor="@color/lvse"
274
        android:gravity="center"
275
        android:background="@drawable/bg_03"
276
        android:textSize="14sp"
277
        android:visibility="gone"/>
278
279
280
282
            android:background="@drawable/bg_03"
283
            android:gravity="center"
284
            android:text="查看剩余*条评论 >"
285
            android:textColor="@color/lvse"
286
            android:textSize="14sp"
287
            android:visibility="gone" />
281 288
282 289
283 290
        <!--<LinearLayout-->
@ -325,201 +332,19 @@
325 332
326 333
            android:layout_width="match_parent"
327 334
            android:layout_height="0.5dp"
328
            android:background="@color/Line"
329 335
            android:layout_below="@+id/tv_ptime"
330
            android:visibility="gone"/>
336
            android:background="@color/Line"
337
            android:visibility="gone" />
331 338
332 339
    </RelativeLayout>
333 340
334
    <!--<LinearLayout-->
335
        <!--android:id="@+id/ll_out"-->
336
        <!--android:layout_width="match_parent"-->
337
        <!--android:layout_height="wrap_content"-->
338
        <!--android:visibility="gone">-->
339
340
        <!--<RelativeLayout-->
341
            <!--android:id="@+id/son"-->
342
            <!--android:layout_width="match_parent"-->
343
            <!--android:layout_height="wrap_content"-->
344
            <!--android:background="#fafafa"-->
345
            <!--android:layout_marginLeft="45dp"-->
346
            <!--android:layout_marginRight="15dp">-->
347
348
            <!--<com.electric.chargingpile.view.CircleImageView-->
349
                <!--android:layout_width="35dp"-->
350
                <!--android:layout_height="35dp"-->
351
                <!--android:id="@+id/iv_icon_son"-->
352
                <!--android:layout_alignParentTop="true"-->
353
                <!--android:layout_alignParentLeft="true"-->
354
                <!--android:layout_alignParentStart="true"-->
355
                <!--android:layout_marginTop="12dp"-->
356
                <!--android:layout_marginLeft="10dp"-->
357
                <!--app:border_color="@color/white"-->
358
                <!--android:layout_gravity="center_vertical"-->
359
                <!--android:src="@drawable/icon_touxiang0128"-->
360
                <!--android:visibility="gone"/>-->
361
362
            <!--<TextView-->
363
                <!--android:layout_width="wrap_content"-->
364
                <!--android:layout_height="wrap_content"-->
365
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
366
                <!--android:text="EV200车主"-->
367
                <!--android:textSize="13sp"-->
368
                <!--android:id="@+id/tv_carType_son"-->
369
                <!--android:textColor="@color/ui_65"-->
370
371
                <!--android:layout_gravity="center_vertical"-->
372
                <!--android:layout_alignParentLeft="true"-->
373
                <!--android:layout_marginTop="12dp"-->
374
                <!--android:layout_marginLeft="15dp"/>-->
375
376
            <!--<TextView-->
377
                <!--android:layout_width="wrap_content"-->
378
                <!--android:layout_height="wrap_content"-->
379
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
380
                <!--android:text="北京市"-->
381
                <!--android:textSize="13sp"-->
382
                <!--android:textColor="#888888"-->
383
                <!--android:id="@+id/tv_city_son"-->
384
                <!--android:layout_marginLeft="5dp"-->
385
                <!--android:layout_gravity="center_vertical"-->
386
                <!--android:layout_alignTop="@+id/tv_carType_son"-->
387
                <!--android:layout_toRightOf="@+id/tv_carType_son"-->
388
                <!--android:layout_toEndOf="@+id/tv_carType_son"-->
389
                <!--android:visibility="gone"/>-->
390
391
392
393
            <!--<TextView-->
394
                <!--android:layout_width="wrap_content"-->
395
                <!--android:layout_height="wrap_content"-->
396
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
397
                <!--android:text="桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?桩在哪里呢?"-->
398
                <!--android:id="@+id/tv_comment_son"-->
399
                <!--android:textSize="15sp"-->
400
                <!--android:layout_marginTop="10dp"-->
401
                <!--android:layout_marginRight="10dp"-->
402
                <!--android:layout_marginBottom="10dp"-->
403
                <!--android:layout_below="@+id/tv_carType_son"-->
404
                <!--android:layout_alignLeft="@+id/tv_carType_son"-->
405
                <!--android:layout_alignStart="@+id/tv_carType_son" />-->
406
407
408
409
410
            <!--<TextView-->
411
                <!--android:layout_width="wrap_content"-->
412
                <!--android:layout_height="wrap_content"-->
413
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
414
                <!--android:text="15分钟前"-->
415
                <!--android:textSize="12sp"-->
416
                <!--android:textColor="#c8c8c8"-->
417
                <!--android:id="@+id/tv_time_son"-->
418
                <!--android:layout_marginRight="10dp"-->
419
                <!--android:layout_alignTop="@+id/tv_city_son"-->
420
                <!--android:layout_alignParentRight="true"-->
421
                <!--android:layout_alignParentEnd="true" />-->
422
423
            <!--<TextView-->
424
                <!--android:layout_width="wrap_content"-->
425
                <!--android:layout_height="wrap_content"-->
426
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
427
                <!--android:text="回复"-->
428
                <!--android:id="@+id/tv_reply_son"-->
429
                <!--android:layout_marginLeft="20dp"-->
430
                <!--android:layout_alignTop="@+id/tv_time_son"-->
431
                <!--android:layout_toRightOf="@+id/tv_time_son"-->
432
                <!--android:layout_toEndOf="@+id/tv_time_son"-->
433
                <!--android:visibility="gone"/>-->
434
435
436
            <!--<TextView-->
437
                <!--android:layout_width="wrap_content"-->
438
                <!--android:layout_height="wrap_content"-->
439
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
440
                <!--android:text="IEV5车主"-->
441
                <!--android:layout_marginTop="10dp"-->
442
                <!--android:id="@+id/tv_childName_son"-->
443
                <!--android:layout_below="@+id/tv_time_son"-->
444
                <!--android:layout_alignLeft="@+id/tv_time_son"-->
445
                <!--android:layout_alignStart="@+id/tv_time_son"-->
446
                <!--android:visibility="gone"/>-->
447
448
            <!--<TextView-->
449
                <!--android:layout_width="wrap_content"-->
450
                <!--android:layout_height="wrap_content"-->
451
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
452
                <!--android:text="回复"-->
453
                <!--android:id="@+id/textView15"-->
454
                <!--android:layout_marginLeft="8dp"-->
455
                <!--android:layout_alignBaseline="@+id/tv_childName_son"-->
456
                <!--android:layout_alignBottom="@+id/tv_childName_son"-->
457
                <!--android:layout_toRightOf="@+id/tv_childName_son"-->
458
                <!--android:visibility="gone"/>-->
459
460
            <!--<TextView-->
461
                <!--android:layout_width="wrap_content"-->
462
                <!--android:layout_height="wrap_content"-->
463
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
464
                <!--android:text="EV200车主:"-->
465
                <!--android:id="@+id/tv_parentName_son"-->
466
                <!--android:layout_marginLeft="8dp"-->
467
                <!--android:layout_alignBottom="@+id/textView15"-->
468
                <!--android:layout_toRightOf="@+id/textView15"-->
469
                <!--android:layout_toEndOf="@+id/textView15"-->
470
                <!--android:visibility="gone"/>-->
471
472
            <!--<TextView-->
473
                <!--android:layout_width="wrap_content"-->
474
                <!--android:layout_height="wrap_content"-->
475
                <!--android:textAppearance="?android:attr/textAppearanceSmall"-->
476
                <!--android:text="有故障!"-->
477
                <!--android:id="@+id/tv_commentDetail_son"-->
478
                <!--android:layout_alignBottom="@+id/tv_parentName_son"-->
479
                <!--android:layout_toRightOf="@+id/tv_parentName_son"-->
480
                <!--android:layout_toEndOf="@+id/tv_parentName_son"-->
481
                <!--android:layout_marginLeft="8dp"-->
482
                <!--android:visibility="gone"/>-->
483
484
            <!--<View-->
485
                <!--android:id="@+id/vvvv"-->
486
                <!--android:layout_width="match_parent"-->
487
                <!--android:layout_height="0.5dp"-->
488
                <!--android:background="@color/Line"-->
489
                <!--android:layout_marginLeft="15dp"-->
490
                <!--android:layout_below="@+id/tv_comment_son"/>-->
491
492
        <!--</RelativeLayout>-->
493
494
    <!--</LinearLayout>-->
495
496
    <!--<TextView-->
497
        <!--android:id="@+id/tv_more"-->
498
        <!--android:layout_width="match_parent"-->
499
        <!--android:layout_height="40dp"-->
500
        <!--android:text="查看剩余*条评论 >"-->
501
        <!--android:textColor="@color/lvse"-->
502
        <!--android:gravity="center"-->
503
        <!--android:background="#fafafa"-->
504
        <!--android:textSize="14sp"-->
505
        <!--android:layout_marginLeft="45dp"-->
506
        <!--android:layout_marginRight="15dp"-->
507
        <!--android:visibility="gone"/>-->
508
    <!--<ListView-->
509
        <!--android:layout_width="wrap_content"-->
510
        <!--android:layout_height="wrap_content"-->
511
        <!--android:layout_below="@+id/tv_ptime"-->
512
        <!--android:layout_alignLeft="@+id/tv_ptime"-->
513
        <!--android:layout_alignStart="@+id/tv_ptime"-->
514
        <!--android:layout_marginRight="15dp"/>-->
515
516 341
    <View
517 342
        android:id="@+id/vvv"
518 343
        android:layout_width="match_parent"
519 344
        android:layout_height="0.5dp"
520
        android:background="@color/Line"
521 345
        android:layout_below="@+id/lv_scomment"
522
        android:layout_marginTop="10dp" />
346
        android:layout_marginTop="10dp"
347
        android:background="@color/Line" />
523 348
524 349
525 350
</LinearLayout>