Explorar el Código

信息错误修改完成

huyuguo %!s(int64=4) %!d(string=hace) años
padre
commit
5bf0afbc17

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

@ -90,8 +90,6 @@ public class AlbumActivityAlter extends Activity {
90 90
    private class AlbumSendListener implements OnClickListener {
91 91
        public void onClick(View v) {
92 92
            overridePendingTransition(R.anim.activity_translate_in, R.anim.activity_translate_out);
93
//            intent.setClass(AlbumActivityAlter.this, AlterOneActivity.class);
94
//            startActivity(intent);
95 93
            finish();
96 94
        }
97 95
@ -108,15 +106,11 @@ public class AlbumActivityAlter extends Activity {
108 106
    // 取消按钮的监听
109 107
    private class CancelListener implements OnClickListener {
110 108
        public void onClick(View v) {
111
//            Bimp.tempSelectBitmap.clear();
112
//            intent.setClass(AlbumActivityAlter.this, AlterOneActivity.class);
113
//            startActivity(intent);
114 109
            AlbumHelper.bucketList.clear();
115 110
            finish();
116 111
        }
117 112
    }
118 113
119
120 114
    // 初始化,给一些对象赋值
121 115
    private void init() {
122 116
        helper = AlbumHelper.getHelper();

+ 0 - 3
app/src/main/java/com/electric/chargingpile/activity/AlbumActivityCharging.java

@ -107,9 +107,6 @@ public class AlbumActivityCharging extends Activity {
107 107
    // 取消按钮的监听
108 108
    private class CancelListener implements OnClickListener {
109 109
        public void onClick(View v) {
110
//            Bimp.tempSelectBitmap.clear();
111
//            intent.setClass(AlbumActivityAlter.this, AlterOneActivity.class);
112
//            startActivity(intent);
113 110
            AlbumHelper.bucketList.clear();
114 111
            finish();
115 112
        }

+ 0 - 3
app/src/main/java/com/electric/chargingpile/activity/AlbumActivityComment.java

@ -113,9 +113,6 @@ public class AlbumActivityComment extends Activity {
113 113
    // 取消按钮的监听
114 114
    private class CancelListener implements OnClickListener {
115 115
        public void onClick(View v) {
116
//            Bimp.tempSelectBitmap.clear();
117
//            intent.setClass(AlbumActivityAlter.this, AlterOneActivity.class);
118
//            startActivity(intent);
119 116
            AlbumHelper.bucketList.clear();
120 117
            finish();
121 118
        }

+ 0 - 3
app/src/main/java/com/electric/chargingpile/activity/AlbumActivityFeedback.java

@ -111,9 +111,6 @@ public class AlbumActivityFeedback extends Activity {
111 111
    // 取消按钮的监听
112 112
    private class CancelListener implements View.OnClickListener {
113 113
        public void onClick(View v) {
114
//            Bimp.tempSelectBitmap.clear();
115
//            intent.setClass(AlbumActivityAlter.this, AlterOneActivity.class);
116
//            startActivity(intent);
117 114
            AlbumHelper.bucketList.clear();
118 115
            finish();
119 116
        }

+ 22 - 64
app/src/main/java/com/electric/chargingpile/activity/AlterOneActivity.java

@ -49,6 +49,7 @@ import com.electric.chargingpile.data.Zhan;
49 49
import com.electric.chargingpile.util.BarColorUtil;
50 50
import com.electric.chargingpile.util.Bimp;
51 51
import com.electric.chargingpile.util.DES3;
52
import com.electric.chargingpile.util.FileUtils;
52 53
import com.electric.chargingpile.util.ImageItem;
53 54
import com.electric.chargingpile.util.ImageUtils;
54 55
import com.electric.chargingpile.util.PublicWay;
@ -63,6 +64,10 @@ import com.google.android.gms.appindexing.AppIndex;
63 64
import com.google.android.gms.appindexing.Thing;
64 65
import com.google.android.gms.common.api.GoogleApiClient;
65 66
import com.umeng.analytics.MobclickAgent;
67
import com.zhihu.matisse.Matisse;
68
import com.zhihu.matisse.MimeType;
69
import com.zhihu.matisse.engine.impl.GlideEngine;
70
import com.zhihu.matisse.internal.entity.CaptureStrategy;
66 71

67 72
import org.json.JSONException;
68 73
import org.json.JSONObject;
@ -139,8 +144,9 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
139 144
    private final int REQUEST_CAMERA_PERMISSION_CODE = 100;
140 145
    private ProgressDialog insertDialog;
141 146
    private AlertDialogTwo alertDialogTwo;
142

143 147
    private static final int RC_ALBUM_PERM = 123;
148
    public static final int REQUEST_CODE_CHOOSE = 340;
149

144 150
    Handler handler = new Handler() {
145 151
        public void handleMessage(Message msg) {
146 152
            switch (msg.what) {
@ -161,47 +167,8 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
161 167
                        String rtnMsg = jsonObject.getString("rtnMsg");
162 168
                        if (rtnCode.equals("01")) {
163 169
                            dismissDialog();
164
//                            point.setVisibility(View.VISIBLE);
165
//                            point.startAnimation(animation);
166
//                            new Handler().postDelayed(new Runnable() {
167
//                                public void run() {
168
//                                    point.setVisibility(View.GONE);
169
//                                }
170
//                            }, 1000);
171
////							Toast.makeText(FeedbackActivity.this, "感谢您的反馈,祝您生活愉快", Toast.LENGTH_SHORT)
172
////									.show();
173
////							userGrowUp();
174
////                            etFeedback.setText("");
175
//                            new Handler().postDelayed(new Runnable() {
176
//                                public void run() {
177
//                                    finish();
178
//                                }
179
//                            }, 1500);
180

181
//                            userGrowUp();
182

183
//                            new com.electric.chargingpile.view.AlertDialog(AlterOneActivity.this).builder()
184
//                                    .setMsg()
185
//                                    .setNegativeButton("关闭", new View.OnClickListener() {
186
//                                        @Override
187
//                                        public void onClick(View v) {
188
//                                            startActivity(new Intent(AlterOneActivity.this, MainActicity.class));
189
//                                            finish();
190
//                                        }
191
//                                    }).show();
192

193

194 170
                            Toast.makeText(AlterOneActivity.this, "感谢您的纠错,我们会尽快审核您提供的充电站信息", Toast.LENGTH_SHORT).show();
195
//                            for(int i=0;i<PublicWay.activityList.size();i++){
196
//                                if (null != PublicWay.activityList.get(i)) {
197
////                                   Bimp.tempSelectBitmap.
198
////                                    PublicWay.activityList.get(i).
199
////                                    Bimp.tempSelectBitmap.remove(i);
200
//                                }
201
//                            }
202
////                            Bimp.tempSelectBitmap.re;
203 171
                            finish();
204

205 172
                        } else {
206 173
                            dismissDialog();
207 174
                            Toast.makeText(AlterOneActivity.this, "失败提交", Toast.LENGTH_SHORT).show();
@ -308,7 +275,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
308 275
                        AlbumActivityAlter.class);
309 276
                startActivity(intent);
310 277
                overridePendingTransition(R.anim.activity_translate_in, R.anim.activity_translate_out);
311
//                startActivityForResult(intent, 1);
312 278
                pop.dismiss();
313 279
                ll_popup.clearAnimation();
314 280
            }
@ -348,16 +314,14 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
348 314
     * 调用图库选择
349 315
     */
350 316
    private void callGallery() {
351
        Log.e(TAG, "callGallery: " + (Bimp.max - Bimp.tempSelectBitmap.size()));
352
        //调用第三方图库选择
353
        PhotoPicker.builder()
354
                .setPhotoCount(PIC_NUM - Bimp.tempSelectBitmap.size())//可选择图片数量
355
                .setShowCamera(true)//是否显示拍照按钮
356
                .setShowGif(true)//是否显示动态图
357
                .setPreviewEnabled(true)//是否可以预览
358
                .start(this, PhotoPicker.REQUEST_CODE);
359

360

317
        Matisse.from(AlterOneActivity.this)
318
                .choose(MimeType.of(MimeType.JPEG, MimeType.PNG, MimeType.GIF))
319
                .countable(true)
320
                .maxSelectable(PIC_NUM - Bimp.tempSelectBitmap.size())
321
                .capture(true)
322
                .captureStrategy(new CaptureStrategy(true, "com.electric.chargingpile.provider"))
323
                .imageEngine(new GlideEngine())
324
                .forResult(REQUEST_CODE_CHOOSE);
361 325
    }
362 326

363 327
    @Override
@ -367,7 +331,7 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
367 331
            if (data != null) {
368 332
                if (requestCode == 1) {
369 333
                    //处理调用系统图库
370
                } else if (requestCode == PhotoPicker.REQUEST_CODE) {
334
                } else if (requestCode == REQUEST_CODE_CHOOSE) {
371 335
                    //异步方式插入图片
372 336
                    insertImagesSync(data);
373 337
                }
@ -387,22 +351,16 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
387 351
                    @Override
388 352
                    public ObservableSource<Boolean> apply(Intent intent) throws Exception {
389 353
                        try {
390
                            ArrayList<String> photos = data.getStringArrayListExtra(PhotoPicker.KEY_SELECTED_PHOTOS);
391
                            //可以同时插入多张图片
392
                            for (String imagePath : photos) {
393

394
                                Log.e(TAG, "call: imagePath " + imagePath);
395
                                Bitmap bitmap = BitmapFactory.decodeFile(imagePath);//压缩图片
396
                                if (ImageUtils.readPictureDegree(imagePath) != 0) {
397
                                    bitmap = imageZoom(ImageUtils.toturn(bitmap));
398
                                } else {
399
                                    bitmap = imageZoom(bitmap);
400
                                }
401 354

355
                            List<Uri> uriList = Matisse.obtainResult(data);
356
                            for (Uri uri: uriList) {
357
                                Bitmap bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri));
358
                                File file = FileUtils.from(AlterOneActivity.this, uri);
402 359

360
                                bitmap = FileUtils.rotateIfRequired(file, bitmap);
361
                                bitmap = imageZoom(bitmap);
403 362
                                ImageItem takePhoto = new ImageItem();
404 363
                                takePhoto.setBitmap(bitmap);
405
                                takePhoto.setImagePath(imagePath);
406 364
                                Bimp.tempSelectBitmap.add(takePhoto);
407 365
                            }
408 366
                            return Observable.just(true);

+ 0 - 244
app/src/main/java/com/electric/chargingpile/activity/AlterTwoActivity.java

@ -337,21 +337,7 @@ public class AlterTwoActivity extends Activity implements
337 337
338 338
    @Override
339 339
    public void onClick(View v) {
340
//        this.mapStatus = this.mBaiduMap.getMapStatus();
341 340
        switch (v.getId()) {
342
//            case R.id.iv_alter:
343
//                if (!isFirstLoc) {
344
//                    isFirstLoc = true;
345
//                   // Toast.makeText(this,"正在定位当前位置...",Toast.LENGTH_LONG);
346
//                    mCurrentMode = LocationMode.NORMAL;
347
//                    mBaiduMap
348
//                            .setMyLocationConfigeration(new MyLocationConfiguration(
349
//                                    mCurrentMode, true, mCurrentMarker));
350
//                    mBaiduMap.setMyLocationEnabled(true);
351
//                    Toast.makeText(this, "正在定位当前位置...", Toast.LENGTH_SHORT);
352
//                    mLocClient.start();
353
//                }
354
//                break;
355 341
            case R.id.iv_back:
356 342
                finish();
357 343
                break;
@ -359,14 +345,6 @@ public class AlterTwoActivity extends Activity implements
359 345
                startActivity(new Intent(this, AlterOneActivity.class));
360 346
                break;
361 347
            case R.id.tv_submit:
362
//                tv_submit.setEnabled(false);
363
//               if (tv_submit.isEnabled() == false){
364
//                   Toast.makeText(AlterTwoActivity.this,"不可点击",Toast.LENGTH_SHORT).show();
365
//               }
366
//                if(et_remark.getText().toString().equals("")){
367
//                    showTextToast("请确认是否填写信息");
368
////                    Toast.makeText(AlterTwoActivity.this,"请确认是否填写信息",Toast.LENGTH_SHORT).show();
369
//                }else {
370 348
                createDialog();
371 349
                new Thread(new Runnable() {
372 350
                    @Override
@ -374,7 +352,6 @@ public class AlterTwoActivity extends Activity implements
374 352
                        submit();
375 353
                    }
376 354
                }).start();
377
//                }
378 355
                break;
379 356
380 357
            case R.id.zoomin1:
@ -388,7 +365,6 @@ public class AlterTwoActivity extends Activity implements
388 365
389 366
            case R.id.ib_location:
390 367
                if (!isFirstLoc) {
391
//                    isFirstLoc = true;
392 368
                    aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
393 369
                    // 设置定位的类型为定位模式 ,可以由定位、跟随或地图根据面向方向旋转几种
394 370
                    aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
@ -396,49 +372,7 @@ public class AlterTwoActivity extends Activity implements
396 372
                    aMap.moveCamera(CameraUpdateFactory.zoomTo(16));
397 373
                    mlocationClient.startLocation();
398 374
                }
399
//                if (!isFirstLoc) {
400
//                    isFirstLoc = true;
401
////                    tvLocation.setText("正在定位中...");
402
//                    mCurrentMode = LocationMode.NORMAL;
403
//                    MyLocationData locCenter = mBaiduMap.getLocationData();
404
//                    if (locCenter != null) {
405
////                            mBaiduMap.clear();
406
//                        selectedCenter = new LatLng(locCenter.latitude,
407
//                                locCenter.longitude);
408
//
409
////                        mBaiduMap.addOverlay(new MarkerOptions().position(center).icon(
410
////                                BitmapDescriptorFactory
411
////                                        .fromResource(R.drawable.position_icon)));
412
//                    } else {
413
//                        return;
414
//                    }
415
//
416
//
417
//                    mBaiduMap
418
//                            .setMyLocationConfigeration(new MyLocationConfiguration(
419
//                                    mCurrentMode, true, mCurrentMarker));
420
//                    mBaiduMap.setMapStatus(MapStatusUpdateFactory
421
//                            .newMapStatus(new MapStatus.Builder().zoom(15f).build()));
422
//                    mBaiduMap.setMyLocationEnabled(true);
423
//                    mLocClient.start();
424
//                }
425 375
                break;
426
427
//            case R.id.icon_jia:
428
//                this.mBaiduMap.setMapStatus(MapStatusUpdateFactory
429
//                        .zoomTo(mapStatus.zoom + 1));
430
//                controlZoomShow();
431
//                getPoint();
432
////                Toast.makeText(ShareChargingpileActicity.this,"+",Toast.LENGTH_SHORT).show();
433
//                break;
434
//
435
//            case R.id.icon_jian:
436
//                mBaiduMap.setMapStatus(MapStatusUpdateFactory
437
//                        .zoomTo(mapStatus.zoom - 1));
438
//                controlZoomShow();
439
//                getPoint();
440
////                Toast.makeText(ShareChargingpileActicity.this,"-",Toast.LENGTH_SHORT).show();
441
//                break;
442 376
            case R.id.tv_three_other:
443 377
                if (TextUtils.isEmpty(location)) {
444 378
                    Toast.makeText(this, "正在获取您的位置信息", Toast.LENGTH_SHORT).show();
@ -455,8 +389,6 @@ public class AlterTwoActivity extends Activity implements
455 389
            if (zoom >= maxZoomLevel) {
456 390
                inBtn.setImageResource(R.drawable.icon_nojia2_0);
457 391
                inBtn.setEnabled(false);
458
//                Toast.makeText(getApplication(), "已放大到最大级别", Toast.LENGTH_SHORT)
459
//                        .show();
460 392
                return;
461 393
            } else {
462 394
                inBtn.setImageResource(R.drawable.icon_jia2_0);
@ -466,8 +398,6 @@ public class AlterTwoActivity extends Activity implements
466 398
            if (zoom <= minZoomLevel) {
467 399
                outBtn.setImageResource(R.drawable.icon_nojian2_0);
468 400
                outBtn.setEnabled(false);
469
//                Toast.makeText(getApplication(), "已缩小到最小级别", Toast.LENGTH_SHORT)
470
//                        .show();
471 401
                return;
472 402
            } else {
473 403
                outBtn.setImageResource(R.drawable.icon_jian2_0);
@ -479,58 +409,6 @@ public class AlterTwoActivity extends Activity implements
479 409
480 410
    }
481 411
482
//    public void getPoint() {
483
//        if (!isGetData) {
484
//            isGetData = true;
485
//            new Handler().postDelayed(new Runnable() {
486
//
487
//                @Override
488
//                public void run() {
489
//                    MyLocationData locCenter = mBaiduMap.getLocationData();
490
//                    if (locCenter != null) {
491
//                        center = new LatLng(locCenter.latitude,
492
//                                locCenter.longitude);
493
//
494
////                        mBaiduMap.addOverlay(new MarkerOptions().position(center).icon(
495
////                                BitmapDescriptorFactory
496
////                                        .fromResource(R.drawable.position_icon)));
497
//                    } else {
498
//                        return;
499
//                    }
500
////                    Point p1 = new Point(0, 0);
501
////                    LatLng locLeftTop = mBaiduMap.getProjection()
502
////                            .fromScreenLocation(p1);
503
////                    Point p2 = new Point(MainApplication.mScreenWidth, mMapView
504
////                            .getHeight());
505
////                    LatLng llRightBottom = mBaiduMap.getProjection()
506
////                            .fromScreenLocation(p2);
507
//                }
508
//            }, 500);
509
//        }
510
//    }
511
512
//    public void testTianjia(){
513
//        Intent intent = new Intent(this,
514
//                AlterThreeActivity.class);
515
//        intent.putExtra("location", "北京市海淀区");
516
//        intent.putExtra("jing", "116.542323");
517
//        intent.putExtra("wei", "39.33232");
518
//        intent.putExtra("city", "北京市");
519
//        intent.putExtra("district", "海淀区");
520
//        startActivity(intent);
521
//        this.finish();
522
//    }
523
524
    //    private void userGrowUp() {
525
//        new Thread(new Runnable() {
526
//            @Override
527
//            public void run() {
528
//                String url="http://www.d1ev.com/api/app/score?userid="+MainApplication.userPhone+"&type=check2";
529
////                submitGrow(url);
530
//            }
531
//        }).start();
532
//
533
//    }
534 412
    private Handler handler = new Handler() {
535 413
        // 主线程通过这个方法处理消息
536 414
        @Override
@ -556,10 +434,7 @@ public class AlterTwoActivity extends Activity implements
556 434
                    } catch (JSONException e) {
557 435
                        e.printStackTrace();
558 436
                    }
559
560
561 437
                case 3:
562
//                    Toast.makeText(AlterTwoActivity.this, "服务器处理错误", Toast.LENGTH_SHORT).show();
563 438
                    break;
564 439
                default:
565 440
                    break;
@ -636,89 +511,6 @@ public class AlterTwoActivity extends Activity implements
636 511
        }
637 512
    }
638 513
639
//    private void submitGrow( String sms) {
640
//
641
//        Log.e("url", sms);
642
//        Request request = new Request.Builder().url(sms).build();
643
//        Response response = null;
644
//        try{
645
//            if(request==null){
646
//                Message msg = new Message();
647
//                msg.what=3;
648
//                handler.sendMessage(msg);
649
//                return;
650
//            }
651
//            response = OkHttpUtil.execute(request);
652
//            if (response.code() == 200) {
653
//                String json = "";
654
//                try {
655
//                    json = response.body().string();
656
//                    Message msg = new Message();
657
//                    msg.obj = json;
658
//                    msg.what=1;
659
//                    handler.sendMessage(msg);
660
//                    Log.e("url", json);
661
//                }catch (Exception e){
662
//                    e.printStackTrace();
663
//                    Message msg = new Message();
664
//                    msg.what=3;
665
//                    handler.sendMessage(msg);
666
//                }
667
//            }
668
//        }catch (Exception e){
669
//            e.printStackTrace();
670
//            Message msg = new Message();
671
//            msg.what=3;
672
//            handler.sendMessage(msg);
673
//        }
674
//    }
675
676
//    public class MyLocationListenner implements BDLocationListener {
677
//
678
//        @Override
679
//        public void onReceiveLocation(BDLocation location) {
680
//            if (location == null || mMapView == null)
681
//                return;
682
//            MyLocationData locData = new MyLocationData.Builder()
683
//                    .accuracy(location.getRadius())
684
//                    .direction(100).latitude(Double.parseDouble(poi_wei))
685
//                    .longitude(Double.parseDouble(poi_jing)).build();
686
//            mBaiduMap.setMyLocationData(locData);
687
//            if (isFirstLoc) {
688
//                isFirstLoc = false;
689
//                mLocClient.stop();
690
//                mBaiduMap.setMyLocationEnabled(false);
691
//                LatLng ll = new LatLng(Double.parseDouble(poi_wei),Double.parseDouble(poi_jing));
692
////                LatLng lll = new LatLng()
693
//                MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(ll);
694
//                mBaiduMap.animateMapStatus(u);
695
//                llposition = ll;
696
//                city = location.getCity();
697
//                district = location.getDistrict();
698
//                initOverlay();
699
//            }
700
//        }
701
702
//        public void createDialog() {
703
//            if (pd_info == null) {
704
//                pd_info = CustomProgressDialog.createDialog(mContext);
705
//                pd_info.setMessage(mContext.getResources().getString(
706
//                        R.string.version_updating));
707
//                pd_info.show();
708
//            }
709
//        }
710
//
711
//        public void dismissDialog() {
712
//            if (pd_info != null) {
713
//                pd_info.dismiss();
714
//                pd_info = null;
715
//            }
716
//        }
717
//
718
//        public void onReceivePoi(BDLocation poiLocation) {
719
//        }
720
//    }
721
722 514
    @Override
723 515
    protected void onPause() {
724 516
        mapView.onPause();
@ -821,16 +613,6 @@ public class AlterTwoActivity extends Activity implements
821 613
        poi_wei = String.valueOf(target.latitude);
822 614
        change_jing = roundByScale(target.longitude, 5);
823 615
        change_wei = roundByScale(target.latitude, 5);
824
//        Log.e("++++++","+++++++++");
825
//        if (first_tag == true){
826
//            first_tag = false;
827
//        }else {
828
//            if (!change_jing.equals(original_jing) && !change_wei.equals(original_wei)) {
829
//                tv_submit.setEnabled(true);
830
//                tv_submit.setClickable(true);
831
//                tv_submit.setBackgroundResource(R.color.lvse);
832
//            }
833
//        }
834 616
    }
835 617
836 618
    @Override
@ -838,7 +620,6 @@ public class AlterTwoActivity extends Activity implements
838 620
        aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
839 621
        // 设置定位的类型为定位模式 ,可以由定位、跟随或地图根据面向方向旋转几种
840 622
        aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
841
//        aMap.moveCamera();
842 623
        aMap.moveCamera(CameraUpdateFactory.zoomTo(16));
843 624
844 625
        int position_jing = poi_jing.length() - poi_jing.indexOf(".") + 1;
@ -853,9 +634,6 @@ public class AlterTwoActivity extends Activity implements
853 634
            ll = new LatLng(Double.parseDouble(gd_wei), Double.parseDouble(gd_jing));
854 635
        }
855 636
856
//                LatLng lll = new LatLng()
857
//                    MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(ll);
858
//                    mBaiduMap.animateMapStatus(u);
859 637
        llposition = ll;
860 638
        //设置缩放级别
861 639
        aMap.moveCamera(CameraUpdateFactory.zoomTo(16));
@ -866,8 +644,6 @@ public class AlterTwoActivity extends Activity implements
866 644
867 645
868 646
    private void getGaode(Double jing, Double wei) {
869
//        Log.e("jing", jing + "");
870
//        Log.e("wei", wei + "");
871 647
        double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
872 648
        double gg_lon;
873 649
        double gg_lat;
@ -876,10 +652,8 @@ public class AlterTwoActivity extends Activity implements
876 652
        double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
877 653
        gg_lon = z * Math.cos(theta);
878 654
        gd_jing = String.valueOf(gg_lon);
879
//        Log.e("gg_lon", gg_lon + "");
880 655
        gg_lat = z * Math.sin(theta);
881 656
        gd_wei = String.valueOf(gg_lat);
882
//        Log.e("gg_lat", gg_lat + "");
883 657
    }
884 658
885 659
    @Override
@ -927,11 +701,6 @@ public class AlterTwoActivity extends Activity implements
927 701
            tv.setText(zhan_name);
928 702
            et_address.setText(zhan_address);
929 703
        }
930
//        if (mMarker1 != null){
931
//            tv.setText(location);
932
//            et_share_address.setText(location);
933
//        }
934
//        tv.setGravity(View.TEXT_ALIGNMENT_CENTER);
935 704
936 705
        tv.setTextColor(getResources().getColor(R.color.hintColor));
937 706
        tv.setTextSize(15);
@ -943,12 +712,6 @@ public class AlterTwoActivity extends Activity implements
943 712
        return null;
944 713
    }
945 714
946
//    @Override
947
//    public void onMapClick(LatLng latLng) {
948
//        llposition = latLng;
949
//        initOverlay1();
950
//    }
951
952 715
    @Override
953 716
    public void onLocationChanged(AMapLocation amapLocation) {
954 717
        if (amapLocation != null
@ -956,19 +719,13 @@ public class AlterTwoActivity extends Activity implements
956 719
            try {
957 720
                Log.e("---------------", "--------------");
958 721
                mlocationClient.stopLocation();
959
//                tv_addressName.setText(amapLocation.getAddress());
960 722
                poi_jing = String.valueOf(amapLocation.getLongitude());
961 723
                poi_wei = String.valueOf(amapLocation.getLatitude());
962 724
            } catch (NullPointerException e) {
963 725
                e.printStackTrace();
964 726
            }
965
//                ProfileManager.getInstance().setAtCity(getApplicationContext(), MainApplication.atCity);
966 727
            if (!isFirstLoc) {
967 728
                center = new LatLng(amapLocation.getLatitude(), amapLocation.getLongitude());
968
//                Log.e("!@#$",amapLocation.getLatitude()+"```"+amapLocation.getLongitude());
969
////                Toast.makeText(this, amapLocation.getAddress(), Toast.LENGTH_SHORT).show();
970
////                Toast.makeText(this, amapLocation.getCity(), Toast.LENGTH_SHORT).show();
971
//                ete("{\"fun\":\"timer\"}");
972 729
                //设置缩放级别
973 730
                aMap.moveCamera(CameraUpdateFactory.zoomTo(16));
974 731
                //将地图移动到定位点
@ -983,7 +740,6 @@ public class AlterTwoActivity extends Activity implements
983 740
        } else {
984 741
            String errText = "定位失败," + amapLocation.getErrorCode() + ": " + amapLocation.getErrorInfo();
985 742
            Log.e("AmapErr", errText);
986
//                mLocationErrText.setVisibility(View.VISIBLE);
987 743
            Toast.makeText(this, errText, Toast.LENGTH_SHORT).show();
988 744
        }
989 745
    }

+ 0 - 11
app/src/main/java/com/electric/chargingpile/activity/ImageFileAlter.java

@ -43,15 +43,4 @@ public class ImageFileAlter extends Activity {
43 43
            finish();
44 44
        }
45 45
    }
46
47
//    public boolean onKeyDown(int keyCode, KeyEvent event) {
48
//        if (keyCode == KeyEvent.KEYCODE_BACK) {
49
//            Intent intent = new Intent();
50
//            intent.setClass(mContext, AlterOneActivity.class);
51
//            startActivity(intent);
52
//        }
53
//
54
//        return true;
55
//    }
56
57 46
}

+ 0 - 11
app/src/main/java/com/electric/chargingpile/activity/ImageFileCharging.java

@ -43,15 +43,4 @@ public class ImageFileCharging extends Activity {
43 43
            finish();
44 44
        }
45 45
    }
46
47
//    public boolean onKeyDown(int keyCode, KeyEvent event) {
48
//        if (keyCode == KeyEvent.KEYCODE_BACK) {
49
//            Intent intent = new Intent();
50
//            intent.setClass(mContext, AlterOneActivity.class);
51
//            startActivity(intent);
52
//        }
53
//
54
//        return true;
55
//    }
56
57 46
}

+ 0 - 11
app/src/main/java/com/electric/chargingpile/activity/ImageFileComment.java

@ -43,15 +43,4 @@ public class ImageFileComment extends Activity {
43 43
            finish();
44 44
        }
45 45
    }
46
47
//    public boolean onKeyDown(int keyCode, KeyEvent event) {
48
//        if (keyCode == KeyEvent.KEYCODE_BACK) {
49
//            Intent intent = new Intent();
50
//            intent.setClass(mContext, AlterOneActivity.class);
51
//            startActivity(intent);
52
//        }
53
//
54
//        return true;
55
//    }
56
57 46
}

+ 0 - 32
app/src/main/java/com/electric/chargingpile/activity/NewZhanDetailsActivity.java

@ -664,7 +664,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
664 664
                            cancleButton.setOnClickListener(new View.OnClickListener() {
665 665
                                @Override
666 666
                                public void onClick(View view) {
667
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
668 667
                                    popupWindow.dismiss();
669 668
                                }
670 669
                            });
@ -680,7 +679,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
680 679
                                    } else {
681 680
                                        getGaode(Double.parseDouble(jingdu), Double.parseDouble(weidu));
682 681
                                    }
683
//                                getGaode(Double.parseDouble(poi_jing),Double.parseDouble(poi_wei));
684 682
                                    Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
685 683
                                    intent.putExtra("start_jing", MainMapActivity.center.longitude + "");
686 684
                                    intent.putExtra("start_wei", MainMapActivity.center.latitude + "");
@ -701,11 +699,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
701 699
                                @Override
702 700
                                public void onClick(View view) {
703 701
                                    Intent intent = null;
704
//                                        try {
705
//                                            intent = Intent.getIntent("intent://map/direction?origin=latlng:"+center.latitude+","+center.longitude+"&destination=latlng:"+ll.latitude+","+ll.longitude+"|name:"+finalMarkerInfo.getZhan_name()+"&mode=driving&region=&src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end");
706
//                                        } catch (URISyntaxException e) {
707
//                                            e.printStackTrace();
708
//                                        }
709 702
                                    getBaidu(MainMapActivity.center.longitude, MainMapActivity.center.latitude);
710 703
                                    int position_jing = jingdu.length() - jingdu.indexOf(".") + 1;
711 704
                                    int position_wei = weidu.length() - weidu.indexOf(".") + 1;
@ -713,7 +706,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
713 706
                                        getBaidu1(Double.parseDouble(jingdu), Double.parseDouble(weidu));
714 707
715 708
                                    } else {
716
//                                    getGaode(Double.parseDouble(poi_jing),Double.parseDouble(poi_wei));
717 709
                                        bd_jing = Double.parseDouble(jingdu);
718 710
                                        bd_wei = Double.parseDouble(weidu);
719 711
                                    }
@ -723,7 +715,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
723 715
                                                "destination=" + bd_wei + "," + bd_jing +
724 716
                                                "&mode=driving&" +
725 717
                                                "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
726
//                                        Log.e("sss", s);
727 718
                                        intent = Intent.getIntent(s);
728 719
                                        MainMapActivity.detailsBack = true;
729 720
                                        HashMap<String, String> mmap = new HashMap<String, String>();
@ -736,15 +727,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
736 727
                                        e.printStackTrace();
737 728
                                    }
738 729
                                    startActivity(intent);
739
//                                                    if (MainFragment.center != null) {
740
//                                                        double dwei = Double.parseDouble(zhan.getPoi_wei());
741
//                                                        double djing = Double.parseDouble(zhan.getPoi_jing());
742
//                                                        LatLng ll = new LatLng(dwei, djing);
743
//
744
//                                                        startNavi(MainFragment.center, ll);
745
//
746
//                                                    }
747
//                                    startNavi(center, ll);
748 730
                                    popupWindow.dismiss();
749 731
750 732
                                }
@ -763,8 +745,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
763 745
                                        } else {
764 746
                                            getGaode(Double.parseDouble(jingdu), Double.parseDouble(weidu));
765 747
                                        }
766
//                                            getGaode(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
767
//                                            getBeginGaode(center.longitude, center.latitude);
768 748
                                        Intent intent4 = new Intent("android.intent.action.VIEW",
769 749
                                                android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + MainMapActivity.center.latitude + "&slon=" + MainMapActivity.center.longitude + "&sname=我的位置&dlat=" + gd_wei + "&dlon=" + gd_jing + "&dname=" + zhanname + "&dev=0&m=0&t=2"));
770 750
                                        intent4.setPackage("com.autonavi.minimap");
@ -785,7 +765,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
785 765
                                }
786 766
                            });
787 767
                            popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
788
//                                            startNavi(center, ll);
789 768
                        } else {
790 769
                            Toast.makeText(getApplication(),
791 770
                                    "没有定位到您的当前位置", Toast.LENGTH_SHORT)
@ -804,21 +783,11 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
804 783
                popupWindow.setBackgroundDrawable(new BitmapDrawable());
805 784
                // 设置PopupWindow的弹出和消失效果
806 785
                popupWindow.setAnimationStyle(R.style.popupAnimation);
807
//                confirmButton = (Button) popupWindowView
808
//                        .findViewById(R.id.confirmButton);
809
//                confirmButton.setOnClickListener(new View.OnClickListener() {
810
//                    @Override
811
//                    public void onClick(View view) {
812
//                        Toast.makeText(ShareTwoActivity.this, "YES", Toast.LENGTH_SHORT).show();
813
//                        popupWindow.dismiss();
814
//                    }
815
//                });
816 786
                cancleButton = (Button) popupWindowView
817 787
                        .findViewById(R.id.cancleButton);
818 788
                cancleButton.setOnClickListener(new View.OnClickListener() {
819 789
                    @Override
820 790
                    public void onClick(View view) {
821
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
822 791
                        popupWindow.dismiss();
823 792
                    }
824 793
                });
@ -829,7 +798,6 @@ public class NewZhanDetailsActivity extends AppCompatActivity implements View.On
829 798
                        if (!MainApplication.isLogin()) {
830 799
                            Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
831 800
                            startActivity(new Intent(getApplication(), LoginActivity.class));
832
//                    finish();
833 801
                        } else {
834 802
                            Intent intent = new Intent(getApplication(), AlterOneActivity.class);
835 803
                            intent.putExtra("zhanname", zhanname);

+ 0 - 1
app/src/main/java/com/electric/chargingpile/activity/ShowAllPhotoAlter.java

@ -105,7 +105,6 @@ public class ShowAllPhotoAlter extends Activity {
105 105
106 106
        public void onClick(View v) {
107 107
            //清空选择的图片
108
//            Bimp.tempSelectBitmap.clear();
109 108
            intent.setClass(ShowAllPhotoAlter.this, AlterOneActivity.class);
110 109
            startActivity(intent);
111 110
            finish();