浏览代码

完成车主认证所需

hy 3 年之前
父节点
当前提交
b33dcdda3f
共有 26 个文件被更改,包括 436 次插入59 次删除
  1. 2 0
      app/src/main/AndroidManifest.xml
  2. 87 8
      app/src/main/java/com/electric/chargingpile/activity/CarBrandActivity.java
  3. 37 20
      app/src/main/java/com/electric/chargingpile/activity/CarModelActivity.java
  4. 5 3
      app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateActivity.java
  5. 3 1
      app/src/main/java/com/electric/chargingpile/activity/CarSeriesActivity.java
  6. 12 1
      app/src/main/java/com/electric/chargingpile/activity/ChargingStatusActivity.java
  7. 22 0
      app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java
  8. 20 1
      app/src/main/java/com/electric/chargingpile/activity/SkipUserInfoActivity.java
  9. 41 2
      app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java
  10. 4 0
      app/src/main/java/com/electric/chargingpile/activity/UserCenterMoreActivity.java
  11. 16 0
      app/src/main/java/com/electric/chargingpile/activity/UserInfoActivity.java
  12. 14 7
      app/src/main/java/com/electric/chargingpile/application/MainApplication.java
  13. 46 4
      app/src/main/java/com/electric/chargingpile/manager/ProfileManager.java
  14. 7 1
      app/src/main/java/com/electric/chargingpile/view/NotRegisterDialog.java
  15. 二进制
      app/src/main/res/drawable-xxhdpi/bg_car_intent_model.png
  16. 二进制
      app/src/main/res/drawable-xxhdpi/go_receive.png
  17. 二进制
      app/src/main/res/drawable-xxhdpi/ic_50_coupon.png
  18. 二进制
      app/src/main/res/drawable-xxhdpi/ic_certification.png
  19. 二进制
      app/src/main/res/drawable-xxhdpi/ic_go_fill_in.png
  20. 二进制
      app/src/main/res/drawable-xxhdpi/ic_red_envelope.webp
  21. 9 0
      app/src/main/res/drawable/bg_f9f9fb_radius5.xml
  22. 30 0
      app/src/main/res/layout/activity_charging_status.xml
  23. 65 8
      app/src/main/res/layout/activity_skip_user_info.xml
  24. 2 0
      app/src/main/res/layout/activity_user_info.xml
  25. 13 3
      app/src/main/res/layout/dialog_not_login.xml
  26. 1 0
      app/src/main/res/values/color.xml

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

292
        <activity
292
        <activity
293
            android:name=".activity.UserInfoActivity"
293
            android:name=".activity.UserInfoActivity"
294
            android:label="@string/title_activity_user_info"
294
            android:label="@string/title_activity_user_info"
295
            android:launchMode="singleTask"
295
            android:screenOrientation="portrait" />
296
            android:screenOrientation="portrait" />
296
        <activity
297
        <activity
297
            android:name=".activity.GalleryActivity"
298
            android:name=".activity.GalleryActivity"
405
        <activity
406
        <activity
406
            android:name=".activity.SkipUserInfoActivity"
407
            android:name=".activity.SkipUserInfoActivity"
407
            android:label="@string/title_activity_skip_user_info"
408
            android:label="@string/title_activity_skip_user_info"
409
            android:launchMode="singleTask"
408
            android:screenOrientation="portrait" />
410
            android:screenOrientation="portrait" />
409
        <activity
411
        <activity
410
            android:name=".activity.NewScreenActivity"
412
            android:name=".activity.NewScreenActivity"

+ 87 - 8
app/src/main/java/com/electric/chargingpile/activity/CarBrandActivity.java

4
import androidx.recyclerview.widget.LinearLayoutManager;
4
import androidx.recyclerview.widget.LinearLayoutManager;
5
import androidx.recyclerview.widget.RecyclerView;
5
import androidx.recyclerview.widget.RecyclerView;
6
6
7
import android.content.Context;
7
import android.content.Intent;
8
import android.content.Intent;
8
import android.os.Bundle;
9
import android.os.Bundle;
10
import android.text.TextUtils;
9
import android.view.View;
11
import android.view.View;
10
import android.widget.TextView;
12
import android.widget.TextView;
13
import android.widget.Toast;
11
14
12
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
15
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
13
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
16
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
20
import com.electric.chargingpile.event.CarBrandEvent;
23
import com.electric.chargingpile.event.CarBrandEvent;
21
import com.electric.chargingpile.event.CarCompanyEvent;
24
import com.electric.chargingpile.event.CarCompanyEvent;
22
import com.electric.chargingpile.util.BarColorUtil;
25
import com.electric.chargingpile.util.BarColorUtil;
26
import com.electric.chargingpile.util.JsonUtils;
27
import com.electric.chargingpile.util.LoadingDialog;
28
import com.electric.chargingpile.util.ToastUtil;
23
import com.electric.chargingpile.view.LetterSideView;
29
import com.electric.chargingpile.view.LetterSideView;
30
import com.google.gson.Gson;
31
import com.google.gson.reflect.TypeToken;
32
import com.zhy.http.okhttp.OkHttpUtils;
33
import com.zhy.http.okhttp.callback.StringCallback;
24
34
25
import org.greenrobot.eventbus.EventBus;
35
import org.greenrobot.eventbus.EventBus;
26
36
27
import java.util.ArrayList;
37
import java.util.ArrayList;
38
39
import okhttp3.Call;
40
28
/**
41
/**
29
 * 车型品牌选择
42
 * 车型品牌选择
30
 * */
43
 * */
31
public class CarBrandActivity extends AppCompatActivity implements View.OnClickListener {
44
public class CarBrandActivity extends AppCompatActivity implements View.OnClickListener {
45
    /*
46
    * 1 表示从个人信息页(UserInfo)意向车型进入,2 表示从SkipUserInfoActivity 意向车型进入
47
    * */
48
    public static String sourceType;
49
32
50
33
    private LetterSideView letter_side_view;
51
    private LetterSideView letter_side_view;
34
    private TextView text_view_dialog;
52
    private TextView text_view_dialog;
37
    private CarBrandGroupedListAdapter adapter;
55
    private CarBrandGroupedListAdapter adapter;
38
    private ArrayList<CarBrandGroupEntity> groups;
56
    private ArrayList<CarBrandGroupEntity> groups;
39
57
58
    private LoadingDialog loadDialog;
59
40
    @Override
60
    @Override
41
    protected void onCreate(Bundle savedInstanceState) {
61
    protected void onCreate(Bundle savedInstanceState) {
42
        super.onCreate(savedInstanceState);
62
        super.onCreate(savedInstanceState);
46
    }
66
    }
47
67
48
    private void initViews() {
68
    private void initViews() {
49
50
        CarBrandEvent event = EventBus.getDefault().removeStickyEvent(CarBrandEvent.class);
51
        if (event != null) {
52
            groups = event.getGroups();
53
            String[] letters = new String[groups.size()];
54
            for (int i = 0; i < groups.size(); i++) {
55
                letters[i] = groups.get(i).getInitial();
69
        sourceType="";
70
        Intent intent = getIntent();
71
        sourceType = intent.getStringExtra("source");
72
73
        loadDialog = new LoadingDialog(this);
74
        loadDialog.setCanceledOnTouchOutside(false);
75
76
        if (TextUtils.isEmpty(sourceType)){
77
            CarBrandEvent event = EventBus.getDefault().removeStickyEvent(CarBrandEvent.class);
78
            if (event != null) {
79
                groups = event.getGroups();
80
                String[] letters = new String[groups.size()];
81
                for (int i = 0; i < groups.size(); i++) {
82
                    letters[i] = groups.get(i).getInitial();
83
                }
84
                LetterSideView.letters = letters;
56
            }
85
            }
57
            LetterSideView.letters = letters;
86
        }else{
87
            requestData();
58
        }
88
        }
89
59
        findViewById(R.id.iv_back).setOnClickListener(this::onClick);
90
        findViewById(R.id.iv_back).setOnClickListener(this::onClick);
60
        letter_side_view = findViewById(R.id.letter_side_view);
91
        letter_side_view = findViewById(R.id.letter_side_view);
61
        text_view_dialog = findViewById(R.id.text_view_dialog);
92
        text_view_dialog = findViewById(R.id.text_view_dialog);
110
141
111
    }
142
    }
112
143
144
    private void requestData() {
145
        loadDialog.show();
146
        String url = "http://car.d1ev.com/car/api/v1000/brand/list.do?from=cdz";
147
        OkHttpUtils.get().url(url).build().connTimeOut(30000).readTimeOut(30000).execute(new StringCallback() {
148
            @Override
149
            public void onError(Call call, Exception e) {
150
                Toast.makeText(getApplicationContext(), "网络不给力,请检查网络状态", Toast.LENGTH_SHORT).show();
151
                loadDialog.dismiss();
152
            }
153
154
            @Override
155
            public void onResponse(String response) {
156
                loadDialog.dismiss();
157
                String code = JsonUtils.getKeyResult(response, "code");
158
                String desc = JsonUtils.getKeyResult(response, "desc");
159
                if ("1000".equals(code)) {
160
                    String data = JsonUtils.getKeyResult(response, "data");
161
                    Gson gson = new Gson();
162
                    groups = gson.fromJson(data, new TypeToken<ArrayList<CarBrandGroupEntity>>() {
163
                    }.getType());
164
                    if (groups == null || groups.size() == 0) {
165
                        ToastUtil.showToast(getApplicationContext(), desc, Toast.LENGTH_SHORT);
166
                    } else {
167
                        String[] letters = new String[groups.size()];
168
                        for (int i = 0; i < groups.size(); i++) {
169
                            letters[i] = groups.get(i).getInitial();
170
                        }
171
                        LetterSideView.letters = letters;
172
                        adapter.setGroups(groups);
173
                    }
174
                } else {
175
                    ToastUtil.showToast(getApplicationContext(), desc, Toast.LENGTH_SHORT);
176
                }
177
            }
178
        });
179
    }
180
113
    @Override
181
    @Override
114
    public void onClick(View v) {
182
    public void onClick(View v) {
115
        switch (v.getId()) {
183
        switch (v.getId()) {
118
                break;
186
                break;
119
        }
187
        }
120
    }
188
    }
189
    public static  void actionStart(Context context){
190
        actionStart(context,null);
191
    }
192
193
    public static  void actionStart(Context context,String source){
194
        Intent intent = new Intent(context,CarBrandActivity.class);
195
        if (source!=null){
196
            intent.putExtra("source",source);
197
        }
198
        context.startActivity(intent);
199
    }
121
}
200
}

+ 37 - 20
app/src/main/java/com/electric/chargingpile/activity/CarModelActivity.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.text.TextUtils;
9
import android.view.View;
10
import android.view.View;
10
import android.widget.TextView;
11
import android.widget.TextView;
11
import android.widget.Toast;
12
import android.widget.Toast;
15
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
16
import com.donkingliang.groupedadapter.widget.StickyHeaderLayout;
16
import com.electric.chargingpile.R;
17
import com.electric.chargingpile.R;
17
import com.electric.chargingpile.adapter.CarModelGroupedListAdapter;
18
import com.electric.chargingpile.adapter.CarModelGroupedListAdapter;
19
import com.electric.chargingpile.application.MainApplication;
18
import com.electric.chargingpile.entity.CarModelChildEntity;
20
import com.electric.chargingpile.entity.CarModelChildEntity;
19
import com.electric.chargingpile.entity.CarModelEntity;
21
import com.electric.chargingpile.entity.CarModelEntity;
20
import com.electric.chargingpile.entity.CarModelGroupEntity;
22
import com.electric.chargingpile.entity.CarModelGroupEntity;
21
import com.electric.chargingpile.entity.CarSeriesEntity;
23
import com.electric.chargingpile.entity.CarSeriesEntity;
22
import com.electric.chargingpile.event.CarModelEvent;
24
import com.electric.chargingpile.event.CarModelEvent;
23
import com.electric.chargingpile.event.CarSeriesEvent;
25
import com.electric.chargingpile.event.CarSeriesEvent;
26
import com.electric.chargingpile.manager.ProfileManager;
24
import com.electric.chargingpile.util.BarColorUtil;
27
import com.electric.chargingpile.util.BarColorUtil;
25
import com.electric.chargingpile.util.JsonUtils;
28
import com.electric.chargingpile.util.JsonUtils;
26
import com.electric.chargingpile.util.LoadingDialog;
29
import com.electric.chargingpile.util.LoadingDialog;
35
import java.util.ArrayList;
38
import java.util.ArrayList;
36
39
37
import okhttp3.Call;
40
import okhttp3.Call;
38
41
/**
42
 * 车型选择
43
 * */
39
public class CarModelActivity extends AppCompatActivity implements View.OnClickListener {
44
public class CarModelActivity extends AppCompatActivity implements View.OnClickListener {
40
45
41
    private RecyclerView recycler_view;
46
    private RecyclerView recycler_view;
75
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
80
        adapter.setOnChildClickListener(new GroupedRecyclerViewAdapter.OnChildClickListener() {
76
            @Override
81
            @Override
77
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
82
            public void onChildClick(GroupedRecyclerViewAdapter adapter, BaseViewHolder holder, int groupPosition, int childPosition) {
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));
96
                startActivity(new Intent(CarModelActivity.this, CarOwnerCertificateActivity.class));
83
                String sourceType = CarBrandActivity.sourceType;
84
                if (!TextUtils.isEmpty(sourceType)){
85
                    MainApplication.userCarIntentMode= carSeriesEntity.getSeriesName();
86
                    ProfileManager.getInstance().setCarIntentModel(CarModelActivity.this,carSeriesEntity.getSeriesName());
87
                    if (sourceType.equals("1")){
88
                        startActivity(new Intent(CarModelActivity.this, UserInfoActivity.class));
89
                    }else if (sourceType.equals("2")){
90
                        startActivity(new Intent(CarModelActivity.this, SkipUserInfoActivity.class));
91
92
                    }
93
                }else{
94
                    CarModelChildEntity carModelChildEntity = groups.get(groupPosition).getList().get(childPosition);
95
                    CarModelEntity carModelEntity = new CarModelEntity();
96
97
                    carModelEntity.setBrandName(carSeriesEntity.getBrandName());
98
                    carModelEntity.setCompanyId(carSeriesEntity.getCompanyId());
99
                    carModelEntity.setCompanyName(carSeriesEntity.getCompanyName());
100
                    carModelEntity.setSeriesId(carSeriesEntity.getSeriesId());
101
                    carModelEntity.setSeriesName(carSeriesEntity.getSeriesName());
102
                    carModelEntity.setSalePrice(carSeriesEntity.getSalePrice());
103
                    carModelEntity.setIcon(carSeriesEntity.getIcon());
104
                    carModelEntity.setMasterPic(carSeriesEntity.getMasterPic());
105
                    carModelEntity.setMaxSalePrice(carSeriesEntity.getMaxSalePrice());
106
                    carModelEntity.setMinSalePrice(carSeriesEntity.getMinSalePrice());
107
108
                    carModelEntity.setModelId(carModelChildEntity.getModelId());
109
                    carModelEntity.setModelName(carModelChildEntity.getModelName());
110
111
                    EventBus.getDefault().post(new CarModelEvent(carModelEntity));
112
                    startActivity(new Intent(CarModelActivity.this, CarOwnerCertificateActivity.class));
113
                }
97
            }
114
            }
98
        });
115
        });
99
116

+ 5 - 3
app/src/main/java/com/electric/chargingpile/activity/CarOwnerCertificateActivity.java

273
                    } else {
273
                    } else {
274
                        if (showLoading) {
274
                        if (showLoading) {
275
                            EventBus.getDefault().postSticky(new CarBrandEvent(groups));
275
                            EventBus.getDefault().postSticky(new CarBrandEvent(groups));
276
                            startActivity(new Intent(CarOwnerCertificateActivity.this, CarBrandActivity.class));
276
                            CarBrandActivity.actionStart(CarOwnerCertificateActivity.this);
277
//                            startActivity(new Intent(CarOwnerCertificateActivity.this, CarBrandActivity.class));
277
                        }
278
                        }
278
                    }
279
                    }
279
                } else {
280
                } else {
293
                    brandListRequest(true);
294
                    brandListRequest(true);
294
                } else {
295
                } else {
295
                    EventBus.getDefault().postSticky(new CarBrandEvent(groups));
296
                    EventBus.getDefault().postSticky(new CarBrandEvent(groups));
296
                    startActivity(new Intent(CarOwnerCertificateActivity.this, CarBrandActivity.class));
297
                    CarBrandActivity.actionStart(CarOwnerCertificateActivity.this);
298
//                    startActivity(new Intent(CarOwnerCertificateActivity.this, CarBrandActivity.class));
297
                }
299
                }
298
                break;
300
                break;
299
            case R.id.driving_license:
301
            case R.id.driving_license:
536
        });
538
        });
537
    }
539
    }
538
540
539
    private void addCarOwnerCertification() {
541
    private void  addCarOwnerCertification() {
540
        if (carModelEntity == null) {
542
        if (carModelEntity == null) {
541
            ToastUtil.showToast(this, "请添加车型", Toast.LENGTH_SHORT);
543
            ToastUtil.showToast(this, "请添加车型", Toast.LENGTH_SHORT);
542
            return;
544
            return;

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

22
import org.greenrobot.eventbus.EventBus;
22
import org.greenrobot.eventbus.EventBus;
23
23
24
import java.util.ArrayList;
24
import java.util.ArrayList;
25
25
/**
26
 * 车系选择
27
 * */
26
public class CarSeriesActivity extends AppCompatActivity implements View.OnClickListener {
28
public class CarSeriesActivity extends AppCompatActivity implements View.OnClickListener {
27
29
28
    private RecyclerView recycler_view;
30
    private RecyclerView recycler_view;

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

17
import android.view.KeyEvent;
17
import android.view.KeyEvent;
18
import android.view.View;
18
import android.view.View;
19
import android.widget.ImageView;
19
import android.widget.ImageView;
20
import android.widget.LinearLayout;
20
import android.widget.RelativeLayout;
21
import android.widget.RelativeLayout;
21
import android.widget.TextView;
22
import android.widget.TextView;
22
import android.widget.Toast;
23
import android.widget.Toast;
99
        }
100
        }
100
    };
101
    };
101
    private RelativeLayout rl_circle;
102
    private RelativeLayout rl_circle;
103
    private LinearLayout layoutCarCertificate;
102
104
103
105
104
    @Override
106
    @Override
209
        tv_dianya = (TextView) findViewById(R.id.tv_dianya);
211
        tv_dianya = (TextView) findViewById(R.id.tv_dianya);
210
        tv_dianliu = (TextView) findViewById(R.id.tv_dianliu);
212
        tv_dianliu = (TextView) findViewById(R.id.tv_dianliu);
211
        tv_time = (TextView) findViewById(R.id.tv_time);
213
        tv_time = (TextView) findViewById(R.id.tv_time);
214
        layoutCarCertificate = findViewById(R.id.layoutCarCertificate);
212
        tv_time.setOnClickListener(new View.OnClickListener() {
215
        tv_time.setOnClickListener(new View.OnClickListener() {
213
            @Override
216
            @Override
214
            public void onClick(View v) {
217
            public void onClick(View v) {
692
    protected void onResume() {
695
    protected void onResume() {
693
        super.onResume();
696
        super.onResume();
694
        MobclickAgent.onResume(this);
697
        MobclickAgent.onResume(this);
695
698
        if (MainApplication.userCar.equals("")){
699
            layoutCarCertificate.setVisibility(View.VISIBLE);
700
        }else{
701
            layoutCarCertificate.setVisibility(View.GONE);
702
        }
703
        layoutCarCertificate.setOnClickListener(v->{
704
            Intent intent = new Intent(getApplicationContext(), CarOwnerCertificateActivity.class);
705
            startActivity(intent);
706
        });
696
    }
707
    }
697
708
698
    @Override
709
    @Override

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

917
                if (login_meg.equals("")) {
917
                if (login_meg.equals("")) {
918
                    login_meg = "我知道你关注我很久了,快来注册登录吧,登录后可以在特来电、聚电科技充电桩扫码充电";
918
                    login_meg = "我知道你关注我很久了,快来注册登录吧,登录后可以在特来电、聚电科技充电桩扫码充电";
919
                }
919
                }
920
                if (isDestroyed() ||isFinishing()) {
921
                    return;
922
                }
923
920
                int maxCount = ProfileManager.getInstance().getMaxCount(getApplicationContext());
924
                int maxCount = ProfileManager.getInstance().getMaxCount(getApplicationContext());
925
                int maxCarCount = ProfileManager.getInstance().getMaxCarModelCount(getApplicationContext());
921
926
922
                if (MainApplication.count >= maxCount ) {
927
                if (MainApplication.count >= maxCount ) {
923
                    if (MainApplication.isIgnore == true) {
928
                    if (MainApplication.isIgnore == true) {
937
                                }).show();
942
                                }).show();
938
                        MobclickAgent.onEvent(context, "0041");
943
                        MobclickAgent.onEvent(context, "0041");
939
                    }
944
                    }
945
                }else if (MainApplication.carCount >= maxCarCount){
946
                    new NotRegisterDialog(MainMapActivity.this)
947
                            .builder()
948
                            .setGoIntentImg(R.drawable.ic_go_fill_in)
949
                            .setlogoDialogImg(R.drawable.bg_car_intent_model)
950
                            .setContent("您还没有填写爱车信息哦\n" +
951
                                    "选择您的意向车型或认证车主\n" +
952
                                    "还有充电奖励抵扣电费")
953
                            .setGoRegister(v->{
954
                                Intent intent = new Intent(getApplicationContext(), CarOwnerCertificateActivity.class);
955
                                startActivity(intent);
956
                            })
957
                            .setCancle(v->{
958
                                ProfileManager.getInstance().setMaxCarModelCount(getApplicationContext(),15);
959
960
                            }).show();
961
940
                }
962
                }
941
            }
963
            }
942
        }, 2000);
964
        }, 2000);

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

133
    private TextView go_title;
133
    private TextView go_title;
134
    private TextView go_desc;
134
    private TextView go_desc;
135
    private ImageView go_cursor;
135
    private ImageView go_cursor;
136
    private RelativeLayout carIntentModel;
137
    private TextView carModel;
136
138
137
    @Override
139
    @Override
138
    protected void onCreate(Bundle savedInstanceState) {
140
    protected void onCreate(Bundle savedInstanceState) {
152
        tv_point = (TextView) findViewById(R.id.tv_point);
154
        tv_point = (TextView) findViewById(R.id.tv_point);
153
155
154
        et_car = (TextView) findViewById(R.id.et_che);
156
        et_car = (TextView) findViewById(R.id.et_che);
157
        carModel = (TextView) findViewById(R.id.carModel);
155
158
156
159
157
        photo = BitmapFactory.decodeResource(getResources(), R.drawable.icon_user1118);
160
        photo = BitmapFactory.decodeResource(getResources(), R.drawable.icon_user1118);
167
        back.setOnClickListener(this);
170
        back.setOnClickListener(this);
168
        rl_icon = (RelativeLayout) findViewById(R.id.rl_icon);
171
        rl_icon = (RelativeLayout) findViewById(R.id.rl_icon);
169
        rl_icon.setOnClickListener(this);
172
        rl_icon.setOnClickListener(this);
173
174
        carIntentModel = (RelativeLayout) findViewById(R.id.carIntentModel);
175
        carIntentModel.setOnClickListener(this);
176
170
        btn_sex = (ToggleButton) findViewById(R.id.sex_button);
177
        btn_sex = (ToggleButton) findViewById(R.id.sex_button);
171
        btn_sex.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
178
        btn_sex.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
172
            @Override
179
            @Override
475
                    startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
482
                    startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
476
                }
483
                }
477
                break;
484
                break;
478
485
            case  R.id.carIntentModel:
486
                 CarBrandActivity.actionStart(this,"2");
487
                break;
479
        }
488
        }
480
489
481
490
618
    }
627
    }
619
628
620
    @Override
629
    @Override
630
    protected void onResume() {
631
        super.onResume();
632
        String carIntentModel = ProfileManager.getInstance().getCarIntentModel(this);
633
634
        if (!TextUtils.isEmpty(carIntentModel)){
635
            carModel.setText(carIntentModel);
636
        }
637
    }
638
639
    @Override
621
    public void onActivityResult(final int requestCode, int resultCode,
640
    public void onActivityResult(final int requestCode, int resultCode,
622
                                 final Intent data) {
641
                                 final Intent data) {
623
        super.onActivityResult(requestCode, resultCode, data);
642
        super.onActivityResult(requestCode, resultCode, data);

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

24
24
25
import androidx.annotation.NonNull;
25
import androidx.annotation.NonNull;
26
26
27
import android.text.TextUtils;
27
import android.util.Log;
28
import android.util.Log;
28
import android.view.KeyEvent;
29
import android.view.KeyEvent;
29
import android.view.View;
30
import android.view.View;
47
import com.blankj.utilcode.util.BarUtils;
48
import com.blankj.utilcode.util.BarUtils;
48
import com.electric.chargingpile.R;
49
import com.electric.chargingpile.R;
49
import com.electric.chargingpile.application.MainApplication;
50
import com.electric.chargingpile.application.MainApplication;
50
import com.electric.chargingpile.data.Adin;
51
import com.electric.chargingpile.data.CarOwnerCertificateBean;
51
import com.electric.chargingpile.data.CarOwnerCertificateBean;
52
import com.electric.chargingpile.entity.CarSeriesEntity;
52
import com.electric.chargingpile.entity.CarSeriesEntity;
53
import com.electric.chargingpile.manager.ProfileManager;
53
import com.electric.chargingpile.manager.ProfileManager;
60
import com.electric.chargingpile.util.ScreenUtils;
60
import com.electric.chargingpile.util.ScreenUtils;
61
import com.electric.chargingpile.util.Util;
61
import com.electric.chargingpile.util.Util;
62
import com.electric.chargingpile.view.AlertDialogTwo;
62
import com.electric.chargingpile.view.AlertDialogTwo;
63
import com.electric.chargingpile.view.NotRegisterDialog;
63
import com.electric.chargingpile.view.ObservableScrollView;
64
import com.electric.chargingpile.view.ObservableScrollView;
64
import com.electric.chargingpile.view.RoundImageView;
65
import com.electric.chargingpile.view.RoundImageView;
65
import com.electric.chargingpile.view.ScrollViewListener;
66
import com.electric.chargingpile.view.ScrollViewListener;
89
import java.net.URLEncoder;
90
import java.net.URLEncoder;
90
import java.util.List;
91
import java.util.List;
91
92
92
import cn.jpush.android.api.JPushInterface;
93
import okhttp3.Call;
93
import okhttp3.Call;
94
import pub.devrel.easypermissions.AfterPermissionGranted;
94
import pub.devrel.easypermissions.AfterPermissionGranted;
95
import pub.devrel.easypermissions.AppSettingsDialog;
95
import pub.devrel.easypermissions.AppSettingsDialog;
223
        if (MainApplication.isLogin()) {
223
        if (MainApplication.isLogin()) {
224
            getPingLun();
224
            getPingLun();
225
        }
225
        }
226
        showCarDialog();
226
227
227
        // ATTENTION: This was auto-generated to implement the App Indexing API.
228
        // ATTENTION: This was auto-generated to implement the App Indexing API.
228
        // See https://g.co/AppIndexing/AndroidStudio for more information.
229
        // See https://g.co/AppIndexing/AndroidStudio for more information.
229
        client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
230
        client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
230
    }
231
    }
231
232
233
    private void showCarDialog() {
234
        userIcon.postDelayed(() -> {
235
            if (isDestroyed() ||isFinishing()) {
236
                return;
237
            }
238
            int count=0;
239
            int max = ProfileManager.getInstance().getUserCenterMaxCount(UserCenterActivity.this);
240
241
            if (MainApplication.isLogin()) {
242
                if (MainApplication.userCar.equals("")){
243
                    count=ProfileManager.getInstance().getUserCenterCount(getApplicationContext()) + 1;
244
                    int temp =count >= max  ? 0 :count;
245
                    ProfileManager.getInstance().setUserCenterCount(getApplicationContext(), temp);
246
                }else{
247
                    ProfileManager.getInstance().setUserCenterCount(getApplicationContext(), 0);
248
                    ProfileManager.getInstance().setUserCenterMaxCount(getApplicationContext(), 3);
249
                }
250
            }
251
252
            if (count >= max){
253
                new NotRegisterDialog(UserCenterActivity.this)
254
                        .builder()
255
                        .setGoIntentImg(R.drawable.go_receive)
256
                        .setlogoDialogImg(R.drawable.ic_red_envelope)
257
                        .setContentImg(R.drawable.ic_50_coupon)
258
                        .setGoRegister(v->{
259
                            Intent intent = new Intent(getApplicationContext(), CarOwnerCertificateActivity.class);
260
                            startActivity(intent);
261
                        })
262
                        .setCancle(v->{
263
                            ProfileManager.getInstance().setUserCenterMaxCount(getApplicationContext(),10);
264
265
                        }).show();
266
            }
267
        },500);
268
269
    }
270
232
    Handler hand = new Handler() {
271
    Handler hand = new Handler() {
233
        public void handleMessage(Message msg) {
272
        public void handleMessage(Message msg) {
234
            switch (msg.what) {
273
            switch (msg.what) {

+ 4 - 0
app/src/main/java/com/electric/chargingpile/activity/UserCenterMoreActivity.java

424
        //保存用户密码
424
        //保存用户密码
425
        MainApplication.userPassword = "";
425
        MainApplication.userPassword = "";
426
426
427
        //保存用户意向车型
428
        MainApplication.userCarIntentMode = "";
429
        ProfileManager.getInstance().setCarIntentModel(getApplicationContext(), "");
430
427
        ProfileManager.getInstance().setKeyUserpassword(getApplicationContext(), "");
431
        ProfileManager.getInstance().setKeyUserpassword(getApplicationContext(), "");
428
        if (isPermissionOK()) {
432
        if (isPermissionOK()) {
429
            if (ImageTools.findPhotoFromSDCard(MainApplication.storePath, "user_icon")) {
433
            if (ImageTools.findPhotoFromSDCard(MainApplication.storePath, "user_icon")) {

+ 16 - 0
app/src/main/java/com/electric/chargingpile/activity/UserInfoActivity.java

54
import com.electric.chargingpile.data.Cars;
54
import com.electric.chargingpile.data.Cars;
55
import com.electric.chargingpile.data.Province;
55
import com.electric.chargingpile.data.Province;
56
import com.electric.chargingpile.entity.CarSeriesEntity;
56
import com.electric.chargingpile.entity.CarSeriesEntity;
57
import com.electric.chargingpile.manager.PreferenceManager;
57
import com.electric.chargingpile.manager.ProfileManager;
58
import com.electric.chargingpile.manager.ProfileManager;
58
import com.electric.chargingpile.util.BarColorUtil;
59
import com.electric.chargingpile.util.BarColorUtil;
59
import com.electric.chargingpile.util.DES3;
60
import com.electric.chargingpile.util.DES3;
148
    private TextView go_title;
149
    private TextView go_title;
149
    private TextView go_desc;
150
    private TextView go_desc;
150
    private ImageView go_cursor;
151
    private ImageView go_cursor;
152
    private LinearLayout carIntentModel;
153
    private TextView carModel;
151
154
152
    @Override
155
    @Override
153
    protected void onCreate(Bundle savedInstanceState) {
156
    protected void onCreate(Bundle savedInstanceState) {
200
203
201
204
202
        onclick = (TextView) findViewById(R.id.onclick);
205
        onclick = (TextView) findViewById(R.id.onclick);
206
        carModel = (TextView) findViewById(R.id.carModel);
203
        onclick.setOnClickListener(this);
207
        onclick.setOnClickListener(this);
204
208
205
        back = (ImageView) findViewById(R.id.iv_back);
209
        back = (ImageView) findViewById(R.id.iv_back);
242
246
243
        go_certificate = findViewById(R.id.go_certificate);
247
        go_certificate = findViewById(R.id.go_certificate);
244
        go_certificate.setOnClickListener(this);
248
        go_certificate.setOnClickListener(this);
249
250
        carIntentModel = findViewById(R.id.carIntentModel);
251
        carIntentModel.setOnClickListener(this);
252
245
        go_title = findViewById(R.id.go_title);
253
        go_title = findViewById(R.id.go_title);
246
        go_desc = findViewById(R.id.go_desc);
254
        go_desc = findViewById(R.id.go_desc);
247
        go_cursor = findViewById(R.id.go_cursor);
255
        go_cursor = findViewById(R.id.go_cursor);
407
                    startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
415
                    startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
408
                }
416
                }
409
                break;
417
                break;
418
            case R.id.carIntentModel:
419
                CarBrandActivity.actionStart(this,"1");
420
                break;
410
        }
421
        }
411
    }
422
    }
412
423
1042
        super.onResume();
1053
        super.onResume();
1043
        MobclickAgent.onResume(this);
1054
        MobclickAgent.onResume(this);
1044
        getCarOwnerCertificateList(false);
1055
        getCarOwnerCertificateList(false);
1056
        String carIntentModel = ProfileManager.getInstance().getCarIntentModel(this);
1057
1058
        if (!TextUtils.isEmpty(carIntentModel)){
1059
            carModel.setText(carIntentModel);
1060
        }
1045
    }
1061
    }
1046
1062
1047
    @Override
1063
    @Override

+ 14 - 7
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

56
    public static String userId = "";
56
    public static String userId = "";
57
    public static String userCar = "";
57
    public static String userCar = "";
58
    public static String userIcon = "";
58
    public static String userIcon = "";
59
    public static String userCarIntentMode="";
59
    public static LatLng center = null; // 用户位置
60
    public static LatLng center = null; // 用户位置
60
    public static String userNickname = "";
61
    public static String userNickname = "";
61
    public static String mapStatus = "";
62
    public static String mapStatus = "";
110
    public static String search_address = "";
111
    public static String search_address = "";
111
    public static boolean isMap = true;
112
    public static boolean isMap = true;
112
    public static int count;
113
    public static int count;
114
    public static int carCount;
113
    public static int round;
115
    public static int round;
114
    public static int msgOne;
116
    public static int msgOne;
115
    public static String msgTime;
117
    public static String msgTime;
178
        msgOne = ProfileManager.getInstance().getMsgOne(getApplicationContext());
180
        msgOne = ProfileManager.getInstance().getMsgOne(getApplicationContext());
179
        msgTime = ProfileManager.getInstance().getSystemMsgTime(getApplicationContext());
181
        msgTime = ProfileManager.getInstance().getSystemMsgTime(getApplicationContext());
180
        firstOpenTime = ProfileManager.getInstance().getFirstOpenTime(getApplicationContext());
182
        firstOpenTime = ProfileManager.getInstance().getFirstOpenTime(getApplicationContext());
181

183
        userCarIntentMode = ProfileManager.getInstance().getCarIntentModel(getApplicationContext());
182
        loginRemind();
184
        loginRemind();
183
        setFestival();
185
        setFestival();
184
    }
186
    }
236
            ProfileManager.getInstance().setCount(getApplicationContext(), i);
238
            ProfileManager.getInstance().setCount(getApplicationContext(), i);
237
        }else{
239
        }else{
238
            ProfileManager.getInstance().setCount(getApplicationContext(), 0);
240
            ProfileManager.getInstance().setCount(getApplicationContext(), 0);
239

240
/*
241
            if (userCar==null || userCar.equals("")){
242
                ProfileManager.getInstance().setCount(getApplicationContext(), 0);
243

241
            ProfileManager.getInstance().setMaxCount(getApplicationContext(), 4);
242

243
            if (userCar.equals("")){
244
                int max = ProfileManager.getInstance().getMaxCarModelCount(getApplicationContext());
245
                carCount=ProfileManager.getInstance().getCarModelCount(getApplicationContext()) + 1;
246
                Log.e("carCount ***-", carCount + "");
247
                int count =carCount >= max  ? 0 :carCount;
248
                ProfileManager.getInstance().setCarModelCount(getApplicationContext(), count);
249
            }else{
250
                ProfileManager.getInstance().setCarModelCount(getApplicationContext(), 0);
251
                ProfileManager.getInstance().setMaxCarModelCount(getApplicationContext(), 4);
244
            }
252
            }
245
*/
246

253

247
        }
254
        }
248
    }
255
    }

+ 46 - 4
app/src/main/java/com/electric/chargingpile/manager/ProfileManager.java

1
package com.electric.chargingpile.manager;
1
package com.electric.chargingpile.manager;
2

2

3
import android.content.Context;
3
import android.content.Context;
4
import android.util.Log;
5

6
import com.electric.chargingpile.application.MainApplication;
7
import com.electric.chargingpile.util.PhoneUtils;
8

4

9
public class ProfileManager {
5
public class ProfileManager {
10

6

74
    private static final String KEY_DEVICE_ID = "key_device_id";
70
    private static final String KEY_DEVICE_ID = "key_device_id";
75
    private static final String KEY_PUSH_ID = "key_push_id";
71
    private static final String KEY_PUSH_ID = "key_push_id";
76
    private static final String KEY_MAX_COUNT = "key_max_count";
72
    private static final String KEY_MAX_COUNT = "key_max_count";
73
    private static final String KEY_CAR_INTENT_MODEL = "key_car_intent_model";
74
    private static final String KEY_CAR_MODEL_COUNT = "key_car_model_count";
75
    private static final String KEY_MAX_CAR_MODEL_COUNT = "key_max_car_model_count";
76

77
    private static final String KEY_USER_CENTER_COUNT = "key_user_center_count";
78
    private static final String KEY_USER_CENTER_MAX_COUNT = "key_user_center_max_count";
77

79

78
    private static ProfileManager instance;
80
    private static ProfileManager instance;
79
    private String deviceId;
81
    private String deviceId;
690
        return PreferenceManager.getInstance(context).getInt(KEY_MAX_COUNT, 4);
692
        return PreferenceManager.getInstance(context).getInt(KEY_MAX_COUNT, 4);
691
    }
693
    }
692

694

695
    public void setCarIntentModel(Context context, String id) {
696
        PreferenceManager.getInstance(context).putString(KEY_CAR_INTENT_MODEL, id);
697
    }
698

699
    public String getCarIntentModel(Context context) {
700
        return PreferenceManager.getInstance(context).getString(KEY_CAR_INTENT_MODEL,"");
701
    }
702

703
    public void setCarModelCount(Context context, int id) {
704
        PreferenceManager.getInstance(context).putInt(KEY_CAR_MODEL_COUNT, id);
705
    }
706

707
    public int getCarModelCount(Context context) {
708
        return PreferenceManager.getInstance(context).getInt(KEY_CAR_MODEL_COUNT,0);
709
    }
710

711
    public void setMaxCarModelCount(Context context, int id) {
712
        PreferenceManager.getInstance(context).putInt(KEY_MAX_CAR_MODEL_COUNT, id);
713
    }
714

715
    public int getMaxCarModelCount(Context context) {
716
        return PreferenceManager.getInstance(context).getInt(KEY_MAX_CAR_MODEL_COUNT,4);
717
    }
718

719
    public void setUserCenterCount(Context context, int id) {
720
        PreferenceManager.getInstance(context).putInt(KEY_USER_CENTER_COUNT, id);
721
    }
722

723
    public int getUserCenterCount(Context context) {
724
        return PreferenceManager.getInstance(context).getInt(KEY_USER_CENTER_COUNT,0);
725
    }
726

727
    public void setUserCenterMaxCount(Context context, int id) {
728
        PreferenceManager.getInstance(context).putInt(KEY_USER_CENTER_MAX_COUNT, id);
729
    }
730

731
    public int getUserCenterMaxCount(Context context) {
732
        return PreferenceManager.getInstance(context).getInt(KEY_USER_CENTER_MAX_COUNT,3);
733
    }
734

693

735

694
}
736
}

+ 7 - 1
app/src/main/java/com/electric/chargingpile/view/NotRegisterDialog.java

25
25
26
    private ImageView goIntent,neglect,close,logoDialog;
26
    private ImageView goIntent,neglect,close,logoDialog;
27
    private TextView content;
27
    private TextView content;
28
    private ImageView contentImg;
28
29
29
30
30
    public NotRegisterDialog(Context context) {
31
    public NotRegisterDialog(Context context) {
45
        neglect = view.findViewById(R.id.neglect);
46
        neglect = view.findViewById(R.id.neglect);
46
        close   = view.findViewById(R.id.close);
47
        close   = view.findViewById(R.id.close);
47
        content = view.findViewById(R.id.content);
48
        content = view.findViewById(R.id.content);
48
         logoDialog   = view.findViewById(R.id.logoDialog);
49
        logoDialog = view.findViewById(R.id.logoDialog);
50
        contentImg = view.findViewById(R.id.contentImg);
49
51
50
52
51
        // 定义Dialog布局和参数
53
        // 定义Dialog布局和参数
74
        logoDialog.setImageResource(str);
76
        logoDialog.setImageResource(str);
75
        return this;
77
        return this;
76
    }
78
    }
79
    public NotRegisterDialog setContentImg(@DrawableRes int str){
80
        contentImg.setImageResource(str);
81
        return this;
82
    }
77
83
78
84
79
85

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


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


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


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


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


二进制
app/src/main/res/drawable-xxhdpi/ic_red_envelope.webp


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

1
<?xml version="1.0" encoding="utf-8"?>
2
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3
    <item >
4
        <shape android:shape="rectangle">
5
            <solid android:color="@color/color_f9f9fb" />
6
            <corners android:radius="4dp" />
7
        </shape>
8
    </item>
9
</selector>

+ 30 - 0
app/src/main/res/layout/activity_charging_status.xml

297
    <RelativeLayout
297
    <RelativeLayout
298
        android:layout_width="match_parent"
298
        android:layout_width="match_parent"
299
        android:layout_height="match_parent">
299
        android:layout_height="match_parent">
300
        <LinearLayout
301
            android:visibility="gone"
302
            android:id="@+id/layoutCarCertificate"
303
            android:background="@drawable/bg_f9f9fb_radius5"
304
            android:paddingBottom="3dp"
305
            android:paddingTop="3dp"
306
            android:paddingStart="13dp"
307
            android:paddingEnd="13dp"
308
            android:layout_marginTop="30dp"
309
            android:layout_centerHorizontal="true"
310
            android:layout_width="wrap_content"
311
            android:layout_height="wrap_content">
312
            <TextView
313
                android:drawablePadding="12dp"
314
                android:drawableLeft="@drawable/ic_certification"
315
                android:layout_marginEnd="35dp"
316
                android:gravity="center"
317
                android:layout_width="wrap_content"
318
                android:layout_height="match_parent"
319
                android:text="认证车主有优惠哦~"
320
                android:textColor="@color/color_0e0e0e"
321
                android:textSize="14sp"
322
                />
323
            <ImageView
324
                android:src="@drawable/right_cursor"
325
                android:layout_width="wrap_content"
326
                android:layout_height="match_parent"/>
300
327
328
        </LinearLayout>
301
        <ImageView
329
        <ImageView
330
            tools:visibility="visible"
302
            android:id="@+id/iv_activity"
331
            android:id="@+id/iv_activity"
303
            android:layout_width="wrap_content"
332
            android:layout_width="wrap_content"
304
            android:layout_height="wrap_content"
333
            android:layout_height="wrap_content"
309
            android:visibility="gone" />
338
            android:visibility="gone" />
310
339
311
        <TextView
340
        <TextView
341
            tools:visibility="visible"
312
            android:id="@+id/tv_activity"
342
            android:id="@+id/tv_activity"
313
            android:layout_width="wrap_content"
343
            android:layout_width="wrap_content"
314
            android:layout_height="wrap_content"
344
            android:layout_height="wrap_content"

+ 65 - 8
app/src/main/res/layout/activity_skip_user_info.xml

127
127
128
128
129
            <View
129
            <View
130
                android:visibility="gone"
130
                android:layout_width="match_parent"
131
                android:layout_width="match_parent"
131
                android:layout_height="0.5dp"
132
                android:layout_height="0.5dp"
132
                android:layout_marginLeft="16dp"
133
                android:layout_marginLeft="16dp"
135
            <RelativeLayout
136
            <RelativeLayout
136
                android:layout_width="fill_parent"
137
                android:layout_width="fill_parent"
137
                android:layout_height="45dp"
138
                android:layout_height="45dp"
138
                android:background="@color/white">
139
              >
139
140
140
                <TextView
141
                <TextView
141
                    android:layout_width="wrap_content"
142
                    android:layout_width="wrap_content"
143
                    android:gravity="center"
144
                    android:gravity="center"
144
                    android:paddingLeft="16dp"
145
                    android:paddingLeft="16dp"
145
                    android:text="昵称"
146
                    android:text="昵称"
146
                    android:textColor="@color/title_row"
147
                    android:textSize="15sp" />
147
                    android:textColor="@color/color_f9f9f9"
148
                    android:textSize="14dp" />
148
149
149
                <EditText
150
                <EditText
150
                    android:id="@+id/et_nickName"
151
                    android:id="@+id/et_nickName"
158
                    android:gravity="center|right"
159
                    android:gravity="center|right"
159
                    android:hint="请输入昵称"
160
                    android:hint="请输入昵称"
160
                    android:singleLine="true"
161
                    android:singleLine="true"
161
                    android:textColor="@color/ui_62"
162
                    android:textColor="@color/color_0e0e0e"
162
                    android:textColorHint="@color/hintColor"
163
                    android:textColorHint="@color/hintColor"
163
                    android:textSize="15sp" />
164
                    android:textSize="15sp" />
164
165
169
                android:layout_height="0.5dp"
170
                android:layout_height="0.5dp"
170
                android:layout_marginLeft="16dp"
171
                android:layout_marginLeft="16dp"
171
                android:background="@color/ui_line"
172
                android:background="@color/ui_line"
172
                android:visibility="visible" />
173
                android:visibility="gone" />
173
174
174
            <RelativeLayout
175
            <RelativeLayout
175
                android:id="@+id/go_certificate"
176
                android:id="@+id/go_certificate"
176
                android:layout_width="fill_parent"
177
                android:layout_width="fill_parent"
177
                android:layout_height="45dp"
178
                android:layout_height="45dp"
178
                android:background="@color/white"
179
                android:visibility="visible">
179
                android:visibility="visible">
180
180
181
                <TextView
181
                <TextView
185
                    android:gravity="center"
185
                    android:gravity="center"
186
                    android:paddingLeft="15dp"
186
                    android:paddingLeft="15dp"
187
                    android:text="去认证车主(获得充电优惠)"
187
                    android:text="去认证车主(获得充电优惠)"
188
                    android:textColor="@color/title_row"
189
                    android:textSize="15sp" />
188
                    android:textColor="@color/color_f9f9f9"
189
                    android:textSize="14dp" />
190
190
191
                <TextView
191
                <TextView
192
                    android:id="@+id/go_desc"
192
                    android:id="@+id/go_desc"
216
                    android:src="@drawable/icon_more2_0" />
216
                    android:src="@drawable/icon_more2_0" />
217
217
218
            </RelativeLayout>
218
            </RelativeLayout>
219
            <RelativeLayout
220
                android:id="@+id/carIntentModel"
221
                android:layout_width="fill_parent"
222
                android:layout_height="45dp"
223
                android:visibility="visible">
224
225
                <TextView
226
                    android:gravity="center"
227
                    android:paddingLeft="15dp"
228
                    android:layout_width="wrap_content"
229
                    android:layout_height="match_parent"
230
                    android:text="意向车型"
231
                    android:textColor="@color/color_f9f9f9"
232
                    android:textSize="14sp"
233
                    />
234
235
                <TextView
236
                    android:layout_width="wrap_content"
237
                    android:layout_height="45dp"
238
                    android:layout_alignParentTop="true"
239
                    android:layout_alignParentEnd="true"
240
                    android:layout_alignParentRight="true"
241
                    android:layout_marginRight="15dp"
242
                    android:background="@color/white"
243
                    android:gravity="center|right"
244
                    android:singleLine="true"
245
                    android:textColor="@color/ui_62"
246
                    android:textColorHint="@color/ui_68"
247
                    android:textSize="15sp"
248
                    tools:text="审核中" />
249
                <TextView
250
                    android:id="@+id/carModel"
251
                    android:layout_marginEnd="15dp"
252
                    android:layout_width="wrap_content"
253
                    android:layout_height="match_parent"
254
                    android:text="首次选择意向车型(得充电余额)"
255
                    android:textColor="#ff0e0e0e"
256
                    android:textSize="14sp"
257
                    android:layout_alignParentRight="true"
258
                    android:layout_marginRight="15dp"
259
                    android:background="@color/white"
260
                    android:gravity="center|right"
261
                    android:singleLine="true"
262
                    android:textColorHint="@color/ui_68"
263
                    tools:text="审核中" />
264
265
                <ImageView
266
                    android:layout_width="wrap_content"
267
                    android:layout_height="match_parent"
268
                    android:layout_alignParentEnd="true"
269
                    android:layout_alignParentRight="true"
270
                    android:layout_centerVertical="true"
271
                    android:layout_marginRight="15dp"
272
                    android:src="@drawable/icon_more2_0" />
273
274
            </RelativeLayout>
219
275
220
            <RelativeLayout
276
            <RelativeLayout
221
                android:id="@+id/rl_select_car"
277
                android:id="@+id/rl_select_car"
298
            </com.zhy.autolayout.AutoRelativeLayout>
354
            </com.zhy.autolayout.AutoRelativeLayout>
299
355
300
            <View
356
            <View
357
                android:visibility="gone"
301
                android:layout_width="match_parent"
358
                android:layout_width="match_parent"
302
                android:layout_height="0.5dp"
359
                android:layout_height="0.5dp"
303
                android:background="@color/ui_line" />
360
                android:background="@color/ui_line" />

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

228
            </LinearLayout>
228
            </LinearLayout>
229
229
230
            <LinearLayout
230
            <LinearLayout
231
                android:id="@+id/carIntentModel"
231
                android:layout_width="match_parent"
232
                android:layout_width="match_parent"
232
                android:layout_height="45dp">
233
                android:layout_height="45dp">
233
                <TextView
234
                <TextView
244
                    android:layout_width="0dp"
245
                    android:layout_width="0dp"
245
                    android:layout_height="match_parent"/>
246
                    android:layout_height="match_parent"/>
246
                <TextView
247
                <TextView
248
                    android:id="@+id/carModel"
247
                    android:gravity="center"
249
                    android:gravity="center"
248
                    android:layout_width="wrap_content"
250
                    android:layout_width="wrap_content"
249
                    android:layout_height="match_parent"
251
                    android:layout_height="match_parent"

+ 13 - 3
app/src/main/res/layout/dialog_not_login.xml

24
            android:layout_height="wrap_content"/>
24
            android:layout_height="wrap_content"/>
25
        <ImageView
25
        <ImageView
26
            android:id="@+id/logoDialog"
26
            android:id="@+id/logoDialog"
27
            android:layout_marginTop="15dp"
28
            app:layout_constraintTop_toTopOf="parent"
27
            app:layout_constraintTop_toTopOf="parent"
29
            app:layout_constraintEnd_toEndOf="parent"
28
            app:layout_constraintEnd_toEndOf="parent"
30
            app:layout_constraintStart_toStartOf="parent"
29
            app:layout_constraintStart_toStartOf="parent"
30
            app:layout_constraintBottom_toTopOf="@+id/contentImg"
31
            tools:src="@drawable/bg_not_login_dialog"
32
            android:layout_width="wrap_content"
33
            android:layout_height="wrap_content"/>
34
        <ImageView
35
36
            android:id="@+id/contentImg"
37
            app:layout_constraintBottom_toTopOf="@+id/content"
38
            app:layout_constraintEnd_toEndOf="parent"
39
            app:layout_constraintStart_toStartOf="parent"
40
            app:layout_constraintTop_toBottomOf="@id/logoDialog"
31
            tools:src="@drawable/bg_not_login_dialog"
41
            tools:src="@drawable/bg_not_login_dialog"
32
            android:layout_width="wrap_content"
42
            android:layout_width="wrap_content"
33
            android:layout_height="wrap_content"/>
43
            android:layout_height="wrap_content"/>
37
            android:layout_marginEnd="16dp"
47
            android:layout_marginEnd="16dp"
38
            android:layout_marginStart="16dp"
48
            android:layout_marginStart="16dp"
39
            android:lineSpacingExtra="2dp"
49
            android:lineSpacingExtra="2dp"
40
            android:layout_marginTop="15dp"
41
            android:id="@+id/content"
50
            android:id="@+id/content"
42
            android:layout_width="match_parent"
51
            android:layout_width="match_parent"
43
            android:layout_height="wrap_content"
52
            android:layout_height="wrap_content"
44
            tools:text="我知道你关注我很久了快来注册登录吧\n登录后可以在部分充电桩扫码充电认证车主还有充电优惠"
53
            tools:text="我知道你关注我很久了快来注册登录吧\n登录后可以在部分充电桩扫码充电认证车主还有充电优惠"
45
            android:textColor="#ff0e0e0e"
54
            android:textColor="#ff0e0e0e"
46
            android:textSize="14sp"
55
            android:textSize="14sp"
56
            app:layout_constraintBottom_toTopOf="@+id/neglect"
47
            app:layout_constraintEnd_toEndOf="parent"
57
            app:layout_constraintEnd_toEndOf="parent"
48
            app:layout_constraintStart_toStartOf="parent"
58
            app:layout_constraintStart_toStartOf="parent"
49
            app:layout_constraintTop_toBottomOf="@id/logoDialog" />
59
            app:layout_constraintTop_toBottomOf="@id/contentImg" />
50
60
51
        <ImageView
61
        <ImageView
52
            app:layout_constraintBottom_toBottomOf="parent"
62
            app:layout_constraintBottom_toBottomOf="parent"

+ 1 - 0
app/src/main/res/values/color.xml

191
    <color name="color_0e0e0e">#0E0E0E</color>
191
    <color name="color_0e0e0e">#0E0E0E</color>
192
    <color name="color_c4c7d2">#C4C7D2</color>
192
    <color name="color_c4c7d2">#C4C7D2</color>
193
    <color name="color_f9f9f9">#ff9b9b9b</color>
193
    <color name="color_f9f9f9">#ff9b9b9b</color>
194
    <color name="color_f9f9fb">#F9F9FB</color>
194
    <color name="color_ffe32727">#ffe32727</color>
195
    <color name="color_ffe32727">#ffe32727</color>
195
    <color name="color_f6f6f6">#F6F6F6</color>
196
    <color name="color_f6f6f6">#F6F6F6</color>
196
    <color name="sv_black">#FF000000</color>
197
    <color name="sv_black">#FF000000</color>