|
@ -335,9 +335,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
335
|
335
|
public static RelativeLayout paoRl;
|
336
|
336
|
public static LinearLayout rl_control;
|
337
|
337
|
private RelativeLayout rela, ll_comment, rl_ad, rl_grade, rl_search, ll_paoxiang, rl_charging_notice;
|
338
|
|
private ConstraintLayout rl_privacy_protocol;
|
339
|
|
private ImageView private_protocol_sure_and_go;
|
340
|
|
private Button private_protocol_web;
|
341
|
338
|
private RelativeLayout tv_notice, tv_citynotice, rl_mapList, ll_tab_find;
|
342
|
339
|
private LinearLayout ll_paogo, ll_title, ll_open, tab_me, tab_screen;
|
343
|
340
|
public static LinearLayout ll_tuijian, ll_top_right;
|
|
@ -429,7 +426,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
429
|
426
|
break;
|
430
|
427
|
//获取版本号及首页广告
|
431
|
428
|
case 2:
|
432
|
|
boolean showedPrivateProtocol = sharedPreferencesUtil.hasKey("cdz_private_protocol");
|
433
|
429
|
try {
|
434
|
430
|
String data = JsonUtils.getKeyResult(msg.obj.toString(), "data");
|
435
|
431
|
if (!data.equals("")) {
|
|
@ -444,30 +440,18 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
444
|
440
|
}
|
445
|
441
|
|
446
|
442
|
String adin = JsonUtils.getKeyResult(data, "adin");
|
447
|
|
if (null == adin) {
|
448
|
|
if (!showedPrivateProtocol) {
|
449
|
|
rl_privacy_protocol.setVisibility(View.VISIBLE);
|
450
|
|
}
|
451
|
|
} else {
|
|
443
|
if (null != adin) {
|
452
|
444
|
List<Adin> listAdin = JsonUtils.parseToObjectList(adin, Adin.class);
|
453
|
445
|
System.out.print("size:" + listAdin.size());
|
454
|
446
|
if (listAdin.size() > 0) {
|
455
|
447
|
sav.initData(listAdin);
|
456
|
|
if (!showedPrivateProtocol) {
|
457
|
|
rl_privacy_protocol.setVisibility(View.VISIBLE);
|
458
|
|
} else {
|
459
|
|
rl_ad.setVisibility(View.VISIBLE);
|
460
|
|
for (Adin item : listAdin) {
|
461
|
|
if (item.getAdvertiser().equals("1")) {
|
462
|
|
loadDmpData();
|
463
|
|
break;
|
464
|
|
}
|
|
448
|
rl_ad.setVisibility(View.VISIBLE);
|
|
449
|
for (Adin item : listAdin) {
|
|
450
|
if (item.getAdvertiser().equals("1")) {
|
|
451
|
loadDmpData();
|
|
452
|
break;
|
465
|
453
|
}
|
466
|
454
|
}
|
467
|
|
} else {
|
468
|
|
if (!showedPrivateProtocol) {
|
469
|
|
rl_privacy_protocol.setVisibility(View.VISIBLE);
|
470
|
|
}
|
471
|
455
|
}
|
472
|
456
|
}
|
473
|
457
|
|
|
@ -491,16 +475,9 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
491
|
475
|
}
|
492
|
476
|
}
|
493
|
477
|
|
494
|
|
} else {
|
495
|
|
if (!showedPrivateProtocol) {
|
496
|
|
rl_privacy_protocol.setVisibility(View.VISIBLE);
|
497
|
|
}
|
498
|
478
|
}
|
499
|
479
|
} catch (Exception e) {
|
500
|
480
|
e.printStackTrace();
|
501
|
|
if (!showedPrivateProtocol) {
|
502
|
|
rl_privacy_protocol.setVisibility(View.VISIBLE);
|
503
|
|
}
|
504
|
481
|
}
|
505
|
482
|
|
506
|
483
|
|
|
@ -1408,15 +1385,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
1408
|
1385
|
//首页广告关闭按钮
|
1409
|
1386
|
iv_clear = (ImageView) findViewById(R.id.iv_clear);
|
1410
|
1387
|
iv_clear.setOnClickListener(this);
|
1411
|
|
// 首页隐私协议
|
1412
|
|
rl_privacy_protocol = findViewById(R.id.rl_privacy_protocol);
|
1413
|
|
rl_privacy_protocol.setOnClickListener(this);
|
1414
|
|
|
1415
|
|
private_protocol_sure_and_go = findViewById(R.id.private_protocol_sure_and_go);
|
1416
|
|
private_protocol_sure_and_go.setOnClickListener(this);
|
1417
|
|
|
1418
|
|
private_protocol_web = findViewById(R.id.private_protocol_web);
|
1419
|
|
private_protocol_web.setOnClickListener(this);
|
1420
|
1388
|
|
1421
|
1389
|
tv_citynotice = (RelativeLayout) findViewById(R.id.tv_citynotice);
|
1422
|
1390
|
tv_citynotice.setOnClickListener(new View.OnClickListener() {
|
|
@ -2876,15 +2844,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
2876
|
2844
|
case R.id.iv_clear:
|
2877
|
2845
|
rl_ad.setVisibility(View.GONE);
|
2878
|
2846
|
break;
|
2879
|
|
case R.id.private_protocol_sure_and_go:
|
2880
|
|
sharedPreferencesUtil.putBoolean("cdz_private_protocol", true);
|
2881
|
|
rl_privacy_protocol.setVisibility(View.GONE);
|
2882
|
|
break;
|
2883
|
|
case R.id.private_protocol_web:
|
2884
|
|
intent = new Intent(getApplication(), IntegralDescriptionActivity.class);
|
2885
|
|
intent.putExtra("url", "http://evcharge.cc/pc/agreement.html");
|
2886
|
|
startActivity(intent);
|
2887
|
|
break;
|
2888
|
2847
|
case R.id.rl_search:
|
2889
|
2848
|
if (isListShow == false) {
|
2890
|
2849
|
windowLayout.setVisibility(View.GONE);
|