Browse Source

代码修改

huyuguo 5 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
            android:launchMode="singleTop"
86
            android:launchMode="singleTop"
87
            android:screenOrientation="portrait" />
87
            android:screenOrientation="portrait" />
88
        <activity
88
        <activity
89
            android:name=".activity.CarSeriesActivity"
90
            android:launchMode="singleTop"
91
            android:screenOrientation="portrait" />
92
        <activity
89
            android:name=".activity.CarBrandActivity"
93
            android:name=".activity.CarBrandActivity"
90
            android:launchMode="singleTop"
94
            android:launchMode="singleTop"
91
            android:screenOrientation="portrait" />
95
            android:screenOrientation="portrait" />

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

6
6
7
import android.content.Intent;
7
import android.content.Intent;
8
import android.os.Bundle;
8
import android.os.Bundle;
9
import android.util.Log;
10
import android.view.View;
9
import android.view.View;
11
import android.widget.TextView;
10
import android.widget.TextView;
12
11
49
        CarBrandEvent event = EventBus.getDefault().removeStickyEvent(CarBrandEvent.class);
48
        CarBrandEvent event = EventBus.getDefault().removeStickyEvent(CarBrandEvent.class);
50
        if (event != null) {
49
        if (event != null) {
51
            groups = event.getGroups();
50
            groups = event.getGroups();
52
            Log.e("abs======================",   groups.size() + "");
53
            String[] letters = new String[groups.size()];
51
            String[] letters = new String[groups.size()];
54
            for (int i = 0; i < groups.size(); i++) {
52
            for (int i = 0; i < groups.size(); i++) {
55
                letters[i] = groups.get(i).getInitial();
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
        findViewById(R.id.iv_back).setOnClickListener(this::onClick);
57
        findViewById(R.id.iv_back).setOnClickListener(this::onClick);
61
        letter_side_view = findViewById(R.id.letter_side_view);
58
        letter_side_view = findViewById(R.id.letter_side_view);
94
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
91
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
95
                ArrayList<CarCompanyEntity> companyList = groups.get(groupPosition).getBrandList().get(childPosition).getCompanyList();
92
                ArrayList<CarCompanyEntity> companyList = groups.get(groupPosition).getBrandList().get(childPosition).getCompanyList();
96
                EventBus.getDefault().postSticky(new CarCompanyEvent(companyList));
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
import android.content.Intent;
7
import android.content.Intent;
8
import android.os.Bundle;
8
import android.os.Bundle;
9
import android.view.View;
9
import android.view.View;
10
import android.widget.TextView;
11
import android.widget.Toast;
10
12
11
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
13
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
12
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
14
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
13
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
15
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
14
import com.electric.chargingpile.R;
16
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.adapter.CarModelGroupedListAdapter;
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
import com.electric.chargingpile.entity.CarSeriesEntity;
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
import com.electric.chargingpile.util.BarColorUtil;
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
import org.greenrobot.eventbus.EventBus;
33
import org.greenrobot.eventbus.EventBus;
23
34
24
import java.util.ArrayList;
35
import java.util.ArrayList;
25
36
37
import okhttp3.Call;
38
26
public class CarModelActivity extends AppCompatActivity implements View.OnClickListener {
39
public class CarModelActivity extends AppCompatActivity implements View.OnClickListener {
27
40
28
    private RecyclerView recycler_view;
41
    private RecyclerView recycler_view;
29
    private StickyHeaderLayout sticky_header_layout;
42
    private StickyHeaderLayout sticky_header_layout;
30
    private CarModelGroupedListAdapter adapter;
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
    @Override
49
    @Override
34
    protected void onCreate(Bundle savedInstanceState) {
50
    protected void onCreate(Bundle savedInstanceState) {
39
    }
55
    }
40
56
41
    private void initViews() {
57
    private void initViews() {
58
        loadDialog = new LoadingDialog(this);
59
        loadDialog.setCanceledOnTouchOutside(false);
42
        findViewById(R.id.nav_bar).setOnClickListener(this::onClick);
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
        if (event != null) {
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
        recycler_view = (RecyclerView) findViewById(R.id.recycler_view);
70
        recycler_view = (RecyclerView) findViewById(R.id.recycler_view);
49
        sticky_header_layout = (StickyHeaderLayout) findViewById(R.id.sticky_header_layout);
71
        sticky_header_layout = (StickyHeaderLayout) findViewById(R.id.sticky_header_layout);
50
72
51
        recycler_view.setLayoutManager(new LinearLayoutManager(this));
73
        recycler_view.setLayoutManager(new LinearLayoutManager(this));
52
        adapter = new CarModelGroupedListAdapter(this, companyList);
74
        adapter = new CarModelGroupedListAdapter(this, groups, carSeriesEntity.getMasterPic());
53
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
75
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
54
            @Override
76
            @Override
55
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
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
                startActivity(new Intent(CarModelActivity.this, CarOwnerCertificateActivity.class));
96
                startActivity(new Intent(CarModelActivity.this, CarOwnerCertificateActivity.class));
59
            }
97
            }
60
        });
98
        });
64
        sticky_header_layout.setSticky(true);
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
    @Override
141
    @Override
68
    public void onClick(View v) {
142
    public void onClick(View v) {
69
        switch (v.getId()) {
143
        switch (v.getId()) {

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

16
import android.os.Bundle;
16
import android.os.Bundle;
17
import android.text.TextUtils;
17
import android.text.TextUtils;
18
import android.util.Base64;
18
import android.util.Base64;
19
import android.util.Log;
20
import android.view.View;
19
import android.view.View;
21
import android.view.WindowManager;
20
import android.view.WindowManager;
22
import android.widget.Button;
21
import android.widget.Button;
28
27
29
import com.bumptech.glide.Glide;
28
import com.bumptech.glide.Glide;
30
import com.bumptech.glide.load.engine.DiskCacheStrategy;
29
import com.bumptech.glide.load.engine.DiskCacheStrategy;
31
import com.bumptech.glide.request.Request;
32
import com.bumptech.glide.request.target.CustomTarget;
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
import com.bumptech.glide.request.transition.Transition;
31
import com.bumptech.glide.request.transition.Transition;
36
import com.electric.chargingpile.R;
32
import com.electric.chargingpile.R;
37
import com.electric.chargingpile.application.MainApplication;
33
import com.electric.chargingpile.application.MainApplication;
38
import com.electric.chargingpile.data.CarOwnerCertificateBean;
34
import com.electric.chargingpile.data.CarOwnerCertificateBean;
39
import com.electric.chargingpile.entity.CarBrandGroupEntity;
35
import com.electric.chargingpile.entity.CarBrandGroupEntity;
36
import com.electric.chargingpile.entity.CarModelEntity;
40
import com.electric.chargingpile.entity.CarSeriesEntity;
37
import com.electric.chargingpile.entity.CarSeriesEntity;
41
import com.electric.chargingpile.event.CarBrandEvent;
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
import com.electric.chargingpile.util.BarColorUtil;
41
import com.electric.chargingpile.util.BarColorUtil;
44
import com.electric.chargingpile.util.Base64Util;
45
import com.electric.chargingpile.util.DES3;
42
import com.electric.chargingpile.util.DES3;
46
import com.electric.chargingpile.util.FileUtils;
43
import com.electric.chargingpile.util.FileUtils;
47
import com.electric.chargingpile.util.ImageUitl;
48
import com.electric.chargingpile.util.JsonUtils;
44
import com.electric.chargingpile.util.JsonUtils;
49
import com.electric.chargingpile.util.LoadingDialog;
45
import com.electric.chargingpile.util.LoadingDialog;
50
import com.electric.chargingpile.util.ToastUtil;
46
import com.electric.chargingpile.util.ToastUtil;
51
import com.electric.chargingpile.view.TextImageView;
47
import com.electric.chargingpile.view.TextImageView;
52
import com.electric.chargingpile.view.xrichtext.SDCardUtil;
53
import com.google.gson.Gson;
48
import com.google.gson.Gson;
54
import com.google.gson.reflect.TypeToken;
49
import com.google.gson.reflect.TypeToken;
55
import com.zhihu.matisse.Matisse;
50
import com.zhihu.matisse.Matisse;
65
60
66
import java.io.ByteArrayOutputStream;
61
import java.io.ByteArrayOutputStream;
67
import java.io.File;
62
import java.io.File;
68
import java.io.FileInputStream;
69
import java.io.IOException;
63
import java.io.IOException;
70
import java.io.InputStream;
71
import java.net.URLEncoder;
72
import java.util.ArrayList;
64
import java.util.ArrayList;
73
import java.util.HashMap;
65
import java.util.HashMap;
74
import java.util.List;
66
import java.util.List;
82
import io.reactivex.disposables.Disposable;
74
import io.reactivex.disposables.Disposable;
83
import io.reactivex.schedulers.Schedulers;
75
import io.reactivex.schedulers.Schedulers;
84
import okhttp3.Call;
76
import okhttp3.Call;
85
import okhttp3.MediaType;
86
import pub.devrel.easypermissions.AfterPermissionGranted;
77
import pub.devrel.easypermissions.AfterPermissionGranted;
87
import pub.devrel.easypermissions.EasyPermissions;
78
import pub.devrel.easypermissions.EasyPermissions;
88
79
106
    private TextView add_car_model_btn;
97
    private TextView add_car_model_btn;
107
    private LoadingDialog loadDialog;
98
    private LoadingDialog loadDialog;
108
    private ArrayList<CarBrandGroupEntity> groups;
99
    private ArrayList<CarBrandGroupEntity> groups;
109
    private CarSeriesEntity carSeriesEntity;
100
    private CarModelEntity carModelEntity;
110
    private ConstraintLayout car_model_constraint_layout;
101
    private ConstraintLayout car_model_constraint_layout;
111
    private ConstraintLayout car_model_selected_constraint_layout;
102
    private ConstraintLayout car_model_selected_constraint_layout;
112
    private ImageView car_icon;
103
    private ImageView car_icon;
113
    private TextView car_name;
114
    private TextView car_series;
104
    private TextView car_series;
105
    private TextView car_model;
115
    private ConstraintLayout driving_license;
106
    private ConstraintLayout driving_license;
116
    private ImageView driving_license_icon;
107
    private ImageView driving_license_icon;
117
    private ImageView driving_license_upload_icon;
108
    private ImageView driving_license_upload_icon;
170
        car_model_selected_constraint_layout.setOnClickListener(this);
161
        car_model_selected_constraint_layout.setOnClickListener(this);
171
162
172
        car_icon = findViewById(R.id.car_icon);
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
        car_series = findViewById(R.id.car_series);
165
        car_series = findViewById(R.id.car_series);
175
166
176
        driving_license = findViewById(R.id.driving_license);
167
        driving_license = findViewById(R.id.driving_license);
202
193
203
        if (edit) {
194
        if (edit) {
204
            Gson gson = new Gson();
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
            if (!TextUtils.isEmpty(carOwnerCertificateBean.getLicense_img1())) {
199
            if (!TextUtils.isEmpty(carOwnerCertificateBean.getLicense_img1())) {
209
200
220
211
221
                    }
212
                    }
222
                });
213
                });
223
//                Glide.with(this).load(MainApplication.pic_url + carOwnerCertificateBean.getLicense_img1()).into(driving_license_icon);
224
                driving_license_upload_icon.setVisibility(View.GONE);
214
                driving_license_upload_icon.setVisibility(View.GONE);
225
                driving_license_text_view.setVisibility(View.GONE);
215
                driving_license_text_view.setVisibility(View.GONE);
226
                driving_license_info.setVisibility(View.VISIBLE);
216
                driving_license_info.setVisibility(View.VISIBLE);
254
            loadDialog.show();
244
            loadDialog.show();
255
        // https://www.jianshu.com/p/10382cc71127
245
        // https://www.jianshu.com/p/10382cc71127
256
//        String url = "https://api.touchev.com:83/car/api/v1000/brand/list.do";
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
        OkHttpUtils.get().url(url).build().connTimeOut(30000).readTimeOut(30000).execute(new StringCallback() {
248
        OkHttpUtils.get().url(url).build().connTimeOut(30000).readTimeOut(30000).execute(new StringCallback() {
259
            @Override
249
            @Override
260
            public void onError(Call call, Exception e) {
250
            public void onError(Call call, Exception e) {
337
    }
327
    }
338
328
339
    @Subscribe(threadMode = ThreadMode.MAIN)
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
            car_model_constraint_layout.setVisibility(View.GONE);
333
            car_model_constraint_layout.setVisibility(View.GONE);
344
            car_model_selected_constraint_layout.setVisibility(View.VISIBLE);
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
        } else {
344
        } else {
349
            carSeriesEntity = null;
345
            carModelEntity = null;
350
            car_model_constraint_layout.setVisibility(View.VISIBLE);
346
            car_model_constraint_layout.setVisibility(View.VISIBLE);
351
            car_model_selected_constraint_layout.setVisibility(View.GONE);
347
            car_model_selected_constraint_layout.setVisibility(View.GONE);
352
        }
348
        }
538
    }
534
    }
539
535
540
    private void addCarOwnerCertification() {
536
    private void addCarOwnerCertification() {
541
        if (carSeriesEntity == null) {
537
        if (carModelEntity == null) {
542
            ToastUtil.showToast(this, "请添加车型", Toast.LENGTH_SHORT);
538
            ToastUtil.showToast(this, "请添加车型", Toast.LENGTH_SHORT);
543
            return;
539
            return;
544
        }
540
        }
573
        }
569
        }
574
        Map<String, String> map = new HashMap<>();
570
        Map<String, String> map = new HashMap<>();
575
        Gson gson = new Gson();
571
        Gson gson = new Gson();
576
        String chexing = gson.toJson(carSeriesEntity);
572
        String chexing = gson.toJson(carModelEntity);
577
        map.put("chexing", chexing);
573
        map.put("chexing", chexing);
578
574
579
        if (drivingLicenseBase64Data != null) {
575
        if (drivingLicenseBase64Data != null) {
609
                // {"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"}}
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
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
606
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
611
                if ("01".equals(rtnCode)) {
607
                if ("01".equals(rtnCode)) {
612
                    ToastUtil.showToast(getApplicationContext(), "数据提交成功", Toast.LENGTH_SHORT);
608
                    ToastUtil.showToast(getApplicationContext(), "认证信息提交成功,请等待审核", Toast.LENGTH_SHORT);
613
                    finish();
609
                    finish();
614
                } else {
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
        String token = null;
114
        String token = null;
115
        try {
115
        try {
116
            token = DES3.encode(String.valueOf(tokenTime));
116
            token = DES3.encode(String.valueOf(tokenTime));
117
            token = URLEncoder.encode(token, "UTF-8");
117
        } catch (Exception e) {
118
        } catch (Exception e) {
118
            e.printStackTrace();
119
            e.printStackTrace();
119
        }
120
        }
151
        String token = null;
152
        String token = null;
152
        try {
153
        try {
153
            token = DES3.encode(String.valueOf(tokenTime));
154
            token = DES3.encode(String.valueOf(tokenTime));
155
            token = URLEncoder.encode(token, "UTF-8");
154
        } catch (Exception e) {
156
        } catch (Exception e) {
155
            e.printStackTrace();
157
            e.printStackTrace();
156
        }
158
        }
183
        String token = null;
185
        String token = null;
184
        try {
186
        try {
185
            token = DES3.encode(String.valueOf(tokenTime));
187
            token = DES3.encode(String.valueOf(tokenTime));
188
            token = URLEncoder.encode(token, "UTF-8");
186
        } catch (Exception e) {
189
        } catch (Exception e) {
187
            e.printStackTrace();
190
            e.printStackTrace();
188
        }
191
        }

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

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
                        new Handler().postDelayed(new Runnable() {
631
                        new Handler().postDelayed(new Runnable() {
632
                            public void run() {
632
                            public void run() {
633
                                ActivityManagerApplication.destoryActivity("login");
633
                                ActivityManagerApplication.destoryActivity("login");
634
                                startActivity(new Intent(RegisterActivity.this, SkipUserInfoActivity.class));
634
//                                startActivity(new Intent(RegisterActivity.this, SkipUserInfoActivity.class));
635
                                finish();
635
                                finish();
636
                            }
636
                            }
637
                        }, 1200);
637
                        }, 1200);

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

435
435
436
436
437
        set_loginShow();
437
        set_loginShow();
438
439
        getCarOwnerCertificateList("init");
440
441
    }
438
    }
442
439
443
    private void getSharePrompt(String user_id) {
440
    private void getSharePrompt(String user_id) {
795
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
792
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
796
                    startActivity(new Intent(getApplication(), LoginActivity.class));
793
                    startActivity(new Intent(getApplication(), LoginActivity.class));
797
                } else {
794
                } else {
795
                    loadDialog.show();
798
                    getCarOwnerCertificateList("certificate");
796
                    getCarOwnerCertificateList("certificate");
799
                }
797
                }
800
                break;
798
                break;
803
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
801
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
804
                    startActivity(new Intent(getApplication(), LoginActivity.class));
802
                    startActivity(new Intent(getApplication(), LoginActivity.class));
805
                } else {
803
                } else {
804
                    loadDialog.show();
806
                    getCarOwnerCertificateList("price");
805
                    getCarOwnerCertificateList("price");
807
                }
806
                }
808
                break;
807
                break;
1065
    }
1064
    }
1066
1065
1067
    private void getCarOwnerCertificateList(String from) {
1066
    private void getCarOwnerCertificateList(String from) {
1068
        loadDialog.show();
1069
        long tokenTime = System.currentTimeMillis() / 1000 - MainMapActivity.cha - 1;
1067
        long tokenTime = System.currentTimeMillis() / 1000 - MainMapActivity.cha - 1;
1070
        String token = null;
1068
        String token = null;
1071
        try {
1069
        try {
1072
            token = DES3.encode(String.valueOf(tokenTime));
1070
            token = DES3.encode(String.valueOf(tokenTime));
1071
            token = URLEncoder.encode(token, "UTF-8");
1073
        } catch (Exception e) {
1072
        } catch (Exception e) {
1074
            e.printStackTrace();
1073
            e.printStackTrace();
1075
        }
1074
        }
1176
                userIcon.setImageResource(R.drawable.icon_face2_0);
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
import java.io.File;
86
import java.io.File;
87
import java.io.FileOutputStream;
87
import java.io.FileOutputStream;
88
import java.io.IOException;
88
import java.io.IOException;
89
import java.net.URLEncoder;
89
import java.util.ArrayList;
90
import java.util.ArrayList;
90
import java.util.HashMap;
91
import java.util.HashMap;
91
import java.util.List;
92
import java.util.List;
243
        go_title = findViewById(R.id.go_title);
244
        go_title = findViewById(R.id.go_title);
244
        go_desc = findViewById(R.id.go_desc);
245
        go_desc = findViewById(R.id.go_desc);
245
        go_cursor = findViewById(R.id.go_cursor);
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
    private void setIcon() {
255
    private void setIcon() {
258
265
259
                        @Override
266
                        @Override
260
                        public void onBitmapFailed(Drawable drawable) {
267
                        public void onBitmapFailed(Drawable drawable) {
261
262
                        }
268
                        }
263
269
264
                        @Override
270
                        @Override
265
                        public void onPrepareLoad(Drawable drawable) {
271
                        public void onPrepareLoad(Drawable drawable) {
266
267
                        }
272
                        }
268
                    });
273
                    });
269
        } else {
274
        } else {
1053
        if (showLoading) {
1058
        if (showLoading) {
1054
            loadDialog.show();
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
        OkHttpUtils.get().url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
1072
        OkHttpUtils.get().url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
1058
            @Override
1073
            @Override
1059
            public void onError(Call call, Exception e) {
1074
            public void onError(Call call, Exception e) {
1104
                        go_cursor.setVisibility(View.VISIBLE);
1119
                        go_cursor.setVisibility(View.VISIBLE);
1105
                    }
1120
                    }
1106
1121
1107
                    if (certificateStatus == 1) {
1122
                    if (certificateStatus == 1 && showLoading) {
1108
                        startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
1123
                        startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
1109
                    }
1124
                    }
1110
1125

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

1
package com.electric.chargingpile.adapter;
1
package com.electric.chargingpile.adapter;
2
2
3
import android.content.Context;
3
import android.content.Context;
4
import android.graphics.Bitmap;
4
import android.view.LayoutInflater;
5
import android.view.LayoutInflater;
5
import android.view.View;
6
import android.view.View;
6
import android.view.ViewGroup;
7
import android.view.ViewGroup;
7
import android.widget.Button;
8
import android.widget.Button;
8
import android.widget.ImageView;
9
import android.widget.ImageView;
9
10
11
import androidx.annotation.Nullable;
12
10
import com.bumptech.glide.Glide;
13
import com.bumptech.glide.Glide;
11
import com.bumptech.glide.load.engine.DiskCacheStrategy;
14
import com.bumptech.glide.load.engine.DiskCacheStrategy;
15
import com.bumptech.glide.request.target.ImageViewTarget;
12
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
16
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
13
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
17
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
14
import com.electric.chargingpile.R;
18
import com.electric.chargingpile.R;
92
            holder.setVisible(R.id.line, View.VISIBLE);
96
            holder.setVisible(R.id.line, View.VISIBLE);
93
        }
97
        }
94
        ImageView icon = holder.getImageView(R.id.icon);
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
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
11
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
12
import com.electric.chargingpile.R;
12
import com.electric.chargingpile.R;
13
import com.electric.chargingpile.entity.CarCompanyEntity;
13
import com.electric.chargingpile.entity.CarCompanyEntity;
14
import com.electric.chargingpile.entity.CarModelChildEntity;
15
import com.electric.chargingpile.entity.CarModelGroupEntity;
14
import com.electric.chargingpile.entity.CarSeriesEntity;
16
import com.electric.chargingpile.entity.CarSeriesEntity;
15
17
16
import java.util.ArrayList;
18
import java.util.ArrayList;
17
19
18
public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
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
        super(context);
25
        super(context);
23
        this.groups = groups;
26
        this.groups = groups;
27
        this.masterPic = masterPic;
24
    }
28
    }
25
29
26
    public void clear() {
30
    public void clear() {
28
        notifyDataChanged();
32
        notifyDataChanged();
29
    }
33
    }
30
34
31
    public void setGroups(ArrayList<CarCompanyEntity> groups) {
35
    public void setGroups(ArrayList<CarModelGroupEntity> groups) {
32
        this.groups = groups;
36
        this.groups = groups;
33
        notifyDataChanged();
37
        notifyDataChanged();
34
    }
38
    }
40
44
41
    @Override
45
    @Override
42
    public int getChildrenCount(int groupPosition) {
46
    public int getChildrenCount(int groupPosition) {
43
        ArrayList<CarSeriesEntity> children = groups.get(groupPosition).getSerieslist();
47
        ArrayList<CarModelChildEntity> children = groups.get(groupPosition).getList();
44
        return children == null ? 0 : children.size();
48
        return children == null ? 0 : children.size();
45
    }
49
    }
46
50
71
75
72
    @Override
76
    @Override
73
    public void onBindHeaderViewHolder(BaseViewHolder holder, int groupPosition) {
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
    @Override
82
    @Override
82
86
83
    @Override
87
    @Override
84
    public void onBindChildViewHolder(BaseViewHolder holder, int groupPosition, int childPosition) {
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
        if (childPosition == 0) {
91
        if (childPosition == 0) {
88
            holder.setVisible(R.id.line, View.GONE);
92
            holder.setVisible(R.id.line, View.GONE);
89
        } else {
93
        } else {
90
            holder.setVisible(R.id.line, View.VISIBLE);
94
            holder.setVisible(R.id.line, View.VISIBLE);
91
        }
95
        }
92
        ImageView master_pic = holder.getImageView(R.id.master_pic);
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
import androidx.recyclerview.widget.RecyclerView;
14
import androidx.recyclerview.widget.RecyclerView;
15
15
16
import com.bumptech.glide.Glide;
16
import com.bumptech.glide.Glide;
17
import com.bumptech.glide.load.engine.DiskCacheStrategy;
17
import com.electric.chargingpile.R;
18
import com.electric.chargingpile.R;
19
import com.electric.chargingpile.activity.CarOwnerCertificateActivity;
18
import com.electric.chargingpile.data.CarOwnerCertificateBean;
20
import com.electric.chargingpile.data.CarOwnerCertificateBean;
21
import com.electric.chargingpile.entity.CarModelEntity;
19
import com.electric.chargingpile.entity.CarSeriesEntity;
22
import com.electric.chargingpile.entity.CarSeriesEntity;
20
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
23
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
21
import com.electric.chargingpile.util.DateUtils;
24
import com.electric.chargingpile.util.DateUtils;
48
    public void onBindViewHolder(@NonNull CarOwnerCertificateListHolder holder, int position) {
51
    public void onBindViewHolder(@NonNull CarOwnerCertificateListHolder holder, int position) {
49
        CarOwnerCertificateBean bean = mList.get(position);
52
        CarOwnerCertificateBean bean = mList.get(position);
50
        Gson gson = new Gson();
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
        holder.main.setVisibility(View.GONE);
65
        holder.main.setVisibility(View.GONE);
57
        holder.set_main.setVisibility(View.GONE);
66
        holder.set_main.setVisibility(View.GONE);
104
            @Override
113
            @Override
105
            public void onClick(View v) {
114
            public void onClick(View v) {
106
                new AlertDialogTwo(mContext).builder()
115
                new AlertDialogTwo(mContext).builder()
107
                        .setMsg("是否设置为主车型" + carSeriesEntity.getSeriesName() + "?")
116
                        .setMsg("是否设置为主车型" + carModelEntity.getSeriesName() + " " + carModelEntity.getModelName() + "?")
108
                        .setPositiveButton("是", new View.OnClickListener() {
117
                        .setPositiveButton("是", new View.OnClickListener() {
109
                            @Override
118
                            @Override
110
                            public void onClick(View v) {
119
                            public void onClick(View v) {
122
            @Override
131
            @Override
123
            public void onClick(View v) {
132
            public void onClick(View v) {
124
                new AlertDialogTwo(mContext).builder()
133
                new AlertDialogTwo(mContext).builder()
125
                        .setMsg("是否删除" + carSeriesEntity.getSeriesName() + "?")
134
                        .setMsg("是否删除" + carModelEntity.getSeriesName() + " " + carModelEntity.getModelName() + "?")
126
                        .setPositiveButton("是", new View.OnClickListener() {
135
                        .setPositiveButton("是", new View.OnClickListener() {
127
                            @Override
136
                            @Override
128
                            public void onClick(View v) {
137
                            public void onClick(View v) {
139
        holder.edit.setOnClickListener(new View.OnClickListener() {
148
        holder.edit.setOnClickListener(new View.OnClickListener() {
140
            @Override
149
            @Override
141
            public void onClick(View v) {
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

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
            holder.lv_scomment = (ListView) convertView.findViewById(R.id.lv_scomment);
136
            holder.lv_scomment = (ListView) convertView.findViewById(R.id.lv_scomment);
137
137
138
            holder.iv_picon = (ImageView) convertView.findViewById(R.id.iv_picon);
138
            holder.iv_picon = (ImageView) convertView.findViewById(R.id.iv_picon);
139
            holder.certified_icon = (ImageView)convertView.findViewById(R.id.certified_icon);
139
            holder.iv_pgrade = (ImageView) convertView.findViewById(R.id.iv_pgrade);
140
            holder.iv_pgrade = (ImageView) convertView.findViewById(R.id.iv_pgrade);
140
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
141
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
141
            holder.iv_level_img = (ImageView) convertView.findViewById(R.id.iv_level_img);
142
            holder.iv_level_img = (ImageView) convertView.findViewById(R.id.iv_level_img);
237
                holder.tv_ptime.setText(TimeStamp2Date(datas.get(position).getString("addtime"), "yyyy-MM-dd"));
238
                holder.tv_ptime.setText(TimeStamp2Date(datas.get(position).getString("addtime"), "yyyy-MM-dd"));
238
                //父级评论人车型
239
                //父级评论人车型
239
                String chexing = datas.get(position).getString("hascar");
240
                String chexing = datas.get(position).getString("hascar");
240
241
                int isCertifiedOwner = datas.get(position).getInt("is_certified_owner");
241
                holder.tv_pcar.setText(CarTypeUtil.getCarType(chexing));
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
                holder.tv_preply.setOnClickListener(new View.OnClickListener() {
251
                holder.tv_preply.setOnClickListener(new View.OnClickListener() {
518
525
519
    private class ViewHolder {
526
    private class ViewHolder {
520
        TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
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
        LinearLayout ll_pzan;
529
        LinearLayout ll_pzan;
523
        ImageView iv_havemessage, iv_commentPic;
530
        ImageView iv_havemessage, iv_commentPic;
524
        ImageView iv_pgrade, iv_pzan, iv_level_img;
531
        ImageView iv_pgrade, iv_pzan, iv_level_img;

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

8
    private int brandId;
8
    private int brandId;
9
    private ArrayList<CarSeriesEntity> serieslist;
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
    public int getCompanyId() {
11
    public int getCompanyId() {
20
        return companyId;
12
        return companyId;
21
    }
13
    }
47
    public void setSerieslist(ArrayList<CarSeriesEntity> serieslist) {
39
    public void setSerieslist(ArrayList<CarSeriesEntity> serieslist) {
48
        this.serieslist = serieslist;
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

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

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

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

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
2
3
import com.electric.chargingpile.entity.CarSeriesEntity;
3
import com.electric.chargingpile.entity.CarSeriesEntity;
4
4
5
public class CarSerieEvent {
5
public class CarSeriesEvent {
6
    private CarSeriesEntity carSeriesEntity;
6
    private CarSeriesEntity carSeriesEntity;
7
7
8
    public CarSerieEvent(CarSeriesEntity carSeriesEntity) {
8
    public CarSeriesEvent(CarSeriesEntity carSeriesEntity) {
9
        this.carSeriesEntity = carSeriesEntity;
9
        this.carSeriesEntity = carSeriesEntity;
10
    }
10
    }
11
11

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

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

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

7
import android.util.Log;
7
import android.util.Log;
8
8
9
import com.electric.chargingpile.activity.MainActicity;
9
import com.electric.chargingpile.activity.MainActicity;
10
import com.electric.chargingpile.activity.MainMapActivity;
11
import com.electric.chargingpile.activity.MyWebViewActivity;
10
import com.electric.chargingpile.activity.WelcomeActivity;
12
import com.electric.chargingpile.activity.WelcomeActivity;
11
import com.electric.chargingpile.application.MainApplication;
13
import com.electric.chargingpile.application.MainApplication;
14
import com.electric.chargingpile.util.DES3;
12
import com.electric.chargingpile.util.ExampleUtil;
15
import com.electric.chargingpile.util.ExampleUtil;
16
import com.umeng.analytics.MobclickAgent;
13
17
14
import org.json.JSONException;
18
import org.json.JSONException;
15
import org.json.JSONObject;
19
import org.json.JSONObject;
16
20
21
import java.net.URLEncoder;
17
import java.util.Iterator;
22
import java.util.Iterator;
18
23
19
import cn.jpush.android.api.JPushInterface;
24
import cn.jpush.android.api.JPushInterface;
84
            }
89
            }
85
//			Log.e("articleUrl:", articleUrl);
90
//			Log.e("articleUrl:", articleUrl);
86
            //打开自定义的Activity
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
        } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
112
        } else if (JPushInterface.ACTION_RICHPUSH_CALLBACK.equals(intent.getAction())) {
96
            Log.d(TAG, "[MyReceiver] 用户收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
113
            Log.d(TAG, "[MyReceiver] 用户收到到RICH PUSH CALLBACK: " + bundle.getString(JPushInterface.EXTRA_EXTRA));
97
            //在这里根据 JPushInterface.EXTRA_EXTRA 的内容处理代码,比如打开新的Activity, 打开一个网页等..
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
    android:layout_width="match_parent"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/white"
7
    android:background="@color/white"
8
    tools:context=".activity.CarModelActivity">
8
    tools:context=".activity.CarSeriesActivity">
9
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/nav_bar"
11
        android:id="@+id/nav_bar"
54
            android:layout_width="match_parent"
54
            android:layout_width="match_parent"
55
            android:layout_height="match_parent" />
55
            android:layout_height="match_parent" />
56
    </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
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
</androidx.constraintlayout.widget.ConstraintLayout>
70
</androidx.constraintlayout.widget.ConstraintLayout>

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

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

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

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

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

153
                android:background="@color/ui_line"
153
                android:background="@color/ui_line"
154
                android:visibility="visible" />
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
            <RelativeLayout
194
            <RelativeLayout
158
                android:id="@+id/go_certificate"
195
                android:id="@+id/go_certificate"

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

4
    xmlns:tools="http://schemas.android.com/tools"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
5
    android:layout_width="match_parent"
6
    android:layout_height="100dp"
6
    android:layout_height="100dp"
7
    android:paddingLeft="15dp"
8
    android:background="@color/white"
7
    android:background="@color/white"
8
    android:paddingLeft="15dp"
9
    tools:background="#cccccc">
9
    tools:background="#cccccc">
10
10
11
    <View
11
    <View
26
        tools:background="#00ff00" />
26
        tools:background="#00ff00" />
27
27
28
    <TextView
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
        android:layout_height="wrap_content"
31
        android:layout_height="wrap_content"
32
        android:layout_gravity="center_vertical"
32
        android:layout_gravity="center_vertical"
33
        android:layout_marginLeft="10dp"
33
        android:layout_marginLeft="10dp"
34
        android:layout_marginTop="27dp"
34
        android:layout_marginRight="15dp"
35
        android:textColor="#FF222222"
35
        android:textColor="#FF222222"
36
        android:textSize="14sp"
36
        android:textSize="14sp"
37
        app:layout_constraintBottom_toBottomOf="parent"
37
        app:layout_constraintLeft_toRightOf="@+id/master_pic"
38
        app:layout_constraintLeft_toRightOf="@+id/master_pic"
39
        app:layout_constraintRight_toRightOf="parent"
38
        app:layout_constraintTop_toTopOf="parent"
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
</androidx.constraintlayout.widget.ConstraintLayout>
43
</androidx.constraintlayout.widget.ConstraintLayout>

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

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

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
<?xml version="1.0" encoding="utf-8"?>
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3
    xmlns:zhy="http://schemas.android.com/tools"
4
    xmlns:zhy="http://schemas.android.com/tools"
4
    android:id="@+id/ll_zhan_comments"
5
    android:id="@+id/ll_zhan_comments"
5
    android:layout_width="match_parent"
6
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:layout_height="match_parent"
7
    xmlns:app="http://schemas.android.com/apk/res-auto"
8
    android:background="@color/bg_row"
8
    android:background="@color/bg_row"
9
    android:orientation="vertical">
9
    android:orientation="vertical">
10
10
18
            android:id="@+id/rl_icon"
18
            android:id="@+id/rl_icon"
19
            android:layout_width="35dp"
19
            android:layout_width="35dp"
20
            android:layout_height="35dp"
20
            android:layout_height="35dp"
21
            android:layout_alignParentTop="true"
22
            android:layout_alignParentLeft="true"
23
            android:layout_alignParentStart="true"
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
            android:layout_marginLeft="15dp"
25
            android:layout_marginLeft="15dp"
26
            android:layout_gravity="center_vertical">
26
            android:layout_marginTop="12dp">
27
27
28
            <ImageView
28
            <ImageView
29
                android:id="@+id/iv_picon"
29
                android:layout_width="35dp"
30
                android:layout_width="35dp"
30
                android:layout_height="35dp"
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
            <ImageView
34
            <ImageView
35
                android:id="@+id/iv_level_img"
35
                android:id="@+id/iv_level_img"
36
                android:layout_width="15dp"
36
                android:layout_width="15dp"
37
                android:layout_height="15dp"
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
        </RelativeLayout>
42
        </RelativeLayout>
43
43
44
44
45
46
        <TextView
45
        <TextView
46
            android:id="@+id/tv_pname"
47
            android:layout_width="wrap_content"
47
            android:layout_width="wrap_content"
48
            android:layout_height="wrap_content"
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
            android:layout_alignTop="@+id/rl_icon"
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
            android:layout_toRightOf="@+id/rl_icon"
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
        <TextView
73
        <TextView
74
            android:id="@+id/tv_pcar"
64
            android:layout_width="match_parent"
75
            android:layout_width="match_parent"
65
            android:layout_height="wrap_content"
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
            android:layout_alignTop="@+id/tv_pname"
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
            android:layout_marginRight="5dp"
80
            android:layout_marginRight="5dp"
81
            android:layout_toLeftOf="@+id/iv_pgrade"
82
            android:layout_toRightOf="@+id/certified_icon"
83
            android:ellipsize="end"
77
            android:singleLine="true"
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
        <ImageView
90
        <ImageView
91
            android:id="@+id/iv_pgrade"
81
            android:layout_width="wrap_content"
92
            android:layout_width="wrap_content"
82
            android:layout_height="wrap_content"
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
            android:layout_alignTop="@+id/tv_pname"
94
            android:layout_alignTop="@+id/tv_pname"
87
            android:layout_alignParentRight="true"
95
            android:layout_alignParentRight="true"
96
            android:layout_gravity="center_vertical"
88
            android:layout_marginRight="15dp"
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
        <TextView
101
        <TextView
102
            android:id="@+id/tv_pcontext"
92
            android:layout_width="wrap_content"
103
            android:layout_width="wrap_content"
93
            android:layout_height="wrap_content"
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
            android:layout_below="@+id/tv_pname"
105
            android:layout_below="@+id/tv_pname"
101
            android:layout_alignLeft="@+id/tv_pname"
102
            android:layout_alignStart="@+id/tv_pname"
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
        <com.zhy.view.flowlayout.TagFlowLayout
115
        <com.zhy.view.flowlayout.TagFlowLayout
106
            android:id="@+id/fl_ptag"
116
            android:id="@+id/fl_ptag"
109
            android:layout_below="@+id/tv_pcontext"
119
            android:layout_below="@+id/tv_pcontext"
110
            android:layout_alignLeft="@+id/tv_pcontext"
120
            android:layout_alignLeft="@+id/tv_pcontext"
111
            android:layout_marginTop="10dp"
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
        <ImageView
125
        <ImageView
126
            android:id="@+id/iv_commentPic"
116
            android:layout_width="65dp"
127
            android:layout_width="65dp"
117
            android:layout_height="65dp"
128
            android:layout_height="65dp"
118
            android:id="@+id/iv_commentPic"
119
            android:layout_marginTop="10dp"
120
            android:layout_below="@+id/fl_ptag"
129
            android:layout_below="@+id/fl_ptag"
121
            android:layout_alignLeft="@+id/tv_pcontext"
130
            android:layout_alignLeft="@+id/tv_pcontext"
131
            android:layout_marginTop="10dp"
122
            android:scaleType="centerCrop"
132
            android:scaleType="centerCrop"
123
            android:visibility="gone"/>
133
            android:visibility="gone" />
124
134
125
        <TextView
135
        <TextView
136
            android:id="@+id/tv_ptime"
126
            android:layout_width="wrap_content"
137
            android:layout_width="wrap_content"
127
            android:layout_height="wrap_content"
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
            android:layout_below="@+id/iv_commentPic"
139
            android:layout_below="@+id/iv_commentPic"
140
            android:layout_alignStart="@+id/tv_pcontext"
136
            android:layout_alignLeft="@+id/tv_pcontext"
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
        <TextView
149
        <TextView
140
            android:id="@+id/tv_pdelete"
150
            android:id="@+id/tv_pdelete"
141
            android:layout_width="wrap_content"
151
            android:layout_width="wrap_content"
142
            android:layout_height="wrap_content"
152
            android:layout_height="wrap_content"
143
            android:layout_toRightOf="@+id/tv_ptime"
144
            android:layout_alignTop="@+id/tv_ptime"
153
            android:layout_alignTop="@+id/tv_ptime"
154
            android:layout_toRightOf="@+id/tv_ptime"
145
            android:paddingLeft="12dp"
155
            android:paddingLeft="12dp"
146
            android:paddingRight="12dp"
156
            android:paddingRight="12dp"
147
            android:text="删除"
157
            android:text="删除"
148
            android:textSize="12sp"
149
            android:textColor="@color/ui_68"
158
            android:textColor="@color/ui_68"
150
            android:visibility="gone"/>
159
            android:textSize="12sp"
160
            android:visibility="gone" />
151
161
152
162
153
        <LinearLayout
163
        <LinearLayout
156
            android:layout_height="wrap_content"
166
            android:layout_height="wrap_content"
157
            android:layout_below="@+id/iv_commentPic"
167
            android:layout_below="@+id/iv_commentPic"
158
            android:layout_toLeftOf="@+id/tv_preply"
168
            android:layout_toLeftOf="@+id/tv_preply"
159
            android:paddingRight="13dp"
169
            android:paddingLeft="10dp"
160
            android:paddingTop="10dp"
170
            android:paddingTop="10dp"
161
            android:paddingBottom="8dp"
162
            android:paddingLeft="10dp">
171
            android:paddingRight="13dp"
172
            android:paddingBottom="8dp">
163
173
164
            <ImageView
174
            <ImageView
175
                android:id="@+id/iv_pzan"
165
                android:layout_width="wrap_content"
176
                android:layout_width="wrap_content"
166
                android:layout_height="wrap_content"
177
                android:layout_height="wrap_content"
167
                android:id="@+id/iv_pzan"
168
                android:layout_gravity="center"
178
                android:layout_gravity="center"
169
                android:src="@drawable/icon_comment_zan"/>
179
                android:src="@drawable/icon_comment_zan" />
170
180
171
            <TextView
181
            <TextView
182
                android:id="@+id/tv_pzan"
172
                android:layout_width="wrap_content"
183
                android:layout_width="wrap_content"
173
                android:layout_height="wrap_content"
184
                android:layout_height="wrap_content"
174
                android:textAppearance="?android:attr/textAppearanceSmall"
185
                android:layout_marginLeft="8dp"
186
                android:gravity="center"
175
                android:text="0"
187
                android:text="0"
176
                android:textSize="12sp"
188
                android:textAppearance="?android:attr/textAppearanceSmall"
177
                android:textColor="@color/ui_68"
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
        </LinearLayout>
193
        </LinearLayout>
184
194
185
195
186
        <TextView
196
        <TextView
197
            android:id="@+id/tv_preply"
187
            android:layout_width="wrap_content"
198
            android:layout_width="wrap_content"
188
            android:layout_height="wrap_content"
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
            android:layout_below="@+id/iv_commentPic"
200
            android:layout_below="@+id/iv_commentPic"
196
            android:layout_alignRight="@+id/tv_pcontext"
197
            android:layout_alignEnd="@+id/tv_pcontext"
201
            android:layout_alignEnd="@+id/tv_pcontext"
202
            android:layout_alignRight="@+id/tv_pcontext"
198
            android:layout_alignParentRight="true"
203
            android:layout_alignParentRight="true"
199
            android:paddingRight="15dp"
200
            android:paddingTop="10dp"
201
            android:paddingLeft="12dp"
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
        <TextView
215
        <TextView
216
            android:id="@+id/tv_childName"
206
            android:layout_width="wrap_content"
217
            android:layout_width="wrap_content"
207
            android:layout_height="wrap_content"
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
            android:layout_below="@+id/tv_ptime"
219
            android:layout_below="@+id/tv_ptime"
213
            android:layout_alignLeft="@+id/tv_ptime"
214
            android:layout_alignStart="@+id/tv_ptime"
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
        <TextView
227
        <TextView
228
            android:id="@+id/textView14"
218
            android:layout_width="wrap_content"
229
            android:layout_width="wrap_content"
219
            android:layout_height="wrap_content"
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
            android:layout_alignBaseline="@+id/tv_childName"
231
            android:layout_alignBaseline="@+id/tv_childName"
225
            android:layout_alignBottom="@+id/tv_childName"
232
            android:layout_alignBottom="@+id/tv_childName"
233
            android:layout_marginLeft="8dp"
226
            android:layout_toRightOf="@+id/tv_childName"
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
        <TextView
239
        <TextView
240
            android:id="@+id/tv_parentName"
230
            android:layout_width="wrap_content"
241
            android:layout_width="wrap_content"
231
            android:layout_height="wrap_content"
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
            android:layout_alignBottom="@+id/textView14"
243
            android:layout_alignBottom="@+id/textView14"
237
            android:layout_toRightOf="@+id/textView14"
244
            android:layout_marginLeft="8dp"
238
            android:layout_toEndOf="@+id/textView14"
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
        <TextView
251
        <TextView
252
            android:id="@+id/tv_commentDetail"
242
            android:layout_width="wrap_content"
253
            android:layout_width="wrap_content"
243
            android:layout_height="wrap_content"
254
            android:layout_height="wrap_content"
244
            android:textAppearance="?android:attr/textAppearanceSmall"
245
            android:text="有故障!"
246
            android:id="@+id/tv_commentDetail"
247
            android:layout_alignBottom="@+id/tv_parentName"
255
            android:layout_alignBottom="@+id/tv_parentName"
248
            android:layout_toRightOf="@+id/tv_parentName"
249
            android:layout_toEndOf="@+id/tv_parentName"
250
            android:layout_marginLeft="8dp"
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
        <com.electric.chargingpile.view.MyListView
263
        <com.electric.chargingpile.view.MyListView
254
            android:id="@+id/lv_scomment"
264
            android:id="@+id/lv_scomment"
255
            android:layout_width="match_parent"
265
            android:layout_width="match_parent"
256
            android:layout_height="wrap_content"
266
            android:layout_height="wrap_content"
257
            android:divider="#dddddd"
258
            android:dividerHeight="0.5dp"
259
            android:layout_below="@+id/tv_ptime"
267
            android:layout_below="@+id/tv_ptime"
260
            android:background="#fafafa"
261
            android:layout_alignLeft="@+id/tv_ptime"
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
        <TextView
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
            android:layout_below="@+id/lv_scomment"
279
            android:layout_below="@+id/lv_scomment"
270
            android:layout_alignLeft="@+id/lv_scomment"
280
            android:layout_alignLeft="@+id/lv_scomment"
271
            android:layout_alignRight="@+id/lv_scomment"
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
        <!--<LinearLayout-->
290
        <!--<LinearLayout-->
325
332
326
            android:layout_width="match_parent"
333
            android:layout_width="match_parent"
327
            android:layout_height="0.5dp"
334
            android:layout_height="0.5dp"
328
            android:background="@color/Line"
329
            android:layout_below="@+id/tv_ptime"
335
            android:layout_below="@+id/tv_ptime"
330
            android:visibility="gone"/>
336
            android:background="@color/Line"
337
            android:visibility="gone" />
331
338
332
    </RelativeLayout>
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
    <View
341
    <View
517
        android:id="@+id/vvv"
342
        android:id="@+id/vvv"
518
        android:layout_width="match_parent"
343
        android:layout_width="match_parent"
519
        android:layout_height="0.5dp"
344
        android:layout_height="0.5dp"
520
        android:background="@color/Line"
521
        android:layout_below="@+id/lv_scomment"
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
</LinearLayout>
350
</LinearLayout>