Bladeren bron

首页气泡弹窗,聊聊入口隐藏

huyuguo 5 jaren geleden
bovenliggende
commit
1354e6e3de

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

1241
        windowLabelPublic = findViewById(R.id.iv_label_public);
1241
        windowLabelPublic = findViewById(R.id.iv_label_public);
1242
        windowLabelGround = findViewById(R.id.iv_label_ground);
1242
        windowLabelGround = findViewById(R.id.iv_label_ground);
1243
        windowLabelFreePark = findViewById(R.id.iv_label_free_park);
1243
        windowLabelFreePark = findViewById(R.id.iv_label_free_park);
1244
        windowChat = findViewById(R.id.iv_chat);
1244
//        windowChat = findViewById(R.id.iv_chat);
1245
1245
1246
        windowGo = (RelativeLayout) findViewById(R.id.window_rl_go);
1246
        windowGo = (RelativeLayout) findViewById(R.id.window_rl_go);
1247
        windowZhanDetails = (RelativeLayout) findViewById(R.id.window_rl_zhan_details);
1247
        windowZhanDetails = (RelativeLayout) findViewById(R.id.window_rl_zhan_details);
1336
            }
1336
            }
1337
        });
1337
        });
1338
1338
1339
        // add by hyg 点击跳转到聊聊
1340
        windowChat.setOnClickListener(new View.OnClickListener() {
1341
            @Override
1342
            public void onClick(View view) {
1343
                if (socket != null) {
1344
                    try {
1345
                        socket.close();
1346
                    } catch (IOException e) {
1347
                        e.printStackTrace();
1348
                    }
1349
                }
1350
                MobclickAgent.onEvent(getApplicationContext(), "1121");
1351
                Intent i = new Intent(getApplication(), ChatActivity.class);//聊聊页面
1352
                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1353
                startActivity(i);
1354
                overridePendingTransition(0, 0);
1355
                if (count == 1) {
1356
1357
                    count = 2;
1358
                }
1359
                MobclickAgent.onEvent(getApplicationContext(), "0999");
1360
                windowLayout.setVisibility(View.GONE);
1361
1362
1363
                rl_control.setVisibility(View.VISIBLE);
1364
                if (nMarker != null) {
1365
                    nMarker.hideInfoWindow();
1366
                    MarkerOptions markerOptionss = new MarkerOptions();
1367
                    if (current_chargePoint.getOwn_pay().equals("1")) {
1368
                        nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker1));
1369
                    } else {
1370
                        if (current_chargePoint.getSuit_car().equals("特斯拉")) {
1371
                            nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1372
                        } else {
1373
                            if (WelcomeActivity.canCost.contains(current_chargePoint.getSupplier())) {
1374
                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker2));
1375
                            } else {
1376
                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1377
                            }
1378
                        }
1379
                    }
1380
                }
1381
1382
            }
1383
        });
1339
        // add by hyg 点击跳转到聊聊 隐藏该功能
1340
//        windowChat.setOnClickListener(new View.OnClickListener() {
1341
//            @Override
1342
//            public void onClick(View view) {
1343
//                if (socket != null) {
1344
//                    try {
1345
//                        socket.close();
1346
//                    } catch (IOException e) {
1347
//                        e.printStackTrace();
1348
//                    }
1349
//                }
1350
//                MobclickAgent.onEvent(getApplicationContext(), "1121");
1351
//                Intent i = new Intent(getApplication(), ChatActivity.class);//聊聊页面
1352
//                i.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
1353
//                startActivity(i);
1354
//                overridePendingTransition(0, 0);
1355
//                if (count == 1) {
1356
//
1357
//                    count = 2;
1358
//                }
1359
//                MobclickAgent.onEvent(getApplicationContext(), "0999");
1360
//                windowLayout.setVisibility(View.GONE);
1361
//
1362
//
1363
//                rl_control.setVisibility(View.VISIBLE);
1364
//                if (nMarker != null) {
1365
//                    nMarker.hideInfoWindow();
1366
//                    MarkerOptions markerOptionss = new MarkerOptions();
1367
//                    if (current_chargePoint.getOwn_pay().equals("1")) {
1368
//                        nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker1));
1369
//                    } else {
1370
//                        if (current_chargePoint.getSuit_car().equals("特斯拉")) {
1371
//                            nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1372
//                        } else {
1373
//                            if (WelcomeActivity.canCost.contains(current_chargePoint.getSupplier())) {
1374
//                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker2));
1375
//                            } else {
1376
//                                nMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_newmarker3));
1377
//                            }
1378
//                        }
1379
//                    }
1380
//                }
1381
//
1382
//            }
1383
//        });
1384
1384
1385
1385
1386
        tv_sortDistance = (TextView) findViewById(R.id.tv_sortDistance);
1386
        tv_sortDistance = (TextView) findViewById(R.id.tv_sortDistance);

+ 6 - 3
app/src/main/res/layout/activity_main_map.xml

960
            android:layout_height="wrap_content"
960
            android:layout_height="wrap_content"
961
            android:orientation="vertical"
961
            android:orientation="vertical"
962
            tools:visibility="visible">
962
            tools:visibility="visible">
963
964
            <View
963
            <View
965
                android:layout_width="match_parent"
964
                android:layout_width="match_parent"
966
                android:layout_height="0.5dp"
965
                android:layout_height="0.5dp"
966
                android:background="#dddddd"/>
967
968
            <!--<View
969
                android:layout_width="match_parent"
970
                android:layout_height="0.5dp"
967
                android:background="#DCF4E3" />
971
                android:background="#DCF4E3" />
968
972
969
            <android.support.constraint.ConstraintLayout
973
            <android.support.constraint.ConstraintLayout
991
                    app:layout_constraintRight_toRightOf="parent"
995
                    app:layout_constraintRight_toRightOf="parent"
992
                    app:layout_constraintTop_toTopOf="parent" />
996
                    app:layout_constraintTop_toTopOf="parent" />
993
            </android.support.constraint.ConstraintLayout>
997
            </android.support.constraint.ConstraintLayout>
994
995
            <View
998
            <View
996
                android:layout_width="match_parent"
999
                android:layout_width="match_parent"
997
                android:layout_height="0.5dp"
1000
                android:layout_height="0.5dp"
998
                android:background="#DCF4E3" />
1001
                android:background="#DCF4E3" />-->
999
1002
1000
            <RelativeLayout
1003
            <RelativeLayout
1001
                android:layout_width="wrap_content"
1004
                android:layout_width="wrap_content"