浏览代码

气泡开发完成

huyuguo 5 年之前
父节点
当前提交
b2ce8ed984

+ 422 - 279
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

@ -17,6 +17,7 @@ import android.graphics.Bitmap;
17 17
import android.graphics.BitmapFactory;
18 18
import android.graphics.drawable.BitmapDrawable;
19 19
import android.graphics.drawable.Drawable;
20
import android.media.Image;
20 21
import android.net.ConnectivityManager;
21 22
import android.net.NetworkInfo;
22 23
import android.net.Uri;
@ -26,6 +27,7 @@ import android.os.Environment;
26 27
import android.os.Handler;
27 28
import android.os.Message;
28 29
import android.support.annotation.NonNull;
30
import android.support.constraint.ConstraintLayout;
29 31
import android.support.v4.app.ActivityCompat;
30 32
import android.support.v4.content.FileProvider;
31 33
import android.telephony.TelephonyManager;
@ -348,7 +350,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
348 350
    private RelativeLayout windowGo, windowZhanDetails, windowComments;
349 351
    private ImageView windowAd, windowGradeImg;
350 352
    public static RelativeLayout windowLayout;
351
    private View windowView;
352 353
    public static int question_unread = 0;
353 354
    public static int comment_unread = 0;
354 355
    public static int system_unread = 0;
@ -738,6 +739,16 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
738 739
        }
739 740
    };
740 741
    private View infoWindow;
742
    private String zhanInfo;
743
    private TextView windowChargeRecordCnt;
744
    private View windowChargeRecordCntLine;
745
    private TextView windowZongjia;
746
    private LinearLayout windowZongjiaLayout;
747
    private ImageView windowRedPaperBag;
748
    private TextView windowLabelPublic;
749
    private TextView windowLabelGround;
750
    private TextView windowLabelFreePark;
751
    private ConstraintLayout windowChat;
741 752
742 753
743 754
    @Override
@ -1226,7 +1237,16 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1226 1237
        windowSlowAble = (TextView) findViewById(R.id.window_tv_slowable);
1227 1238
        windowSlowAbleNum = (TextView) findViewById(R.id.window_tv_slowable_num);
1228 1239
        windowCommentNum = (TextView) findViewById(R.id.window_tv_comment_num);
1229
        windowDistance = (TextView) findViewById(R.id.window_tv_zhan_distance);
1240
//        windowDistance = (TextView) findViewById(R.id.window_tv_zhan_distance);
1241
        windowChargeRecordCnt = findViewById(R.id.window_tv_charge_record_cnt);
1242
        windowChargeRecordCntLine = findViewById(R.id.window_tv_charge_record_cnt_line);
1243
        windowZongjia = findViewById(R.id.window_tv_zongjia);
1244
        windowZongjiaLayout = findViewById(R.id.window_tv_zongjia_layout);
1245
        windowRedPaperBag = findViewById(R.id.iv_red_paper_bag);
1246
        windowLabelPublic = findViewById(R.id.iv_label_public);
1247
        windowLabelGround = findViewById(R.id.iv_label_ground);
1248
        windowLabelFreePark = findViewById(R.id.iv_label_free_park);
1249
        windowChat = findViewById(R.id.iv_chat);
1230 1250
1231 1251
        windowGo = (RelativeLayout) findViewById(R.id.window_rl_go);
1232 1252
        windowZhanDetails = (RelativeLayout) findViewById(R.id.window_rl_zhan_details);
@ -1248,7 +1268,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1248 1268
        windowLayout = (RelativeLayout) findViewById(R.id.window_ll_zhan);
1249 1269
        ll_top_right = (LinearLayout) findViewById(R.id.ll_top_right);
1250 1270
1251
        windowView = findViewById(R.id.window_view);
1252 1271
        iv_tuijian = (ImageView) findViewById(R.id.iv_tuijian);
1253 1272
        iv_route = (ImageView) findViewById(R.id.iv_route);
1254 1273
        iv_tuijian.setOnClickListener(this);
@ -1311,6 +1330,39 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1311 1330
            }
1312 1331
        });
1313 1332
1333
        // add by hyg 气泡红包图标点击操作
1334
        windowRedPaperBag.setOnClickListener(new View.OnClickListener() {
1335
            @Override
1336
            public void onClick(View view) {
1337
                Intent intent_example = new Intent(getApplicationContext(), ExampleActivity.class);
1338
                intent_example.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1339
                startActivity(intent_example);
1340
                overridePendingTransition(0, 0);
1341
            }
1342
        });
1343
1344
        // add by hyg 点击跳转到聊聊
1345
        windowChat.setOnClickListener(new View.OnClickListener() {
1346
            @Override
1347
            public void onClick(View view) {
1348
                if (socket != null) {
1349
                    try {
1350
                        socket.close();
1351
                    } catch (IOException e) {
1352
                        e.printStackTrace();
1353
                    }
1354
                }
1355
                Intent i = new Intent(getApplication(), ChatActivity.class);//聊聊页面
1356
                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1357
                startActivity(i);
1358
                overridePendingTransition(0, 0);
1359
                if (count == 1) {
1360
                    MobclickAgent.onEvent(getApplicationContext(), "0103");
1361
                    count = 2;
1362
                }
1363
            }
1364
        });
1365
1314 1366
1315 1367
        tv_sortDistance = (TextView) findViewById(R.id.tv_sortDistance);
1316 1368
        tv_sortDistance.setOnClickListener(this);
@ -1407,7 +1459,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1407 1459
        paoAddress = (TextView) findViewById(R.id.tv_address);
1408 1460
        paoCostWay = (TextView) findViewById(R.id.window_tv_zhan_cost);
1409 1461
        paoDaohang = (TextView) findViewById(R.id.detail_daohang);
1410
        paoDistance = (TextView) findViewById(R.id.window_tv_zhan_distance);
1462
//        paoDistance = (TextView) findViewById(R.id.window_tv_zhan_distance);
1411 1463
        paoFast = (TextView) findViewById(R.id.tv_fastNum);
1412 1464
        paoSlow = (TextView) findViewById(R.id.tv_slowNum);
1413 1465
        paoAlter = (TextView) findViewById(R.id.tv_detail_alter);
@ -3410,7 +3462,8 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3410 3462
3411 3463
    /**
3412 3464
     * 监听自定义infowindow窗口的infowindow时间回调
3413
     * add by huyuguo
3465
     * add by hyg
3466
     *
3414 3467
     * @param marker
3415 3468
     * @return
3416 3469
     */
@ -3440,6 +3493,13 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3440 3493
            return;
3441 3494
        }
3442 3495
3496
        infoWindow.findViewById(R.id.infoWindowNavigate).setOnClickListener(new View.OnClickListener() {
3497
            @Override
3498
            public void onClick(View view) {
3499
                infoViewNavigate();
3500
            }
3501
        });
3502
3443 3503
        TextView distance = infoWindow.findViewById(R.id.distance);
3444 3504
        distance.setText(text);
3445 3505
@ -3447,11 +3507,13 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3447 3507
3448 3508
    /**
3449 3509
     * 点击自定义气泡,进行导航操作
3510
     * add by hyg
3511
     *
3450 3512
     * @param marker
3451 3513
     */
3452 3514
    @Override
3453 3515
    public void onInfoWindowClick(Marker marker) {
3454
        ToastUtil.showToast(getApplicationContext(), "sdsfsdf", Toast.LENGTH_SHORT);
3516
3455 3517
    }
3456 3518
3457 3519
    public class ZhanAdapter extends BaseAdapter {
@ -3753,6 +3815,19 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3753 3815
    @Override
3754 3816
    public boolean onKeyDown(int keyCode, KeyEvent event) {
3755 3817
        if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
3818
            // 判断气泡弹窗视图是否已经隐藏
3819
            if (windowLayout.getVisibility() == View.VISIBLE) {
3820
                Animation animation = AnimationUtils.loadAnimation(this, R.anim.out);
3821
                animation.setDuration(500);
3822
                windowLayout.startAnimation(animation);
3823
                new Handler().postDelayed(new Runnable() {
3824
                    @Override
3825
                    public void run() {
3826
                        windowLayout.setVisibility(View.GONE);
3827
                    }
3828
                }, 500);
3829
                return false;
3830
            }
3756 3831
3757 3832
            if ((System.currentTimeMillis() - exitTime) > 2000) {
3758 3833
                Toast.makeText(getApplicationContext(), "再按一次退出程序", Toast.LENGTH_SHORT).show();
@ -4971,6 +5046,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
4971 5046
            Long zhan_id = ((RegionItem) clusterItem).getChargePoint().getId();
4972 5047
            nMarker = marker;
4973 5048
5049
            zhanInfo = null;
4974 5050
            // add by hyg 显示气泡
4975 5051
            nMarker.showInfoWindow();
4976 5052
@ -5017,12 +5093,13 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5017 5093
    }
5018 5094
5019 5095
    private void showInfoWindow(String info, final LatLng ll) {
5096
        zhanInfo = info;
5020 5097
        final String id = JsonUtils.getKeyResult(info, "id");
5021 5098
        getCommentNum(id);
5022 5099
        zhanGrade(id);
5023 5100
        final String zhan_name = JsonUtils.getKeyResult(info, "zhan_name");
5024 5101
        String stop_cost = JsonUtils.getKeyResult(info, "stop_cost");
5025
        String own_pay = JsonUtils.getKeyResult(info, "own_pay");
5102
        String own_pay = JsonUtils.getKeyResult(info, "own_pay"); // 1:可支付
5026 5103
        String charge_cost_way2 = JsonUtils.getKeyResult(info, "charge_cost_way2");
5027 5104
        final String charge_cost_way = JsonUtils.getKeyResult(info, "charge_cost_way");
5028 5105
        String other_cost = JsonUtils.getKeyResult(info, "other_cost");
@ -5031,6 +5108,10 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5031 5108
        String slow_num = JsonUtils.getKeyResult(info, "slow_num");
5032 5109
        String fast_num = JsonUtils.getKeyResult(info, "fast_num");
5033 5110
        String remind = JsonUtils.getKeyResult(info, "remind");
5111
        String charge_record_cnt = JsonUtils.getKeyResult(info, "charge_record_cnt");
5112
        String zongjia = JsonUtils.getKeyResult(info, "zongjia");
5113
        String belong_attribute = JsonUtils.getKeyResult(info, "belong_attribute");
5114
        String park_location = JsonUtils.getKeyResult(info, "park_location");
5034 5115
        final String city = JsonUtils.getKeyResult(info, "city");
5035 5116
        final String poi_jing = JsonUtils.getKeyResult(info, "poi_jing");
5036 5117
        final String poi_wei = JsonUtils.getKeyResult(info, "poi_wei");
@ -5068,15 +5149,45 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5068 5149
            // OK
5069 5150
            double d = AMapUtils.calculateLineDistance(center, latLng);
5070 5151
            if ("0m".equals(Util.getDistance(d))) {
5071
                windowDistance.setText("未知");
5152
//                windowDistance.setText("未知");
5072 5153
                updateInfoWindow("未知距离");
5073 5154
            } else {
5074 5155
                String text = Util.getDistance(d);
5075
                windowDistance.setText(text);
5156
//                windowDistance.setText(text);
5076 5157
                updateInfoWindow("距您 " + text);
5077 5158
            }
5159
        }
5160
5161
        int count = Integer.valueOf(charge_record_cnt);
5162
        // 成功充电次数
5163
        if (count == 0) {
5164
            windowChargeRecordCnt.setText("");
5165
            windowChargeRecordCntLine.setVisibility(View.GONE);
5166
        } else {
5167
            windowChargeRecordCntLine.setVisibility(View.VISIBLE);
5168
5169
            if (count < 1000) {
5170
                windowChargeRecordCnt.setText(count + "次充电");
5171
            } else if (count < 10000) {
5172
                windowChargeRecordCnt.setText(count / 1000 + "k+次充电");
5173
            } else {
5174
                windowChargeRecordCnt.setText(count / 10000 + "w+次充电");
5175
            }
5176
        }
5078 5177
5178
        double zongjiaValue = Double.valueOf(zongjia);
5179
        if (zongjiaValue == 0) {
5180
            windowZongjiaLayout.setVisibility(View.GONE);
5181
        } else {
5182
            windowZongjiaLayout.setVisibility(View.VISIBLE);
5183
            windowZongjia.setText(String.format("%.2f", zongjiaValue));
5079 5184
        }
5185
        // 气泡红包显示
5186
        windowRedPaperBag.setVisibility("1".equals(own_pay) ? View.VISIBLE : View.GONE);
5187
        windowLabelPublic.setText("0".equals(belong_attribute) ? "公共" : "私人");
5188
        windowLabelGround.setText("0".equals(park_location) ? "地下" : "地上");
5189
        windowLabelPublic.setVisibility(stop_cost.contains("免费") ? View.VISIBLE : View.GONE);
5190
5080 5191
5081 5192
        String acNum = null, dcNum = null, acableNum = null, dcableNum = null;
5082 5193
        if (null != JsonUtils.getKeyResult(info, "acNum")) {
@ -5197,7 +5308,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5197 5308
                    .load("http://cdz.evcharge.cc/zhannew/uploadfile/" + MainApplication.list_addetail.get(result).getImg())
5198 5309
                    .into(windowAd);
5199 5310
            windowAd.setVisibility(View.VISIBLE);
5200
            windowView.setVisibility(View.GONE);
5201 5311
            windowAd.setOnClickListener(new View.OnClickListener() {
5202 5312
                @Override
5203 5313
                public void onClick(View v) {
@ -5323,33 +5433,120 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5323 5433
            });
5324 5434
        } else {
5325 5435
            windowAd.setVisibility(View.GONE);
5326
            windowView.setVisibility(View.VISIBLE);
5327 5436
        }
5328 5437
        //站点导航
5329 5438
        final String finalRemind = remind;
5330 5439
        windowGo.setOnClickListener(new View.OnClickListener() {
5331 5440
            @Override
5332 5441
            public void onClick(View v) {
5442
                infoViewNavigate();
5443
            }
5444
        });
5445
//        Log.e(TAG, "onResponse: id=" + id);
5446
        Animation animation = AnimationUtils.loadAnimation(this, R.anim.in);
5447
        animation.setDuration(500);
5448
        windowLayout.startAnimation(animation);
5449
        windowLayout.setVisibility(View.VISIBLE);
5333 5450
5334
                HashMap<String, String> mapp = new HashMap<String, String>();
5335
                mapp.put("type", "导航");
5336
                MobclickAgent.onEvent(context, "0102", mapp);
5337
                mapp.clear();
5338
                if (finalRemind.equals("0")) {
5339
                    if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap") &&
5340
                            !isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5341
                        if (null == center) {
5342
                            ToastUtil.showToast(getApplicationContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
5343
                        } else {
5451
    }
5452
5453
    /**
5454
     * 点击气泡进行导航
5455
     * add by hyg
5456
     */
5457
    private void infoViewNavigate() {
5458
        if (zhanInfo == null) {
5459
            return;
5460
        }
5461
5462
        if (nMarker == null) {
5463
            return;
5464
        }
5465
5466
        final LatLng ll = nMarker.getPosition();
5467
5468
        final String id = JsonUtils.getKeyResult(zhanInfo, "id");
5469
        final String zhan_name = JsonUtils.getKeyResult(zhanInfo, "zhan_name");
5470
        String stop_cost = JsonUtils.getKeyResult(zhanInfo, "stop_cost");
5471
        String own_pay = JsonUtils.getKeyResult(zhanInfo, "own_pay");
5472
        String charge_cost_way2 = JsonUtils.getKeyResult(zhanInfo, "charge_cost_way2");
5473
        final String charge_cost_way = JsonUtils.getKeyResult(zhanInfo, "charge_cost_way");
5474
        String other_cost = JsonUtils.getKeyResult(zhanInfo, "other_cost");
5475
        String charge_cost = JsonUtils.getKeyResult(zhanInfo, "charge_cost");
5476
        String total_num = JsonUtils.getKeyResult(zhanInfo, "total_num");
5477
        String slow_num = JsonUtils.getKeyResult(zhanInfo, "slow_num");
5478
        String fast_num = JsonUtils.getKeyResult(zhanInfo, "fast_num");
5479
        String remind = JsonUtils.getKeyResult(zhanInfo, "remind");
5480
        final String city = JsonUtils.getKeyResult(zhanInfo, "city");
5481
        final String poi_jing = JsonUtils.getKeyResult(zhanInfo, "poi_jing");
5482
        final String poi_wei = JsonUtils.getKeyResult(zhanInfo, "poi_wei");
5483
5484
5485
        HashMap<String, String> mapp = new HashMap<String, String>();
5486
        mapp.put("type", "导航");
5487
        MobclickAgent.onEvent(context, "0102", mapp);
5488
        mapp.clear();
5489
        if (remind.equals("0")) {
5490
            if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap") &&
5491
                    !isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5492
                if (null == center) {
5493
                    ToastUtil.showToast(getApplicationContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
5494
                } else {
5495
                    Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5496
                    intent.putExtra("start_jing", center.longitude + "");
5497
                    intent.putExtra("start_wei", center.latitude + "");
5498
                    intent.putExtra("stop_jing", ll.longitude + "");
5499
//                    Log.e("123", ll.longitude + "");
5500
                    intent.putExtra("stop_wei", ll.latitude + "");
5501
//                    Log.e("123", ll.latitude + "");
5502
                    startActivity(intent);
5503
                    detailsBack = true;
5504
                    HashMap<String, String> map = new HashMap<String, String>();
5505
                    map.put("Name", zhan_name);
5506
                    map.put("CostWay", charge_cost_way);
5507
                    map.put("City", city);
5508
                    MobclickAgent.onEvent(context, "0033", map);
5509
                    map.clear();
5510
                }
5511
            } else {
5512
                if (center != null) {
5513
                    LayoutInflater inflater1 = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
5514
                    popupWindowView = inflater1.inflate(R.layout.item_selectmap, null);
5515
                    popupWindow = new PopupWindow(popupWindowView,
5516
                            ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
5517
                            true);
5518
                    popupWindow.setBackgroundDrawable(new BitmapDrawable());
5519
                    // 设置PopupWindow的弹出和消失效果
5520
                    popupWindow.setAnimationStyle(R.style.popupAnimation);
5521
                    LinearLayout ll_tvTwo = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvTwo);
5522
                    if (!isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5523
                        ll_tvTwo.setVisibility(View.GONE);
5524
                    }
5525
                    LinearLayout ll_tvOne = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvOne);
5526
                    if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap")) {
5527
                        ll_tvOne.setVisibility(View.GONE);
5528
                    }
5529
                    cancleButton = (Button) popupWindowView
5530
                            .findViewById(R.id.cancleButton);
5531
                    cancleButton.setOnClickListener(new View.OnClickListener() {
5532
                        @Override
5533
                        public void onClick(View view) {
5534
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
5535
                            popupWindow.dismiss();
5536
                        }
5537
                    });
5538
                    tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
5539
                    tvThree.setOnClickListener(new View.OnClickListener() {
5540
                        @Override
5541
                        public void onClick(View v) {
5344 5542
                            Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5345 5543
                            intent.putExtra("start_jing", center.longitude + "");
5346 5544
                            intent.putExtra("start_wei", center.latitude + "");
5347 5545
                            intent.putExtra("stop_jing", ll.longitude + "");
5348
//                    Log.e("123", ll.longitude + "");
5349 5546
                            intent.putExtra("stop_wei", ll.latitude + "");
5350
//                    Log.e("123", ll.latitude + "");
5351 5547
                            startActivity(intent);
5352 5548
                            detailsBack = true;
5549
                            popupWindow.dismiss();
5353 5550
                            HashMap<String, String> map = new HashMap<String, String>();
5354 5551
                            map.put("Name", zhan_name);
5355 5552
                            map.put("CostWay", charge_cost_way);
@ -5357,277 +5554,223 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5357 5554
                            MobclickAgent.onEvent(context, "0033", map);
5358 5555
                            map.clear();
5359 5556
                        }
5360
                    } else {
5361
                        if (center != null) {
5362
                            LayoutInflater inflater1 = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
5363
                            popupWindowView = inflater1.inflate(R.layout.item_selectmap, null);
5364
                            popupWindow = new PopupWindow(popupWindowView,
5365
                                    ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
5366
                                    true);
5367
                            popupWindow.setBackgroundDrawable(new BitmapDrawable());
5368
                            // 设置PopupWindow的弹出和消失效果
5369
                            popupWindow.setAnimationStyle(R.style.popupAnimation);
5370
                            LinearLayout ll_tvTwo = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvTwo);
5371
                            if (!isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5372
                                ll_tvTwo.setVisibility(View.GONE);
5373
                            }
5374
                            LinearLayout ll_tvOne = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvOne);
5375
                            if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap")) {
5376
                                ll_tvOne.setVisibility(View.GONE);
5557
                    });
5558
                    tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
5559
                    tvOne.setOnClickListener(new View.OnClickListener() {
5560
                        @Override
5561
                        public void onClick(View view) {
5562
                            Intent intent = null;
5563
                            int position_jing = poi_jing.length() - poi_jing.indexOf(".") - 1;
5564
                            int position_wei = poi_wei.length() - poi_wei.indexOf(".") - 1;
5565
                            if (position_jing > 13 || position_wei > 13) {
5566
                                getBaidu1(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
5567
                            } else {
5568
                                bd_jing = Double.parseDouble(poi_jing);
5569
                                bd_wei = Double.parseDouble(poi_wei);
5377 5570
                            }
5378
                            cancleButton = (Button) popupWindowView
5379
                                    .findViewById(R.id.cancleButton);
5380
                            cancleButton.setOnClickListener(new View.OnClickListener() {
5381
                                @Override
5382
                                public void onClick(View view) {
5383
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
5384
                                    popupWindow.dismiss();
5385
                                }
5386
                            });
5387
                            tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
5388
                            tvThree.setOnClickListener(new View.OnClickListener() {
5389
                                @Override
5390
                                public void onClick(View v) {
5391
                                    Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5392
                                    intent.putExtra("start_jing", center.longitude + "");
5393
                                    intent.putExtra("start_wei", center.latitude + "");
5394
                                    intent.putExtra("stop_jing", ll.longitude + "");
5395
                                    intent.putExtra("stop_wei", ll.latitude + "");
5396
                                    startActivity(intent);
5397
                                    detailsBack = true;
5398
                                    popupWindow.dismiss();
5399
                                    HashMap<String, String> map = new HashMap<String, String>();
5400
                                    map.put("Name", zhan_name);
5401
                                    map.put("CostWay", charge_cost_way);
5402
                                    map.put("City", city);
5403
                                    MobclickAgent.onEvent(context, "0033", map);
5404
                                    map.clear();
5405
                                }
5406
                            });
5407
                            tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
5408
                            tvOne.setOnClickListener(new View.OnClickListener() {
5409
                                @Override
5410
                                public void onClick(View view) {
5411
                                    Intent intent = null;
5412
                                    int position_jing = poi_jing.length() - poi_jing.indexOf(".") - 1;
5413
                                    int position_wei = poi_wei.length() - poi_wei.indexOf(".") - 1;
5414
                                    if (position_jing > 13 || position_wei > 13) {
5415
                                        getBaidu1(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
5416
                                    } else {
5417
                                        bd_jing = Double.parseDouble(poi_jing);
5418
                                        bd_wei = Double.parseDouble(poi_wei);
5419
                                    }
5420
                                    getBaidu(center.longitude, center.latitude);
5421
                                    try {
5422
                                        String s = "intent://map/direction?" +
5423
                                                "origin=" + bd_lat + "," + bd_lon + "&" +
5424
                                                "destination=" + bd_wei + "," + bd_jing +
5425
                                                "&mode=driving&" +
5426
                                                "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
5571
                            getBaidu(center.longitude, center.latitude);
5572
                            try {
5573
                                String s = "intent://map/direction?" +
5574
                                        "origin=" + bd_lat + "," + bd_lon + "&" +
5575
                                        "destination=" + bd_wei + "," + bd_jing +
5576
                                        "&mode=driving&" +
5577
                                        "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
5427 5578
//                                    Log.e("sss", s);
5428
                                        intent = Intent.getIntent(s);
5429
                                        detailsBack = true;
5430
                                        HashMap<String, String> map = new HashMap<String, String>();
5431
                                        map.put("Name", zhan_name);
5432
                                        map.put("CostWay", charge_cost_way);
5433
                                        map.put("City", city);
5434
                                        MobclickAgent.onEvent(context, "0031", map);
5435
                                        map.clear();
5436
                                    } catch (URISyntaxException e) {
5437
                                        e.printStackTrace();
5438
                                    }
5439
                                    startActivity(intent);
5440
                                    popupWindow.dismiss();
5579
                                intent = Intent.getIntent(s);
5580
                                detailsBack = true;
5581
                                HashMap<String, String> map = new HashMap<String, String>();
5582
                                map.put("Name", zhan_name);
5583
                                map.put("CostWay", charge_cost_way);
5584
                                map.put("City", city);
5585
                                MobclickAgent.onEvent(context, "0031", map);
5586
                                map.clear();
5587
                            } catch (URISyntaxException e) {
5588
                                e.printStackTrace();
5589
                            }
5590
                            startActivity(intent);
5591
                            popupWindow.dismiss();
5441 5592
5442
                                }
5593
                        }
5443 5594
5444
                            });
5445
                            tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
5446
                            tvTwo.setOnClickListener(new View.OnClickListener() {
5447
                                @Override
5448
                                public void onClick(View view) {
5449
                                    try {
5450
                                        Intent intent4 = new Intent("android.intent.action.VIEW",
5451
                                                android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + center.latitude + "&slon=" + center.longitude + "&sname=我的位置&dlat=" + ll.latitude + "&dlon=" + ll.longitude + "&dname=" + zhan_name + "&dev=0&m=0&t=2"));
5452
                                        intent4.setPackage("com.autonavi.minimap");
5453
                                        startActivity(intent4);
5454
                                        detailsBack = true;
5455
                                        popupWindow.dismiss();
5456
                                        HashMap<String, String> map = new HashMap<String, String>();
5457
                                        map.put("Name", zhan_name);
5458
                                        map.put("CostWay", charge_cost_way);
5459
                                        map.put("City", city);
5460
                                        MobclickAgent.onEvent(context, "0032", map);
5461
                                        map.clear();
5462
                                    } catch (Exception e) {
5463
                                        e.printStackTrace();
5464
                                        Toast.makeText(getApplication(), "请您确认是否安装高德地图APP", Toast.LENGTH_SHORT).show();
5465
                                    }
5595
                    });
5596
                    tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
5597
                    tvTwo.setOnClickListener(new View.OnClickListener() {
5598
                        @Override
5599
                        public void onClick(View view) {
5600
                            try {
5601
                                Intent intent4 = new Intent("android.intent.action.VIEW",
5602
                                        android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + center.latitude + "&slon=" + center.longitude + "&sname=我的位置&dlat=" + ll.latitude + "&dlon=" + ll.longitude + "&dname=" + zhan_name + "&dev=0&m=0&t=2"));
5603
                                intent4.setPackage("com.autonavi.minimap");
5604
                                startActivity(intent4);
5605
                                detailsBack = true;
5606
                                popupWindow.dismiss();
5607
                                HashMap<String, String> map = new HashMap<String, String>();
5608
                                map.put("Name", zhan_name);
5609
                                map.put("CostWay", charge_cost_way);
5610
                                map.put("City", city);
5611
                                MobclickAgent.onEvent(context, "0032", map);
5612
                                map.clear();
5613
                            } catch (Exception e) {
5614
                                e.printStackTrace();
5615
                                Toast.makeText(getApplication(), "请您确认是否安装高德地图APP", Toast.LENGTH_SHORT).show();
5616
                            }
5466 5617
5467
                                }
5468
                            });
5469
                            popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
5470
//                                            startNavi(center, ll);
5471
                        } else {
5472
                            Toast.makeText(getApplication(),
5473
                                    "没有定位到您的当前位置", Toast.LENGTH_SHORT)
5474
                                    .show();
5475 5618
                        }
5476
                    }
5619
                    });
5620
                    popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
5621
//                                            startNavi(center, ll);
5477 5622
                } else {
5478
                    new com.electric.chargingpile.view.AlertDialog(MainMapActivity.this).builder()
5479
                            .setMsg("站点充电桩均为离线或故障,可能无法正常充电,是否继续前往")
5480
                            .setPositiveButton("继续", new View.OnClickListener() {
5481
                                @Override
5482
                                public void onClick(View v) {
5483
                                    if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap") &&
5484
                                            !isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5485
                                        Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5486
                                        intent.putExtra("start_jing", center.longitude + "");
5487
                                        intent.putExtra("start_wei", center.latitude + "");
5488
                                        intent.putExtra("stop_jing", ll.longitude + "");
5623
                    Toast.makeText(getApplication(),
5624
                            "没有定位到您的当前位置", Toast.LENGTH_SHORT)
5625
                            .show();
5626
                }
5627
            }
5628
        } else {
5629
            new com.electric.chargingpile.view.AlertDialog(MainMapActivity.this).builder()
5630
                    .setMsg("站点充电桩均为离线或故障,可能无法正常充电,是否继续前往")
5631
                    .setPositiveButton("继续", new View.OnClickListener() {
5632
                        @Override
5633
                        public void onClick(View v) {
5634
                            if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap") &&
5635
                                    !isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5636
                                Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5637
                                intent.putExtra("start_jing", center.longitude + "");
5638
                                intent.putExtra("start_wei", center.latitude + "");
5639
                                intent.putExtra("stop_jing", ll.longitude + "");
5489 5640
//                    Log.e("123", ll.longitude + "");
5490
                                        intent.putExtra("stop_wei", ll.latitude + "");
5641
                                intent.putExtra("stop_wei", ll.latitude + "");
5491 5642
//                    Log.e("123", ll.latitude + "");
5492
                                        startActivity(intent);
5493
                                        detailsBack = true;
5494
                                        HashMap<String, String> map = new HashMap<String, String>();
5495
                                        map.put("Name", zhan_name);
5496
                                        map.put("CostWay", charge_cost_way);
5497
                                        map.put("City", city);
5498
                                        MobclickAgent.onEvent(context, "0033", map);
5499
                                        map.clear();
5500
                                    } else {
5501
                                        if (center != null) {
5502
                                            LayoutInflater inflater1 = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
5503
                                            popupWindowView = inflater1.inflate(R.layout.item_selectmap, null);
5504
                                            popupWindow = new PopupWindow(popupWindowView,
5505
                                                    ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
5506
                                                    true);
5507
                                            popupWindow.setBackgroundDrawable(new BitmapDrawable());
5508
                                            // 设置PopupWindow的弹出和消失效果
5509
                                            popupWindow.setAnimationStyle(R.style.popupAnimation);
5510
                                            LinearLayout ll_tvTwo = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvTwo);
5511
                                            if (!isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5512
                                                ll_tvTwo.setVisibility(View.GONE);
5513
                                            }
5514
                                            LinearLayout ll_tvOne = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvOne);
5515
                                            if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap")) {
5516
                                                ll_tvOne.setVisibility(View.GONE);
5517
                                            }
5518
                                            cancleButton = (Button) popupWindowView
5519
                                                    .findViewById(R.id.cancleButton);
5520
                                            cancleButton.setOnClickListener(new View.OnClickListener() {
5521
                                                @Override
5522
                                                public void onClick(View view) {
5643
                                startActivity(intent);
5644
                                detailsBack = true;
5645
                                HashMap<String, String> map = new HashMap<String, String>();
5646
                                map.put("Name", zhan_name);
5647
                                map.put("CostWay", charge_cost_way);
5648
                                map.put("City", city);
5649
                                MobclickAgent.onEvent(context, "0033", map);
5650
                                map.clear();
5651
                            } else {
5652
                                if (center != null) {
5653
                                    LayoutInflater inflater1 = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
5654
                                    popupWindowView = inflater1.inflate(R.layout.item_selectmap, null);
5655
                                    popupWindow = new PopupWindow(popupWindowView,
5656
                                            ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
5657
                                            true);
5658
                                    popupWindow.setBackgroundDrawable(new BitmapDrawable());
5659
                                    // 设置PopupWindow的弹出和消失效果
5660
                                    popupWindow.setAnimationStyle(R.style.popupAnimation);
5661
                                    LinearLayout ll_tvTwo = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvTwo);
5662
                                    if (!isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5663
                                        ll_tvTwo.setVisibility(View.GONE);
5664
                                    }
5665
                                    LinearLayout ll_tvOne = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvOne);
5666
                                    if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap")) {
5667
                                        ll_tvOne.setVisibility(View.GONE);
5668
                                    }
5669
                                    cancleButton = (Button) popupWindowView
5670
                                            .findViewById(R.id.cancleButton);
5671
                                    cancleButton.setOnClickListener(new View.OnClickListener() {
5672
                                        @Override
5673
                                        public void onClick(View view) {
5523 5674
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
5524
                                                    popupWindow.dismiss();
5525
                                                }
5526
                                            });
5527
                                            tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
5528
                                            tvThree.setOnClickListener(new View.OnClickListener() {
5529
                                                @Override
5530
                                                public void onClick(View v) {
5531
                                                    Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5532
                                                    intent.putExtra("start_jing", center.longitude + "");
5533
                                                    intent.putExtra("start_wei", center.latitude + "");
5534
                                                    intent.putExtra("stop_jing", ll.longitude + "");
5535
                                                    intent.putExtra("stop_wei", ll.latitude + "");
5536
                                                    startActivity(intent);
5537
                                                    detailsBack = true;
5538
                                                    popupWindow.dismiss();
5539
                                                    HashMap<String, String> map = new HashMap<String, String>();
5540
                                                    map.put("Name", zhan_name);
5541
                                                    map.put("CostWay", charge_cost_way);
5542
                                                    map.put("City", city);
5543
                                                    MobclickAgent.onEvent(context, "0033", map);
5544
                                                    map.clear();
5545
                                                }
5546
                                            });
5547
                                            tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
5548
                                            tvOne.setOnClickListener(new View.OnClickListener() {
5549
                                                @Override
5550
                                                public void onClick(View view) {
5551
                                                    Intent intent = null;
5552
                                                    int position_jing = poi_jing.length() - poi_jing.indexOf(".") - 1;
5553
                                                    int position_wei = poi_wei.length() - poi_wei.indexOf(".") - 1;
5554
                                                    if (position_jing > 13 || position_wei > 13) {
5555
                                                        getBaidu1(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
5556
                                                    } else {
5557
                                                        bd_jing = Double.parseDouble(poi_jing);
5558
                                                        bd_wei = Double.parseDouble(poi_wei);
5559
                                                    }
5560
                                                    getBaidu(center.longitude, center.latitude);
5561
                                                    try {
5562
                                                        String s = "intent://map/direction?" +
5563
                                                                "origin=" + bd_lat + "," + bd_lon + "&" +
5564
                                                                "destination=" + bd_wei + "," + bd_jing +
5565
                                                                "&mode=driving&" +
5566
                                                                "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
5675
                                            popupWindow.dismiss();
5676
                                        }
5677
                                    });
5678
                                    tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
5679
                                    tvThree.setOnClickListener(new View.OnClickListener() {
5680
                                        @Override
5681
                                        public void onClick(View v) {
5682
                                            Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5683
                                            intent.putExtra("start_jing", center.longitude + "");
5684
                                            intent.putExtra("start_wei", center.latitude + "");
5685
                                            intent.putExtra("stop_jing", ll.longitude + "");
5686
                                            intent.putExtra("stop_wei", ll.latitude + "");
5687
                                            startActivity(intent);
5688
                                            detailsBack = true;
5689
                                            popupWindow.dismiss();
5690
                                            HashMap<String, String> map = new HashMap<String, String>();
5691
                                            map.put("Name", zhan_name);
5692
                                            map.put("CostWay", charge_cost_way);
5693
                                            map.put("City", city);
5694
                                            MobclickAgent.onEvent(context, "0033", map);
5695
                                            map.clear();
5696
                                        }
5697
                                    });
5698
                                    tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
5699
                                    tvOne.setOnClickListener(new View.OnClickListener() {
5700
                                        @Override
5701
                                        public void onClick(View view) {
5702
                                            Intent intent = null;
5703
                                            int position_jing = poi_jing.length() - poi_jing.indexOf(".") - 1;
5704
                                            int position_wei = poi_wei.length() - poi_wei.indexOf(".") - 1;
5705
                                            if (position_jing > 13 || position_wei > 13) {
5706
                                                getBaidu1(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
5707
                                            } else {
5708
                                                bd_jing = Double.parseDouble(poi_jing);
5709
                                                bd_wei = Double.parseDouble(poi_wei);
5710
                                            }
5711
                                            getBaidu(center.longitude, center.latitude);
5712
                                            try {
5713
                                                String s = "intent://map/direction?" +
5714
                                                        "origin=" + bd_lat + "," + bd_lon + "&" +
5715
                                                        "destination=" + bd_wei + "," + bd_jing +
5716
                                                        "&mode=driving&" +
5717
                                                        "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
5567 5718
//                                    Log.e("sss", s);
5568
                                                        intent = Intent.getIntent(s);
5569
                                                        detailsBack = true;
5570
                                                        HashMap<String, String> map = new HashMap<String, String>();
5571
                                                        map.put("Name", zhan_name);
5572
                                                        map.put("CostWay", charge_cost_way);
5573
                                                        map.put("City", city);
5574
                                                        MobclickAgent.onEvent(context, "0031", map);
5575
                                                        map.clear();
5576
                                                    } catch (URISyntaxException e) {
5577
                                                        e.printStackTrace();
5578
                                                    }
5579
                                                    startActivity(intent);
5580
                                                    popupWindow.dismiss();
5581
5582
                                                }
5583
5584
                                            });
5585
                                            tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
5586
                                            tvTwo.setOnClickListener(new View.OnClickListener() {
5587
                                                @Override
5588
                                                public void onClick(View view) {
5589
                                                    try {
5590
                                                        Intent intent4 = new Intent("android.intent.action.VIEW",
5591
                                                                android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + center.latitude + "&slon=" + center.longitude + "&sname=我的位置&dlat=" + ll.latitude + "&dlon=" + ll.longitude + "&dname=" + zhan_name + "&dev=0&m=0&t=2"));
5592
                                                        intent4.setPackage("com.autonavi.minimap");
5593
                                                        startActivity(intent4);
5594
                                                        detailsBack = true;
5595
                                                        popupWindow.dismiss();
5596
                                                        HashMap<String, String> map = new HashMap<String, String>();
5597
                                                        map.put("Name", zhan_name);
5598
                                                        map.put("CostWay", charge_cost_way);
5599
                                                        map.put("City", city);
5600
                                                        MobclickAgent.onEvent(context, "0032", map);
5601
                                                        map.clear();
5602
                                                    } catch (Exception e) {
5603
                                                        e.printStackTrace();
5604
                                                        Toast.makeText(getApplication(), "请您确认是否安装高德地图APP", Toast.LENGTH_SHORT).show();
5605
                                                    }
5606
5607
                                                }
5608
                                            });
5609
                                            popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
5610
//                                            startNavi(center, ll);
5611
                                        } else {
5612
                                            ToastUtil.showToast(getApplicationContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
5719
                                                intent = Intent.getIntent(s);
5720
                                                detailsBack = true;
5721
                                                HashMap<String, String> map = new HashMap<String, String>();
5722
                                                map.put("Name", zhan_name);
5723
                                                map.put("CostWay", charge_cost_way);
5724
                                                map.put("City", city);
5725
                                                MobclickAgent.onEvent(context, "0031", map);
5726
                                                map.clear();
5727
                                            } catch (URISyntaxException e) {
5728
                                                e.printStackTrace();
5729
                                            }
5730
                                            startActivity(intent);
5731
                                            popupWindow.dismiss();
5732
5613 5733
                                        }
5614
                                    }
5615
                                }
5616
                            }).setNegativeButton("取消", new View.OnClickListener() {
5617
                        @Override
5618
                        public void onClick(View v) {
5619 5734
5735
                                    });
5736
                                    tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
5737
                                    tvTwo.setOnClickListener(new View.OnClickListener() {
5738
                                        @Override
5739
                                        public void onClick(View view) {
5740
                                            try {
5741
                                                Intent intent4 = new Intent("android.intent.action.VIEW",
5742
                                                        android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + center.latitude + "&slon=" + center.longitude + "&sname=我的位置&dlat=" + ll.latitude + "&dlon=" + ll.longitude + "&dname=" + zhan_name + "&dev=0&m=0&t=2"));
5743
                                                intent4.setPackage("com.autonavi.minimap");
5744
                                                startActivity(intent4);
5745
                                                detailsBack = true;
5746
                                                popupWindow.dismiss();
5747
                                                HashMap<String, String> map = new HashMap<String, String>();
5748
                                                map.put("Name", zhan_name);
5749
                                                map.put("CostWay", charge_cost_way);
5750
                                                map.put("City", city);
5751
                                                MobclickAgent.onEvent(context, "0032", map);
5752
                                                map.clear();
5753
                                            } catch (Exception e) {
5754
                                                e.printStackTrace();
5755
                                                Toast.makeText(getApplication(), "请您确认是否安装高德地图APP", Toast.LENGTH_SHORT).show();
5756
                                            }
5757
5758
                                        }
5759
                                    });
5760
                                    popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
5761
//                                            startNavi(center, ll);
5762
                                } else {
5763
                                    ToastUtil.showToast(getApplicationContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
5764
                                }
5765
                            }
5620 5766
                        }
5621
                    }).show();
5622
                }
5623
            }
5624
        });
5625
//        Log.e(TAG, "onResponse: id=" + id);
5626
        Animation animation = AnimationUtils.loadAnimation(this, R.anim.in);
5627
        animation.setDuration(500);
5628
        windowLayout.startAnimation(animation);
5629
        windowLayout.setVisibility(View.VISIBLE);
5767
                    }).setNegativeButton("取消", new View.OnClickListener() {
5768
                @Override
5769
                public void onClick(View v) {
5630 5770
5771
                }
5772
            }).show();
5773
        }
5631 5774
    }
5632 5775
5633 5776
    private void zhanGrade(String zhan_id) {

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

@ -75,8 +75,8 @@ public class MainApplication extends MultiDexApplication {
75 75
    public static String password = "";
76 76
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
77 77
    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
78
//    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
79
    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
78
    public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
79
//    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
80 80
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
81 81
    //	public static String url = "https://cdz.d1ev.com";
82 82
    public static String build_flag = "0";

+ 3 - 2
app/src/main/java/com/electric/chargingpile/cluster/ClusterOverlay.java

@ -603,11 +603,12 @@ public class ClusterOverlay implements AMap.OnCameraChangeListener,
603 603
                        MainMapActivity.nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker2));
604 604
                    } else {
605 605
                        MainMapActivity.nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
606
                        // add by hyg 隐藏气泡
607
                        MainMapActivity.nMarker.hideInfoWindow();
608 606
                    }
609 607
                }
610 608
            }
609
610
            // add by hyg 隐藏气泡
611
            MainMapActivity.nMarker.hideInfoWindow();
611 612
        }
612 613
613 614

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


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


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


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


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


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


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


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


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


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


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

@ -0,0 +1,9 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android">
3
    <!-- 背景色 -->
4
    <solid android:color="#f7f7f7"></solid>
5
    <!-- 边框颜色、宽度  -->
6
    <stroke android:width="0.5dip" android:color="#dddddd"></stroke>
7
    <!-- 边框圆角 -->
8
    <corners android:radius="2dp"></corners>
9
</shape>

+ 388 - 273
app/src/main/res/layout/activity_main_map.xml

@ -1,5 +1,6 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3 4
    xmlns:tools="http://schemas.android.com/tools"
4 5
    android:layout_width="match_parent"
5 6
    android:layout_height="match_parent"
@ -24,10 +25,10 @@
24 25
            android:layout_height="match_parent"
25 26
            android:layout_centerVertical="true"
26 27
            android:layout_gravity="center"
27
            android:paddingBottom="10dp"
28 28
            android:paddingLeft="16dp"
29
            android:paddingRight="16dp"
30 29
            android:paddingTop="10dp"
30
            android:paddingRight="16dp"
31
            android:paddingBottom="10dp"
31 32
            android:src="@drawable/icon_user2_0"
32 33
            android:visibility="gone" />
33 34
@ -37,8 +38,8 @@
37 38
            android:layout_height="match_parent"
38 39
            android:layout_gravity="center"
39 40
            android:layout_weight="2.2"
40
            android:drawablePadding="12px"
41 41
            android:drawableRight="@drawable/iocn_down_lv"
42
            android:drawablePadding="12px"
42 43
            android:ellipsize="end"
43 44
            android:gravity="center"
44 45
            android:paddingLeft="16dp"
@ -54,10 +55,10 @@
54 55
            android:layout_height="match_parent"
55 56
            android:layout_centerVertical="true"
56 57
            android:layout_gravity="center"
57
            android:paddingBottom="4dp"
58 58
            android:paddingLeft="16dp"
59
            android:paddingRight="16dp"
60 59
            android:paddingTop="4dp"
60
            android:paddingRight="16dp"
61
            android:paddingBottom="4dp"
61 62
            android:src="@drawable/icon_back2_0"
62 63
            android:visibility="gone" />
63 64
@ -66,8 +67,8 @@
66 67
            android:layout_width="0dp"
67 68
            android:layout_height="match_parent"
68 69
            android:layout_gravity="center"
69
            android:layout_marginBottom="7dp"
70 70
            android:layout_marginTop="7dp"
71
            android:layout_marginBottom="7dp"
71 72
            android:layout_weight="5"
72 73
            android:background="@drawable/bg"
73 74
            android:orientation="horizontal"
@ -77,25 +78,25 @@
77 78
                android:id="@+id/iv_search"
78 79
                android:layout_width="wrap_content"
79 80
                android:layout_height="wrap_content"
81
                android:layout_alignParentLeft="true"
82
                android:layout_centerVertical="true"
80 83
                android:layout_gravity="center"
81 84
                android:layout_marginLeft="42px"
82 85
                android:layout_marginRight="15px"
83
                android:layout_alignParentLeft="true"
84
                android:layout_centerVertical="true"
85 86
                android:src="@drawable/icon_search1118" />
86 87
87 88
            <TextView
88 89
                android:id="@+id/tv_search"
89 90
                android:layout_width="match_parent"
90 91
                android:layout_height="wrap_content"
92
                android:layout_centerVertical="true"
91 93
                android:layout_gravity="center"
92
                android:layout_toRightOf="@+id/iv_search"
93 94
                android:layout_toLeftOf="@+id/iv_clear_address"
95
                android:layout_toRightOf="@+id/iv_search"
94 96
                android:background="#f1f1f1"
95 97
                android:ellipsize="end"
96
                android:text="@string/chargingpile_search"
97
                android:layout_centerVertical="true"
98 98
                android:singleLine="true"
99
                android:text="@string/chargingpile_search"
99 100
                android:textColor="@color/ui_68"
100 101
                android:textSize="14sp" />
101 102
@ -103,13 +104,13 @@
103 104
                android:id="@+id/iv_clear_address"
104 105
                android:layout_width="wrap_content"
105 106
                android:layout_height="wrap_content"
107
                android:layout_alignParentRight="true"
108
                android:layout_centerVertical="true"
106 109
                android:layout_gravity="center"
107 110
                android:layout_marginLeft="15px"
108 111
                android:layout_marginRight="42px"
109
                android:layout_alignParentRight="true"
110
                android:layout_centerVertical="true"
111
                android:src="@drawable/icon_edit_delete2_0"
112
                android:padding="20px"/>
112
                android:padding="20px"
113
                android:src="@drawable/icon_edit_delete2_0" />
113 114
        </RelativeLayout>
114 115
115 116
@ -130,13 +131,13 @@
130 131
            android:layout_height="match_parent"
131 132
            android:layout_weight="0.5"
132 133
            android:gravity="center"
133
            android:paddingBottom="5dp"
134 134
            android:paddingLeft="10px"
135
            android:paddingRight="10px"
136 135
            android:paddingTop="5dp"
136
            android:paddingRight="10px"
137
            android:paddingBottom="5dp"
137 138
            android:text="列表"
138
            android:textSize="15sp"
139
            android:textColor="@color/lvse" />
139
            android:textColor="@color/lvse"
140
            android:textSize="15sp" />
140 141
141 142
        <ImageView
142 143
            android:layout_width="0dp"
@ -145,10 +146,10 @@
145 146
            android:layout_centerVertical="true"
146 147
            android:layout_weight="1"
147 148
            android:gravity="center"
148
            android:paddingBottom="5dp"
149 149
            android:paddingLeft="21px"
150
            android:paddingRight="35px"
151 150
            android:paddingTop="5dp"
151
            android:paddingRight="35px"
152
            android:paddingBottom="5dp"
152 153
            android:src="@drawable/icon_shaixuan0314"
153 154
            android:visibility="gone" />
154 155
    </LinearLayout>
@ -159,7 +160,7 @@
159 160
        android:layout_height="0.5dp"
160 161
        android:layout_below="@+id/ll_title"
161 162
        android:background="@color/ui_titleline"
162
        android:visibility="invisible"/>
163
        android:visibility="invisible" />
163 164
164 165
    <com.amap.api.maps.MapView
165 166
        android:id="@+id/mapView"
@ -169,17 +170,16 @@
169 170
        android:layout_below="@+id/title_view" />
170 171
171 172
172
173 173
    <RelativeLayout
174 174
        android:id="@+id/tv_notice"
175 175
        android:layout_width="match_parent"
176 176
        android:layout_height="38dp"
177
        android:background="@drawable/bg_notice1105"
178
        android:orientation="horizontal"
179
        android:visibility="gone"
180 177
        android:layout_below="@+id/ll_title"
178
        android:layout_alignParentStart="true"
181 179
        android:layout_alignParentLeft="true"
182
        android:layout_alignParentStart="true">
180
        android:background="@drawable/bg_notice1105"
181
        android:orientation="horizontal"
182
        android:visibility="gone">
183 183
184 184
        <TextView
185 185
            android:id="@+id/tv_ts"
@ -201,8 +201,8 @@
201 201
        android:id="@+id/rl_mapList"
202 202
        android:layout_width="match_parent"
203 203
        android:layout_height="match_parent"
204
        android:layout_below="@id/title_view"
205 204
        android:layout_above="@+id/ll_tab"
205
        android:layout_below="@id/title_view"
206 206
        android:background="@color/white"
207 207
        android:visibility="gone">
208 208
@ -210,50 +210,50 @@
210 210
            android:id="@+id/ll_sortType"
211 211
            android:layout_width="match_parent"
212 212
            android:layout_height="45dp"
213
            android:orientation="horizontal"
213
            android:layout_alignParentTop="true"
214 214
            android:background="@color/white"
215
            android:layout_alignParentTop="true">
215
            android:orientation="horizontal">
216 216
217 217
            <TextView
218 218
                android:id="@+id/tv_sortDistance"
219 219
                android:layout_width="0dp"
220 220
                android:layout_height="match_parent"
221 221
                android:layout_weight="1"
222
                android:textSize="14sp"
223 222
                android:background="@drawable/bg_lv"
223
                android:gravity="center"
224 224
                android:text="距离最近"
225 225
                android:textColor="@color/lvse"
226
                android:gravity="center"/>
226
                android:textSize="14sp" />
227 227
228 228
            <TextView
229 229
                android:id="@+id/tv_sortStarLevel"
230 230
                android:layout_width="0dp"
231 231
                android:layout_height="match_parent"
232 232
                android:layout_weight="1"
233
                android:textSize="14sp"
233
                android:gravity="center"
234 234
                android:text="评分最高"
235 235
                android:textColor="@color/ui_62"
236
                android:gravity="center"/>
236
                android:textSize="14sp" />
237 237
238 238
            <TextView
239 239
                android:id="@+id/tv_sortFreeTime"
240 240
                android:layout_width="0dp"
241 241
                android:layout_height="match_parent"
242 242
                android:layout_weight="1"
243
                android:textSize="14sp"
243
                android:gravity="center"
244 244
                android:text="空闲优先"
245 245
                android:textColor="@color/ui_62"
246
                android:gravity="center"/>
246
                android:textSize="14sp" />
247 247
248 248
            <TextView
249 249
                android:id="@+id/tv_shaixuan"
250 250
                android:layout_width="0dp"
251 251
                android:layout_height="match_parent"
252 252
                android:layout_weight="1"
253
                android:textSize="14sp"
253
                android:gravity="center"
254 254
                android:text="筛选"
255 255
                android:textColor="@color/ui_62"
256
                android:gravity="center"/>
256
                android:textSize="14sp" />
257 257
258 258
        </com.zhy.autolayout.AutoLinearLayout>
259 259
@ -261,8 +261,8 @@
261 261
            android:id="@+id/lv_zhan_list"
262 262
            android:layout_width="fill_parent"
263 263
            android:layout_height="fill_parent"
264
            android:layout_below="@id/ll_sortType"
265 264
            android:layout_above="@+id/ll_tab"
265
            android:layout_below="@id/ll_sortType"
266 266
            android:background="@color/activity_bgcolor"
267 267
            android:cacheColorHint="@color/transparent"
268 268
            android:divider="@null"
@ -289,9 +289,6 @@
289 289
    </com.zhy.autolayout.AutoRelativeLayout>
290 290
291 291
292
293
294
295 292
    //底部tab布局
296 293
297 294
    <LinearLayout
@ -383,37 +380,36 @@
383 380
384 381
        <RelativeLayout
385 382
            android:id="@+id/ll_tab_find"
386
            android:layout_height="match_parent"
387 383
            android:layout_width="0px"
384
            android:layout_height="match_parent"
388 385
            android:layout_weight="1">
389 386
390 387
            <ImageView
391 388
                android:id="@+id/iv_find"
392 389
                android:layout_width="wrap_content"
393 390
                android:layout_height="wrap_content"
394
                android:src="@drawable/icon_main_find"
391
                android:layout_centerHorizontal="true"
395 392
                android:layout_marginTop="8dp"
396
                android:layout_centerHorizontal="true"/>
393
                android:src="@drawable/icon_main_find" />
397 394
398 395
            <ImageView
399 396
                android:id="@+id/iv_point"
400 397
                android:layout_width="wrap_content"
401 398
                android:layout_height="wrap_content"
402
                android:src="@drawable/icon_havemessage1201"
403
                android:visibility="gone"
399
                android:layout_alignTop="@+id/iv_find"
404 400
                android:layout_marginLeft="3dp"
405 401
                android:layout_toRightOf="@+id/iv_find"
406
                android:layout_alignTop="@+id/iv_find"/>
407
402
                android:src="@drawable/icon_havemessage1201"
403
                android:visibility="gone" />
408 404
409 405
410 406
            <TextView
411 407
                android:id="@+id/tv_find"
412 408
                android:layout_width="wrap_content"
413 409
                android:layout_height="wrap_content"
414
                android:layout_gravity="center_horizontal"
415 410
                android:layout_below="@+id/iv_find"
416 411
                android:layout_centerHorizontal="true"
412
                android:layout_gravity="center_horizontal"
417 413
                android:layout_marginTop="2dp"
418 414
                android:text="发现"
419 415
                android:textColor="@color/ui_64"
@ -422,7 +418,6 @@
422 418
        </RelativeLayout>
423 419
424 420
425
426 421
        <LinearLayout
427 422
            android:id="@+id/tab_me"
428 423
            android:layout_width="0dp"
@ -441,8 +436,8 @@
441 436
                    android:id="@+id/iv_our"
442 437
                    android:layout_width="wrap_content"
443 438
                    android:layout_height="wrap_content"
444
                    android:scaleType="centerInside"
445 439
                    android:layout_centerInParent="true"
440
                    android:scaleType="centerInside"
446 441
                    android:src="@drawable/icon_tab_main_me" />
447 442
448 443
                <TextView
@ -451,10 +446,10 @@
451 446
                    android:layout_height="wrap_content"
452 447
                    android:layout_toRightOf="@+id/iv_our"
453 448
                    android:background="@drawable/bg_smallred"
454
                    android:text="13"
455 449
                    android:gravity="center"
456
                    android:textSize="9sp"
450
                    android:text="13"
457 451
                    android:textColor="@color/white"
452
                    android:textSize="9sp"
458 453
                    android:visibility="gone" />
459 454
460 455
            </RelativeLayout>
@ -484,16 +479,15 @@
484 479
        android:orientation="vertical">
485 480
486 481
487
488 482
        <com.zhy.autolayout.AutoRelativeLayout
489 483
            android:id="@+id/rela_paopao"
490 484
            android:layout_width="match_parent"
491 485
            android:layout_height="wrap_content"
486
            android:animateLayoutChanges="true"
492 487
            android:background="@color/white"
488
            android:elevation="2dp"
493 489
            android:inAnimation="@anim/in"
494 490
            android:outAnimation="@anim/out"
495
            android:animateLayoutChanges="true"
496
            android:elevation="2dp"
497 491
            android:visibility="gone">
498 492
499 493
            <ImageView
@ -501,8 +495,8 @@
501 495
                android:layout_width="25dp"
502 496
                android:layout_height="wrap_content"
503 497
                android:layout_above="@+id/view_line"
504
                android:layout_alignParentRight="true"
505 498
                android:layout_alignTop="@+id/rela"
499
                android:layout_alignParentRight="true"
506 500
                android:layout_marginRight="5dp"
507 501
                android:drawablePadding="3dp"
508 502
                android:gravity="center_horizontal"
@ -522,8 +516,8 @@
522 516
                    android:layout_width="match_parent"
523 517
                    android:layout_height="wrap_content"
524 518
                    android:layout_marginLeft="15dp"
525
                    android:layout_marginRight="15dp"
526 519
                    android:layout_marginTop="12dp"
520
                    android:layout_marginRight="15dp"
527 521
                    android:layout_toLeftOf="@+id/tv_daohang"
528 522
                    android:ellipsize="end"
529 523
                    android:singleLine="true"
@ -535,32 +529,31 @@
535 529
                    android:id="@+id/rl_grade"
536 530
                    android:layout_width="wrap_content"
537 531
                    android:layout_height="wrap_content"
538
                    android:orientation="horizontal"
539 532
                    android:layout_below="@+id/detail_name"
540 533
                    android:layout_marginLeft="15dp"
541 534
                    android:layout_marginTop="10dp"
535
                    android:orientation="horizontal"
542 536
                    android:visibility="visible">
543 537
544 538
                    <ImageView
539
                        android:id="@+id/iv_grade"
545 540
                        android:layout_width="wrap_content"
546 541
                        android:layout_height="wrap_content"
547
                        android:paddingTop="2dp"
548
                        android:paddingBottom="2dp"
549 542
                        android:layout_alignParentLeft="true"
550
                        android:id="@+id/iv_grade" />
543
                        android:paddingTop="2dp"
544
                        android:paddingBottom="2dp" />
551 545
552 546
                    <TextView
553 547
                        android:id="@+id/tv_grade"
554 548
                        android:layout_width="wrap_content"
555 549
                        android:layout_height="wrap_content"
556
                        android:textColor="#ffa900"
557
                        android:textSize="14sp"
558
                        android:gravity="center"
559
                        android:layout_toRightOf="@+id/iv_grade"
560 550
                        android:layout_alignTop="@+id/iv_grade"
561 551
                        android:layout_alignBottom="@+id/iv_grade"
562
                        android:layout_marginLeft="15px"/>
563
552
                        android:layout_marginLeft="15px"
553
                        android:layout_toRightOf="@+id/iv_grade"
554
                        android:gravity="center"
555
                        android:textColor="#ffa900"
556
                        android:textSize="14sp" />
564 557
565 558
566 559
                </com.zhy.autolayout.AutoRelativeLayout>
@ -570,20 +563,20 @@
570 563
                    android:id="@+id/ll_kuaiman"
571 564
                    android:layout_width="match_parent"
572 565
                    android:layout_height="wrap_content"
573
                    android:layout_alignParentLeft="true"
574
                    android:layout_alignParentStart="true"
575 566
                    android:layout_below="@+id/rl_grade"
567
                    android:layout_alignParentStart="true"
568
                    android:layout_alignParentLeft="true"
576 569
                    android:layout_marginLeft="15dp"
577
                    android:layout_marginRight="15dp"
578 570
                    android:layout_marginTop="12dp"
571
                    android:layout_marginRight="15dp"
579 572
                    android:orientation="horizontal">
580 573
581 574
                    <TextView
582 575
                        android:id="@+id/tv_juli"
583 576
                        android:layout_width="wrap_content"
584 577
                        android:layout_height="wrap_content"
585
                        android:layout_alignParentRight="true"
586 578
                        android:layout_alignTop="@+id/tv_fastNum"
579
                        android:layout_alignParentRight="true"
587 580
                        android:text="共10个"
588 581
                        android:textAppearance="?android:attr/textAppearanceSmall"
589 582
                        android:textColor="@color/hintColor"
@ -642,19 +635,19 @@
642 635
                    android:id="@+id/relativeLayout2"
643 636
                    android:layout_width="match_parent"
644 637
                    android:layout_height="wrap_content"
645
                    android:layout_alignLeft="@+id/ll_kuaiman"
646
                    android:layout_alignStart="@+id/ll_kuaiman"
647 638
                    android:layout_below="@+id/b_fast"
648
                    android:layout_marginRight="15dp"
649
                    android:layout_marginTop="8dp">
639
                    android:layout_alignStart="@+id/ll_kuaiman"
640
                    android:layout_alignLeft="@+id/ll_kuaiman"
641
                    android:layout_marginTop="8dp"
642
                    android:layout_marginRight="15dp">
650 643
651 644
652 645
                    <ImageView
653 646
                        android:id="@+id/imageView9"
654 647
                        android:layout_width="wrap_content"
655 648
                        android:layout_height="wrap_content"
656
                        android:layout_alignParentLeft="true"
657 649
                        android:layout_alignParentStart="true"
650
                        android:layout_alignParentLeft="true"
658 651
                        android:layout_alignParentTop="true"
659 652
                        android:layout_marginTop="3dp"
660 653
                        android:src="@drawable/icon_paoqian1105" />
@ -733,9 +726,9 @@
733 726
                        android:id="@+id/textView28"
734 727
                        android:layout_width="wrap_content"
735 728
                        android:layout_height="wrap_content"
736
                        android:layout_alignLeft="@+id/textView27"
737
                        android:layout_alignStart="@+id/textView27"
738 729
                        android:layout_below="@+id/textView27"
730
                        android:layout_alignStart="@+id/textView27"
731
                        android:layout_alignLeft="@+id/textView27"
739 732
                        android:layout_marginTop="4dp"
740 733
                        android:ellipsize="end"
741 734
                        android:singleLine="true"
@ -748,8 +741,8 @@
748 741
                        android:id="@+id/tv_park"
749 742
                        android:layout_width="match_parent"
750 743
                        android:layout_height="wrap_content"
751
                        android:layout_alignLeft="@+id/tv_charge"
752 744
                        android:layout_alignStart="@+id/tv_charge"
745
                        android:layout_alignLeft="@+id/tv_charge"
753 746
                        android:layout_alignTop="@+id/textView28"
754 747
                        android:ellipsize="marquee"
755 748
                        android:marqueeRepeatLimit="marquee_forever"
@ -772,9 +765,9 @@
772 765
                    android:id="@+id/tv_address"
773 766
                    android:layout_width="wrap_content"
774 767
                    android:layout_height="wrap_content"
775
                    android:layout_alignLeft="@+id/relativeLayout2"
776
                    android:layout_alignStart="@+id/relativeLayout2"
777 768
                    android:layout_below="@+id/v32"
769
                    android:layout_alignStart="@+id/relativeLayout2"
770
                    android:layout_alignLeft="@+id/relativeLayout2"
778 771
                    android:layout_marginTop="14dp"
779 772
                    android:drawableLeft="@drawable/icon_costway0314"
780 773
                    android:drawablePadding="8dp"
@ -791,8 +784,8 @@
791 784
                    android:layout_alignTop="@+id/tv_address"
792 785
                    android:layout_marginLeft="8dp"
793 786
                    android:layout_toRightOf="@id/tv_address"
794
                    android:paddingRight="16dp"
795 787
                    android:ellipsize="end"
788
                    android:paddingRight="16dp"
796 789
                    android:singleLine="true"
797 790
                    android:text="国网电卡"
798 791
                    android:textColor="@color/lvse"
@ -802,8 +795,8 @@
802 795
                    android:id="@+id/tv_daohang"
803 796
                    android:layout_width="wrap_content"
804 797
                    android:layout_height="wrap_content"
805
                    android:layout_alignParentRight="true"
806 798
                    android:layout_alignTop="@+id/detail_name"
799
                    android:layout_alignParentRight="true"
807 800
                    android:layout_marginRight="15dp"
808 801
                    android:drawableLeft="@drawable/icon_daohang0314"
809 802
                    android:drawablePadding="6dp"
@ -818,8 +811,8 @@
818 811
                    android:layout_width="match_parent"
819 812
                    android:layout_height="234px"
820 813
                    android:layout_below="@+id/tv_address"
821
                    android:paddingTop="46px"
822 814
                    android:paddingLeft="44px"
815
                    android:paddingTop="46px"
823 816
                    android:paddingRight="44px"
824 817
                    android:scaleType="fitXY" />
825 818
@ -827,7 +820,6 @@
827 820
            </com.zhy.autolayout.AutoRelativeLayout>
828 821
829 822
830
831 823
            <View
832 824
                android:id="@+id/view_line"
833 825
                android:layout_width="fill_parent"
@ -859,8 +851,8 @@
859 851
                        android:drawableLeft="@drawable/icon_go0314"
860 852
                        android:drawablePadding="8dp"
861 853
                        android:gravity="center"
862
                        android:paddingBottom="5dp"
863 854
                        android:paddingTop="5dp"
855
                        android:paddingBottom="5dp"
864 856
                        android:text="去这里"
865 857
                        android:textColor="@color/title_row"
866 858
                        android:textSize="16sp"
@ -872,8 +864,8 @@
872 864
                    android:id="@+id/line_fenge1"
873 865
                    android:layout_width="0.5dp"
874 866
                    android:layout_height="match_parent"
875
                    android:layout_marginBottom="8dp"
876 867
                    android:layout_marginTop="8dp"
868
                    android:layout_marginBottom="8dp"
877 869
                    android:background="#c5c9ce"
878 870
                    android:visibility="gone" />
879 871
@ -891,8 +883,8 @@
891 883
                        android:drawableLeft="@drawable/icon_details0314"
892 884
                        android:drawablePadding="8dp"
893 885
                        android:gravity="center"
894
                        android:paddingBottom="5dp"
895 886
                        android:paddingTop="5dp"
887
                        android:paddingBottom="5dp"
896 888
                        android:text="详情"
897 889
                        android:textColor="@color/title_row"
898 890
                        android:textSize="16sp" />
@ -903,8 +895,8 @@
903 895
                    android:id="@+id/line_fenge"
904 896
                    android:layout_width="0.5dp"
905 897
                    android:layout_height="match_parent"
906
                    android:layout_marginBottom="8dp"
907 898
                    android:layout_marginTop="8dp"
899
                    android:layout_marginBottom="8dp"
908 900
                    android:background="#dddddd" />
909 901
910 902
                <com.zhy.autolayout.AutoRelativeLayout
@ -927,8 +919,8 @@
927 919
                            android:drawableLeft="@drawable/icon_comment0314"
928 920
                            android:drawablePadding="8dp"
929 921
                            android:gravity="center"
930
                            android:paddingBottom="5dp"
931 922
                            android:paddingTop="5dp"
923
                            android:paddingBottom="5dp"
932 924
                            android:text="评论"
933 925
                            android:textColor="@color/title_row"
934 926
                            android:textSize="16sp" />
@ -958,9 +950,10 @@
958 950
        android:id="@+id/window_ll_zhan"
959 951
        android:layout_width="match_parent"
960 952
        android:layout_height="wrap_content"
961
        android:background="@color/white"
962 953
        android:layout_alignParentBottom="true"
963
        android:visibility="gone">
954
        android:background="@color/white"
955
        android:visibility="gone"
956
        tools:visibility="gone">
964 957
965 958
        <LinearLayout
966 959
            android:layout_width="match_parent"
@ -971,140 +964,280 @@
971 964
            <View
972 965
                android:layout_width="match_parent"
973 966
                android:layout_height="0.5dp"
974
                android:background="#dddddd"/>
967
                android:background="#DCF4E3" />
975 968
969
            <android.support.constraint.ConstraintLayout
970
                android:id="@+id/iv_chat"
971
                android:layout_width="match_parent"
972
                android:layout_height="40dp">
976 973
977
                <RelativeLayout
974
                <TextView
978 975
                    android:layout_width="wrap_content"
979 976
                    android:layout_height="wrap_content"
977
                    android:layout_marginLeft="15dp"
978
                    android:text="在聊聊里分享你的用车与生活"
979
                    android:textColor="#00B536"
980
                    android:textSize="13sp"
981
                    app:layout_constraintBottom_toBottomOf="parent"
982
                    app:layout_constraintLeft_toLeftOf="parent"
983
                    app:layout_constraintTop_toTopOf="parent"></TextView>
984
985
                <ImageView
986
                    app:layout_constraintTop_toTopOf="parent"
987
                    app:layout_constraintRight_toRightOf="parent"
988
                    app:layout_constraintBottom_toBottomOf="parent"
980 989
                    android:layout_marginRight="20dp"
981
                    android:layout_marginLeft="20dp"
982
                    android:layout_marginTop="20dp">
990
                    android:src="@drawable/info_window_chat_cursor"
991
                    android:layout_width="wrap_content"
992
                    android:layout_height="wrap_content" />
993
            </android.support.constraint.ConstraintLayout>
983 994
984
                    <TextView
985
                        android:id="@+id/window_tv_zhan_name"
986
                        android:layout_width="match_parent"
995
            <View
996
                android:layout_width="match_parent"
997
                android:layout_height="0.5dp"
998
                android:background="#DCF4E3" />
999
1000
            <RelativeLayout
1001
                android:layout_width="wrap_content"
1002
                android:layout_height="wrap_content"
1003
                android:layout_marginLeft="15dp"
1004
                android:layout_marginTop="20dp"
1005
                android:layout_marginRight="15dp"
1006
                android:gravity="center_vertical">
1007
1008
                <TextView
1009
                    android:id="@+id/window_tv_zhan_name"
1010
                    android:layout_width="200dp"
1011
                    android:layout_height="wrap_content"
1012
                    android:layout_marginRight="6dp"
1013
                    android:ellipsize="end"
1014
                    android:gravity="left"
1015
                    android:singleLine="true"
1016
                    android:text=""
1017
                    android:textColor="@color/ui_62"
1018
                    android:textSize="18sp"
1019
                    tools:text="东方路希尔顿酒店充电站" />
1020
1021
                <LinearLayout
1022
                    android:layout_width="wrap_content"
1023
                    android:layout_height="wrap_content"
1024
                    android:layout_alignParentRight="true"
1025
                    android:layout_centerVertical="true"
1026
                    android:gravity="center_vertical">
1027
1028
                    <ImageView
1029
                        android:id="@+id/iv_red_paper_bag"
1030
                        android:layout_width="32dp"
987 1031
                        android:layout_height="wrap_content"
988
                        android:gravity="center"
989
                        android:singleLine="true"
990
                        android:ellipsize="end"
991
                        android:textSize="18sp"
992
                        android:textColor="@color/ui_62"
993
                        android:layout_toLeftOf="@+id/iv_guzhang"
994
                        android:layout_marginRight="6dp"
995
                        android:text="" />
1032
                        android:src="@drawable/red_pager_bag_icon"
1033
                        android:visibility="gone"
1034
                        tools:visibility="visible" />
996 1035
997 1036
                    <ImageView
998 1037
                        android:id="@+id/iv_guzhang"
999 1038
                        android:layout_width="32dp"
1000 1039
                        android:layout_height="wrap_content"
1001 1040
                        android:src="@drawable/icon_guzhang_window"
1002
                        android:layout_alignParentRight="true"
1003
                        android:layout_centerVertical="true"
1004
                        android:visibility="gone"/>
1041
                        android:visibility="gone"
1042
                        tools:visibility="visible" />
1005 1043
1006 1044
                    <ImageView
1007 1045
                        android:id="@+id/iv_is_cost"
1008 1046
                        android:layout_width="32dp"
1009 1047
                        android:layout_height="wrap_content"
1010 1048
                        android:src="@drawable/icon_is_cost"
1011
                        android:layout_alignParentRight="true"
1012
                        android:layout_centerVertical="true"
1013
                        android:visibility="gone"/>
1014
1015
                </RelativeLayout>
1049
                        android:visibility="gone"
1050
                        tools:visibility="visible" />
1051
                </LinearLayout>
1052
            </RelativeLayout>
1016 1053
1017
            <LinearLayout
1018
                android:layout_width="wrap_content"
1054
            <!-- 评分、充电次数、价格 -->
1055
            <android.support.constraint.ConstraintLayout
1056
                android:layout_width="match_parent"
1019 1057
                android:layout_height="wrap_content"
1020
                android:layout_marginTop="12dp"
1021
                android:orientation="horizontal"
1022
                android:layout_gravity="center_horizontal">
1058
                android:layout_marginLeft="15dp"
1059
                android:layout_marginTop="3dp"
1060
                android:layout_marginRight="15dp"
1061
                tools:background="#00f0f0">
1023 1062
1024 1063
                <LinearLayout
1025 1064
                    android:layout_width="wrap_content"
1026
                    android:layout_height="wrap_content">
1065
                    android:layout_height="wrap_content"
1066
                    android:gravity="center_vertical"
1067
                    android:orientation="horizontal"
1068
                    app:layout_constraintBottom_toBottomOf="parent"
1069
                    app:layout_constraintLeft_toLeftOf="parent"
1070
                    app:layout_constraintTop_toTopOf="parent">
1027 1071
1028
                    <ImageView
1029
                        android:id="@+id/window_iv_zhan_grade"
1072
                    <LinearLayout
1030 1073
                        android:layout_width="wrap_content"
1031
                        android:layout_height="wrap_content"
1032
                        android:src="@drawable/icon_5xing"
1033
                        android:visibility="gone"/>
1074
                        android:layout_height="wrap_content">
1075
1076
                        <ImageView
1077
                            android:id="@+id/window_iv_zhan_grade"
1078
                            android:layout_width="wrap_content"
1079
                            android:layout_height="wrap_content"
1080
                            android:src="@drawable/icon_5xing"
1081
                            android:visibility="gone"
1082
                            tools:visibility="visible" />
1083
1084
                        <TextView
1085
                            android:id="@+id/window_tv_zhan_grade"
1086
                            android:layout_width="wrap_content"
1087
                            android:layout_height="wrap_content"
1088
                            android:layout_marginLeft="6dp"
1089
                            android:text=""
1090
                            android:textColor="#505050"
1091
                            android:textSize="13sp"
1092
                            tools:text="3.8分" />
1093
1094
                    </LinearLayout>
1095
1096
                    <View
1097
                        android:id="@+id/window_tv_charge_record_cnt_line"
1098
                        android:layout_width="0.5dp"
1099
                        android:layout_height="12dp"
1100
                        android:layout_marginLeft="8dp"
1101
                        android:layout_marginRight="8dp"
1102
                        android:background="#d8d8d8" />
1034 1103
1035 1104
                    <TextView
1036
                        android:id="@+id/window_tv_zhan_grade"
1105
                        android:id="@+id/window_tv_charge_record_cnt"
1037 1106
                        android:layout_width="wrap_content"
1038 1107
                        android:layout_height="wrap_content"
1039
                        android:layout_gravity="center_vertical"
1040
                        android:drawablePadding="6dp"
1108
                        android:drawablePadding="5dp"
1041 1109
                        android:text=""
1110
                        android:textColor="#505050"
1042 1111
                        android:textSize="13sp"
1043
                        android:textColor="#ffa900"/>
1044
1112
                        tools:text="1k+次充电" />
1045 1113
                </LinearLayout>
1046 1114
1047
                <View
1048
                    android:layout_width="0.5dp"
1049
                    android:layout_height="14dp"
1050
                    android:background="#dddddd"
1051
                    android:layout_marginLeft="12dp"
1052
                    android:layout_marginRight="12dp"/>
1053
1054
                <TextView
1055
                    android:id="@+id/window_tv_zhan_distance"
1115
                <LinearLayout
1116
                    android:id="@+id/window_tv_zongjia_layout"
1056 1117
                    android:layout_width="wrap_content"
1057 1118
                    android:layout_height="wrap_content"
1058
                    android:textSize="13sp"
1059
                    android:textColor="@color/ui_68"
1060
                    android:drawableLeft="@drawable/icon_window_distance"
1061
                    android:drawablePadding="5dp"
1062
                    android:text=""/>
1119
                    app:layout_constraintBottom_toBottomOf="parent"
1120
                    app:layout_constraintRight_toRightOf="parent"
1121
                    app:layout_constraintTop_toTopOf="parent">
1122
1123
                    <TextView
1124
                        android:layout_width="wrap_content"
1125
                        android:layout_height="wrap_content"
1126
                        android:text="¥"
1127
                        android:textColor="#555557"
1128
                        android:textSize="12dp" />
1129
1130
                    <TextView
1131
                        android:id="@+id/window_tv_zongjia"
1132
                        android:layout_width="wrap_content"
1133
                        android:layout_height="wrap_content"
1134
                        android:textColor="#555557"
1135
                        android:textSize="20dp"
1136
                        tools:text="1.55" />
1137
1138
                    <TextView
1139
                        android:layout_width="wrap_content"
1140
                        android:layout_height="wrap_content"
1141
                        android:text="元/度"
1142
                        android:textColor="#555557"
1143
                        android:textSize="12dp" />
1144
                </LinearLayout>
1145
            </android.support.constraint.ConstraintLayout>
1146
            <!-- 标签 -->
1147
            <LinearLayout
1148
                android:layout_width="match_parent"
1149
                android:layout_height="wrap_content"
1150
                android:layout_marginTop="10dp"
1151
                android:paddingLeft="15dp"
1152
                android:paddingRight="15dp">
1063 1153
1154
                <TextView
1155
                    android:id="@+id/iv_label_public"
1156
                    android:layout_width="36dp"
1157
                    android:layout_height="18dp"
1158
                    android:background="@drawable/label_round_border"
1159
                    android:gravity="center"
1160
                    android:text="公共"
1161
                    android:textColor="#828282"
1162
                    android:textSize="11dp" />
1064 1163
1164
                <TextView
1165
                    android:id="@+id/iv_label_ground"
1166
                    android:layout_width="36dp"
1167
                    android:layout_height="18dp"
1168
                    android:layout_marginLeft="5dp"
1169
                    android:background="@drawable/label_round_border"
1170
                    android:gravity="center"
1171
                    android:text="地下"
1172
                    android:textColor="#828282"
1173
                    android:textSize="11dp" />
1174
1175
                <TextView
1176
                    android:id="@+id/iv_label_free_park"
1177
                    android:layout_width="65dp"
1178
                    android:layout_height="18dp"
1179
                    android:layout_marginLeft="5dp"
1180
                    android:background="@drawable/label_round_border"
1181
                    android:gravity="center"
1182
                    android:text="免费停车"
1183
                    android:textColor="#828282"
1184
                    android:textSize="11dp" />
1065 1185
            </LinearLayout>
1066 1186
1067 1187
            <TextView
1068 1188
                android:id="@+id/window_tv_zhan_cost"
1069 1189
                android:layout_width="wrap_content"
1070 1190
                android:layout_height="wrap_content"
1071
                android:layout_marginTop="12dp"
1072
                android:textSize="13sp"
1073
                android:textColor="@color/ui_65"
1191
                android:layout_marginLeft="15dp"
1192
                android:layout_marginTop="15dp"
1074 1193
                android:text=""
1075
                android:layout_gravity="center_horizontal"/>
1194
                android:textColor="@color/ui_62"
1195
                android:textSize="14sp"
1196
                tools:text="可使用本APP扫码支付" />
1197
1198
            <!-- 广告 -->
1199
            <ImageView
1200
                android:id="@+id/window_iv_ad"
1201
                android:layout_width="match_parent"
1202
                android:layout_height="65dp"
1203
                android:layout_marginLeft="15dp"
1204
                android:layout_marginTop="20dp"
1205
                android:layout_marginRight="15dp"
1206
                android:src="@color/background"
1207
                android:visibility="gone"
1208
                tools:visibility="visible" />
1076 1209
1077 1210
            <View
1078 1211
                android:layout_width="match_parent"
1079 1212
                android:layout_height="0.5dp"
1213
                android:layout_marginTop="10dp"
1080 1214
                android:background="#dddddd"
1081
                android:layout_marginTop="20dp"
1082
                android:layout_marginLeft="15dp"
1083
                android:layout_marginRight="15dp"/>
1215
                tools:background="#ff0000" />
1084 1216
1217
            <!-- 快充、慢充 -->
1085 1218
            <LinearLayout
1086 1219
                android:layout_width="match_parent"
1087
                android:layout_height="55dp"
1220
                android:layout_height="50dp"
1088 1221
                android:orientation="horizontal">
1089 1222
1090 1223
                <RelativeLayout
1091 1224
                    android:layout_width="0dp"
1092
                    android:layout_weight="1"
1093
                    android:layout_height="match_parent">
1225
                    android:layout_height="match_parent"
1226
                    android:layout_weight="1">
1094 1227
1095 1228
                    <LinearLayout
1096 1229
                        android:layout_width="wrap_content"
1097 1230
                        android:layout_height="wrap_content"
1098
                        android:orientation="horizontal"
1099
                        android:layout_centerInParent="true">
1231
                        android:layout_centerInParent="true"
1232
                        android:orientation="horizontal">
1100 1233
1101 1234
                        <TextView
1102 1235
                            android:layout_width="wrap_content"
1103 1236
                            android:layout_height="wrap_content"
1104 1237
                            android:layout_gravity="center"
1105
                            android:textSize="12sp"
1238
                            android:text="快充"
1106 1239
                            android:textColor="@color/ui_68"
1107
                            android:text="快充"/>
1240
                            android:textSize="12sp" />
1108 1241
1109 1242
                        <TextView
1110 1243
                            android:id="@+id/window_tv_fast_num"
@ -1112,9 +1245,9 @@
1112 1245
                            android:layout_height="wrap_content"
1113 1246
                            android:layout_gravity="center"
1114 1247
                            android:layout_marginLeft="13dp"
1115
                            android:textSize="21sp"
1248
                            android:text=""
1116 1249
                            android:textColor="@color/ui_62"
1117
                            android:text=""/>
1250
                            android:textSize="21sp" />
1118 1251
1119 1252
                        <TextView
1120 1253
                            android:id="@+id/window_tv_fastable"
@ -1122,10 +1255,10 @@
1122 1255
                            android:layout_height="wrap_content"
1123 1256
                            android:layout_gravity="center"
1124 1257
                            android:layout_marginLeft="24dp"
1125
                            android:textSize="12sp"
1126
                            android:textColor="@color/ui_68"
1127 1258
                            android:text="空闲"
1128
                            android:visibility="visible"/>
1259
                            android:textColor="@color/ui_68"
1260
                            android:textSize="12sp"
1261
                            android:visibility="visible" />
1129 1262
1130 1263
                        <TextView
1131 1264
                            android:id="@+id/window_tv_fastable_num"
@ -1133,10 +1266,10 @@
1133 1266
                            android:layout_height="wrap_content"
1134 1267
                            android:layout_gravity="center"
1135 1268
                            android:layout_marginLeft="13dp"
1136
                            android:textSize="21sp"
1137
                            android:textColor="@color/ui_62"
1138 1269
                            android:text=""
1139
                            android:visibility="visible"/>
1270
                            android:textColor="@color/ui_62"
1271
                            android:textSize="21sp"
1272
                            android:visibility="visible" />
1140 1273
1141 1274
1142 1275
                    </LinearLayout>
@ -1146,27 +1279,27 @@
1146 1279
                <View
1147 1280
                    android:layout_width="0.5dp"
1148 1281
                    android:layout_height="18dp"
1149
                    android:background="#dddddd"
1150
                    android:layout_gravity="center"/>
1282
                    android:layout_gravity="center"
1283
                    android:background="#dddddd" />
1151 1284
1152 1285
                <RelativeLayout
1153 1286
                    android:layout_width="0dp"
1154
                    android:layout_weight="1"
1155
                    android:layout_height="match_parent">
1287
                    android:layout_height="match_parent"
1288
                    android:layout_weight="1">
1156 1289
1157 1290
                    <LinearLayout
1158 1291
                        android:layout_width="wrap_content"
1159 1292
                        android:layout_height="wrap_content"
1160
                        android:orientation="horizontal"
1161
                        android:layout_centerInParent="true">
1293
                        android:layout_centerInParent="true"
1294
                        android:orientation="horizontal">
1162 1295
1163 1296
                        <TextView
1164 1297
                            android:layout_width="wrap_content"
1165 1298
                            android:layout_height="wrap_content"
1166 1299
                            android:layout_gravity="center"
1167
                            android:textSize="12sp"
1300
                            android:text="慢充"
1168 1301
                            android:textColor="@color/ui_68"
1169
                            android:text="慢充"/>
1302
                            android:textSize="12sp" />
1170 1303
1171 1304
                        <TextView
1172 1305
                            android:id="@+id/window_tv_slow_num"
@ -1174,9 +1307,9 @@
1174 1307
                            android:layout_height="wrap_content"
1175 1308
                            android:layout_gravity="center"
1176 1309
                            android:layout_marginLeft="13dp"
1177
                            android:textSize="21sp"
1310
                            android:text=""
1178 1311
                            android:textColor="@color/ui_62"
1179
                            android:text=""/>
1312
                            android:textSize="21sp" />
1180 1313
1181 1314
                        <TextView
1182 1315
                            android:id="@+id/window_tv_slowable"
@ -1184,10 +1317,10 @@
1184 1317
                            android:layout_height="wrap_content"
1185 1318
                            android:layout_gravity="center"
1186 1319
                            android:layout_marginLeft="24dp"
1187
                            android:textSize="12sp"
1188
                            android:textColor="@color/ui_68"
1189 1320
                            android:text="空闲"
1190
                            android:visibility="visible"/>
1321
                            android:textColor="@color/ui_68"
1322
                            android:textSize="12sp"
1323
                            android:visibility="visible" />
1191 1324
1192 1325
                        <TextView
1193 1326
                            android:id="@+id/window_tv_slowable_num"
@ -1195,10 +1328,10 @@
1195 1328
                            android:layout_height="wrap_content"
1196 1329
                            android:layout_gravity="center"
1197 1330
                            android:layout_marginLeft="13dp"
1198
                            android:textSize="21sp"
1199
                            android:textColor="@color/ui_62"
1200 1331
                            android:text=""
1201
                            android:visibility="visible"/>
1332
                            android:textColor="@color/ui_62"
1333
                            android:textSize="21sp"
1334
                            android:visibility="visible" />
1202 1335
1203 1336
1204 1337
                    </LinearLayout>
@ -1207,23 +1340,12 @@
1207 1340
1208 1341
            </LinearLayout>
1209 1342
1210
            <ImageView
1211
                android:id="@+id/window_iv_ad"
1212
                android:layout_width="match_parent"
1213
                android:layout_height="65dp"
1214
                android:layout_marginLeft="15dp"
1215
                android:layout_marginRight="15dp"
1216
                android:visibility="gone"
1217
                android:src="@color/background"/>
1218
1219 1343
            <View
1220
                android:id="@+id/window_view"
1221 1344
                android:layout_width="match_parent"
1222 1345
                android:layout_height="0.5dp"
1223
                android:layout_marginLeft="15dp"
1224
                android:layout_marginRight="15dp"
1225 1346
                android:background="#dddddd"
1226
                android:visibility="visible"/>
1347
                android:visibility="visible"
1348
                tools:background="#00ff00" />
1227 1349
1228 1350
            <LinearLayout
1229 1351
                android:layout_width="match_parent"
@ -1240,18 +1362,18 @@
1240 1362
                        android:layout_width="wrap_content"
1241 1363
                        android:layout_height="wrap_content"
1242 1364
                        android:layout_centerInParent="true"
1243
                        android:textSize="15sp"
1244
                        android:textColor="@color/ui_62"
1245 1365
                        android:drawableLeft="@drawable/icon_window_1"
1246 1366
                        android:drawablePadding="6dp"
1247
                        android:text="导航" />
1367
                        android:text="导航"
1368
                        android:textColor="@color/ui_62"
1369
                        android:textSize="15sp" />
1248 1370
                </RelativeLayout>
1249 1371
1250 1372
                <View
1251 1373
                    android:layout_width="0.5dp"
1252 1374
                    android:layout_height="18dp"
1253
                    android:background="#dddddd"
1254
                    android:layout_gravity="center_vertical"/>
1375
                    android:layout_gravity="center_vertical"
1376
                    android:background="#dddddd" />
1255 1377
1256 1378
                <RelativeLayout
1257 1379
                    android:id="@+id/window_rl_zhan_details"
@ -1263,18 +1385,18 @@
1263 1385
                        android:layout_width="wrap_content"
1264 1386
                        android:layout_height="wrap_content"
1265 1387
                        android:layout_centerInParent="true"
1266
                        android:textSize="15sp"
1267
                        android:textColor="@color/ui_62"
1268 1388
                        android:drawableLeft="@drawable/icon_window_2"
1269 1389
                        android:drawablePadding="6dp"
1270
                        android:text="详情" />
1390
                        android:text="详情"
1391
                        android:textColor="@color/ui_62"
1392
                        android:textSize="15sp" />
1271 1393
                </RelativeLayout>
1272 1394
1273 1395
                <View
1274 1396
                    android:layout_width="0.5dp"
1275 1397
                    android:layout_height="18dp"
1276
                    android:background="#dddddd"
1277
                    android:layout_gravity="center_vertical"/>
1398
                    android:layout_gravity="center_vertical"
1399
                    android:background="#dddddd" />
1278 1400
1279 1401
                <RelativeLayout
1280 1402
                    android:id="@+id/window_rl_comment"
@ -1287,11 +1409,11 @@
1287 1409
                        android:layout_width="wrap_content"
1288 1410
                        android:layout_height="wrap_content"
1289 1411
                        android:layout_centerInParent="true"
1290
                        android:textSize="15sp"
1291
                        android:textColor="@color/ui_62"
1292 1412
                        android:drawableLeft="@drawable/icon_window_3"
1293 1413
                        android:drawablePadding="6dp"
1294
                        android:text="评论(13)" />
1414
                        android:text="评论(13)"
1415
                        android:textColor="@color/ui_62"
1416
                        android:textSize="15sp" />
1295 1417
                </RelativeLayout>
1296 1418
1297 1419
            </LinearLayout>
@ -1302,11 +1424,9 @@
1302 1424
    </RelativeLayout>
1303 1425
1304 1426
1305
1306 1427
    <!--&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;-->
1307 1428
1308 1429
1309
1310 1430
    //弹出框占位布局
1311 1431
1312 1432
    <com.zhy.autolayout.AutoLinearLayout
@ -1326,9 +1446,9 @@
1326 1446
        android:id="@+id/tv_citynotice"
1327 1447
        android:layout_width="match_parent"
1328 1448
        android:layout_height="38dp"
1329
        android:layout_alignParentLeft="true"
1330
        android:layout_alignParentStart="true"
1331 1449
        android:layout_below="@+id/title_view"
1450
        android:layout_alignParentStart="true"
1451
        android:layout_alignParentLeft="true"
1332 1452
        android:background="@drawable/bg_notice1105"
1333 1453
        android:orientation="horizontal"
1334 1454
        android:visibility="gone">
@ -1354,37 +1474,37 @@
1354 1474
        android:id="@+id/ll_top_right"
1355 1475
        android:layout_width="match_parent"
1356 1476
        android:layout_height="wrap_content"
1357
        android:orientation="vertical"
1477
        android:layout_below="@+id/tv_notice"
1358 1478
        android:layout_marginTop="8dp"
1359
        android:layout_below="@+id/tv_notice">
1479
        android:orientation="vertical">
1360 1480
1361 1481
        <RelativeLayout
1362 1482
            android:id="@+id/rl_charging_notice"
1363 1483
            android:layout_width="match_parent"
1364 1484
            android:layout_height="wrap_content"
1365
            android:background="@drawable/bg_main_rectangle"
1366 1485
            android:layout_marginLeft="15dp"
1367 1486
            android:layout_marginRight="15dp"
1487
            android:background="@drawable/bg_main_rectangle"
1368 1488
            android:visibility="gone">
1369 1489
1370 1490
            <TextView
1371 1491
                android:layout_width="match_parent"
1372 1492
                android:layout_height="27dp"
1373
                android:text="您有一笔订单正在进行中,点击查看详情..."
1374 1493
                android:drawableLeft="@drawable/icon_main_order"
1375 1494
                android:drawablePadding="6dp"
1376 1495
                android:gravity="center_vertical"
1377 1496
                android:paddingLeft="8dp"
1378
                android:textSize="13sp"
1379
                android:textColor="@color/huimain"/>
1497
                android:text="您有一笔订单正在进行中,点击查看详情..."
1498
                android:textColor="@color/huimain"
1499
                android:textSize="13sp" />
1380 1500
1381 1501
            <ImageView
1382 1502
                android:layout_width="wrap_content"
1383 1503
                android:layout_height="wrap_content"
1384
                android:src="@drawable/icon_main_oreder_more"
1385 1504
                android:layout_alignParentRight="true"
1386 1505
                android:layout_centerVertical="true"
1387
                android:layout_marginRight="8dp"/>
1506
                android:layout_marginRight="8dp"
1507
                android:src="@drawable/icon_main_oreder_more" />
1388 1508
1389 1509
        </RelativeLayout>
1390 1510
@ -1401,19 +1521,19 @@
1401 1521
            android:id="@+id/iv_roadCondition"
1402 1522
            android:layout_width="wrap_content"
1403 1523
            android:layout_height="wrap_content"
1404
            android:src="@drawable/icon_wulukuang_main"
1405
            android:layout_marginTop="12dp"
1406 1524
            android:layout_gravity="right"
1407
            android:paddingRight="15dp"/>
1525
            android:layout_marginTop="12dp"
1526
            android:paddingRight="15dp"
1527
            android:src="@drawable/icon_wulukuang_main" />
1408 1528
1409 1529
        <ImageView
1410 1530
            android:id="@+id/iv_example"
1411 1531
            android:layout_width="wrap_content"
1412 1532
            android:layout_height="wrap_content"
1413
            android:src="@drawable/icon_example_main"
1414
            android:layout_marginTop="12dp"
1415 1533
            android:layout_gravity="right"
1416
            android:paddingRight="15dp"/>
1534
            android:layout_marginTop="12dp"
1535
            android:paddingRight="15dp"
1536
            android:src="@drawable/icon_example_main" />
1417 1537
1418 1538
    </LinearLayout>
1419 1539
@ -1421,8 +1541,9 @@
1421 1541
        android:id="@+id/rl_control"
1422 1542
        android:layout_width="match_parent"
1423 1543
        android:layout_height="wrap_content"
1424
        android:orientation="vertical"
1425
        android:layout_above="@+id/ll_open">
1544
        android:layout_above="@+id/ll_open"
1545
        android:layout_marginBottom="10dp"
1546
        android:orientation="vertical">
1426 1547
1427 1548
        <RelativeLayout
1428 1549
            android:layout_width="match_parent"
@ -1432,15 +1553,16 @@
1432 1553
                android:id="@+id/ll_map_control"
1433 1554
                android:layout_width="wrap_content"
1434 1555
                android:layout_height="wrap_content"
1435
                android:orientation="vertical">
1556
                android:orientation="vertical"
1557
                tools:visibility="gone">
1436 1558
1437 1559
                <LinearLayout
1438 1560
                    android:id="@+id/ll_inout"
1439 1561
                    android:layout_width="wrap_content"
1440 1562
                    android:layout_height="wrap_content"
1563
                    android:layout_alignParentLeft="true"
1441 1564
                    android:layout_alignParentTop="true"
1442 1565
                    android:layout_marginLeft="8dp"
1443
                    android:layout_alignParentLeft="true"
1444 1566
                    android:background="@drawable/bg_inandout"
1445 1567
                    android:orientation="vertical">
1446 1568
@ -1464,42 +1586,42 @@
1464 1586
                    android:layout_width="wrap_content"
1465 1587
                    android:layout_height="wrap_content"
1466 1588
                    android:layout_below="@+id/ll_inout"
1467
                    android:layout_alignParentLeft="true"
1468 1589
                    android:layout_alignParentStart="true"
1590
                    android:layout_alignParentLeft="true"
1591
                    android:layout_marginLeft="8dp"
1469 1592
                    android:layout_marginTop="12dp"
1470 1593
                    android:layout_marginBottom="30dp"
1471
                    android:layout_marginLeft="8dp"
1472 1594
                    android:background="@color/transparent"
1473 1595
                    android:contentDescription="@null"
1474 1596
                    android:src="@drawable/icon_location_map" />
1475 1597
1476 1598
1477
1478 1599
            </LinearLayout>
1479 1600
1480 1601
1481
1482 1602
            <ImageView
1483 1603
                android:id="@+id/iv_route"
1484 1604
                android:layout_width="wrap_content"
1485 1605
                android:layout_height="wrap_content"
1486 1606
                android:layout_alignParentTop="true"
1487
                android:layout_marginTop="30dp"
1488 1607
                android:layout_alignParentRight="true"
1608
                android:layout_marginTop="30dp"
1489 1609
                android:layout_marginRight="15dp"
1610
                android:src="@drawable/icon_map_route"
1490 1611
                android:visibility="visible"
1491
                android:src="@drawable/icon_map_route" />
1612
                tools:visibility="gone" />
1492 1613
1493 1614
            <ImageView
1494 1615
                android:id="@+id/iv_tuijian"
1495 1616
                android:layout_width="wrap_content"
1496 1617
                android:layout_height="wrap_content"
1497 1618
                android:layout_below="@+id/iv_route"
1498
                android:layout_marginTop="9dp"
1499 1619
                android:layout_alignParentRight="true"
1620
                android:layout_marginTop="9dp"
1500 1621
                android:layout_marginRight="15dp"
1622
                android:src="@drawable/icon_tuijian"
1501 1623
                android:visibility="visible"
1502
                android:src="@drawable/icon_tuijian" />
1624
                tools:visibility="gone" />
1503 1625
1504 1626
1505 1627
        </RelativeLayout>
@ -1508,32 +1630,32 @@
1508 1630
            android:id="@+id/rl_tuijian_tip"
1509 1631
            android:layout_width="match_parent"
1510 1632
            android:layout_height="44dp"
1511
            android:background="@color/white"
1512 1633
            android:layout_alignParentBottom="true"
1634
            android:background="@color/white"
1513 1635
            android:visibility="gone">
1514 1636
1515 1637
            <View
1516 1638
                android:layout_width="match_parent"
1517 1639
                android:layout_height="0.5dp"
1518
                android:background="@color/ui_6d"
1519
                android:layout_alignParentTop="true"/>
1640
                android:layout_alignParentTop="true"
1641
                android:background="@color/ui_6d" />
1520 1642
1521 1643
            <TextView
1522 1644
                android:layout_width="wrap_content"
1523 1645
                android:layout_height="wrap_content"
1524
                android:textSize="14sp"
1525
                android:textColor="@color/ui_62"
1526 1646
                android:layout_centerInParent="true"
1527
                android:text="点击查看智能推荐结果"/>
1647
                android:text="点击查看智能推荐结果"
1648
                android:textColor="@color/ui_62"
1649
                android:textSize="14sp" />
1528 1650
1529 1651
            <ImageView
1530 1652
                android:id="@+id/iv_tuijian_tip_close"
1531 1653
                android:layout_width="wrap_content"
1532 1654
                android:layout_height="wrap_content"
1533
                android:layout_centerVertical="true"
1534 1655
                android:layout_alignParentRight="true"
1656
                android:layout_centerVertical="true"
1535 1657
                android:layout_marginRight="15dp"
1536
                android:src="@drawable/icon_tuijian_tip_close"/>
1658
                android:src="@drawable/icon_tuijian_tip_close" />
1537 1659
1538 1660
1539 1661
        </RelativeLayout>
@ -1542,6 +1664,7 @@
1542 1664
    </LinearLayout>
1543 1665
1544 1666
    //首页弹出广告布局
1667
1545 1668
    <com.zhy.autolayout.AutoRelativeLayout
1546 1669
        android:id="@+id/rl_ad"
1547 1670
        android:layout_width="match_parent"
@ -1564,27 +1687,27 @@
1564 1687
            android:id="@+id/imageView8"
1565 1688
            android:layout_width="297dp"
1566 1689
            android:layout_height="396dp"
1567
            android:layout_centerHorizontal="true"
1568 1690
            android:layout_alignParentTop="true"
1691
            android:layout_centerHorizontal="true"
1569 1692
            android:layout_gravity="center"
1570
            android:scaleType="fitXY"
1571
            android:layout_marginTop="105dp"/>
1693
            android:layout_marginTop="105dp"
1694
            android:scaleType="fitXY" />
1572 1695
1573 1696
    </com.zhy.autolayout.AutoRelativeLayout>
1574 1697
1575 1698
1576 1699
    <ImageView
1700
        android:id="@+id/iv_yindaoye"
1577 1701
        android:layout_width="match_parent"
1578 1702
        android:layout_height="match_parent"
1579
        android:id="@+id/iv_yindaoye"
1580
        android:visibility="gone"/>
1703
        android:visibility="gone" />
1581 1704
1582 1705
    <LinearLayout
1583 1706
        android:id="@+id/ll_tuijian"
1584 1707
        android:layout_width="match_parent"
1585 1708
        android:layout_height="wrap_content"
1586
        android:background="@color/transparent"
1587 1709
        android:layout_above="@+id/ll_tab"
1710
        android:background="@color/transparent"
1588 1711
        android:orientation="vertical"
1589 1712
        android:visibility="gone">
1590 1713
@ -1598,8 +1721,8 @@
1598 1721
                android:layout_height="wrap_content"
1599 1722
                android:layout_alignParentTop="true"
1600 1723
                android:layout_alignParentRight="true"
1601
                android:src="@drawable/icon_tuijian_close"
1602
                android:layout_marginRight="12dp"/>
1724
                android:layout_marginRight="12dp"
1725
                android:src="@drawable/icon_tuijian_close" />
1603 1726
1604 1727
1605 1728
        </RelativeLayout>
@ -1617,16 +1740,11 @@
1617 1740
            android:layout_width="match_parent"
1618 1741
            android:layout_height="110dp"
1619 1742
            android:background="@color/white"
1620
            android:text=""
1621 1743
            android:gravity="center"
1744
            android:text=""
1622 1745
            android:textColor="@color/ui_68"
1623 1746
            android:textSize="13sp"
1624
            android:visibility="gone"/>
1625
1626
1627
1628
1629
1747
            android:visibility="gone" />
1630 1748
1631 1749
1632 1750
        <RelativeLayout
@ -1643,29 +1761,26 @@
1643 1761
                <TextView
1644 1762
                    android:layout_width="wrap_content"
1645 1763
                    android:layout_height="wrap_content"
1646
                    android:textSize="14sp"
1647
                    android:textColor="#555555"
1648 1764
                    android:gravity="center_horizontal"
1649
                    android:text="对智能推荐的结果满意吗," />
1765
                    android:text="对智能推荐的结果满意吗,"
1766
                    android:textColor="#555555"
1767
                    android:textSize="14sp" />
1650 1768
1651 1769
                <TextView
1652 1770
                    android:id="@+id/tv_tuijian_feedback"
1653 1771
                    android:layout_width="wrap_content"
1654 1772
                    android:layout_height="wrap_content"
1655
                    android:textSize="14sp"
1656
                    android:textColor="#2883ff"
1657 1773
                    android:gravity="center_horizontal"
1658
                    android:text="点击这里反馈" />
1774
                    android:text="点击这里反馈"
1775
                    android:textColor="#2883ff"
1776
                    android:textSize="14sp" />
1659 1777
1660 1778
1661 1779
            </LinearLayout>
1662 1780
        </RelativeLayout>
1663 1781
1664 1782
1665
1666 1783
    </LinearLayout>
1667 1784
1668 1785
1669
1670
1671 1786
</RelativeLayout>

+ 2 - 6
app/src/main/res/layout/custom_info_window.xml

@ -8,6 +8,7 @@
8 8
    android:layout_marginRight="20dp">
9 9
10 10
    <LinearLayout
11
        android:id="@+id/infoWindowNavigate"
11 12
        android:layout_width="wrap_content"
12 13
        android:layout_height="40dp"
13 14
        android:gravity="center"
@ -31,17 +32,12 @@
31 32
            android:layout_marginRight="5dp"
32 33
            android:background="@color/white" />
33 34
34
        <ImageView
35
            android:layout_width="wrap_content"
36
            android:layout_height="wrap_content"
37
            android:layout_marginRight="2dp"
38
            android:src="@drawable/navigation_white_icon" />
39
40 35
        <TextView
41 36
            android:layout_width="wrap_content"
42 37
            android:layout_height="wrap_content"
43 38
            android:text="导航"
44 39
            android:textColor="@color/white"
40
            android:drawableLeft="@drawable/navigation_white_icon"
45 41
            android:textSize="13dp" />
46 42
    </LinearLayout>
47 43
</android.support.constraint.ConstraintLayout>