|
@ -54,6 +54,7 @@ import com.electric.chargingpile.data.Zhan;
|
54
|
54
|
import com.electric.chargingpile.util.BarColorUtil;
|
55
|
55
|
import com.electric.chargingpile.util.Bimp;
|
56
|
56
|
import com.electric.chargingpile.util.CheckMobileNum;
|
|
57
|
import com.electric.chargingpile.util.FileUtils;
|
57
|
58
|
import com.electric.chargingpile.util.ImageItem;
|
58
|
59
|
import com.electric.chargingpile.util.ImageUtils;
|
59
|
60
|
import com.electric.chargingpile.util.JsonUtils;
|
|
@ -66,6 +67,10 @@ import com.electric.chargingpile.util.UploadUtil;
|
66
|
67
|
import com.electric.chargingpile.view.CustomProgressDialog;
|
67
|
68
|
import com.squareup.okhttp.Request;
|
68
|
69
|
import com.squareup.okhttp.Response;
|
|
70
|
import com.zhihu.matisse.Matisse;
|
|
71
|
import com.zhihu.matisse.MimeType;
|
|
72
|
import com.zhihu.matisse.engine.impl.GlideEngine;
|
|
73
|
import com.zhihu.matisse.internal.entity.CaptureStrategy;
|
69
|
74
|
|
70
|
75
|
import org.json.JSONException;
|
71
|
76
|
import org.json.JSONObject;
|
|
@ -106,8 +111,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
106
|
111
|
Bitmap bm = null;
|
107
|
112
|
private TextView shareList, tvO, tvT, tvTh, tvF, tvFi, zhuangType, costWay, shareNext;
|
108
|
113
|
|
109
|
|
// public MyLocationListenner myListener = new MyLocationListenner();
|
110
|
|
// BaiduMapOptions mapOptions;
|
111
|
114
|
private TimePickerDialog tpd_open = null;
|
112
|
115
|
private TimePickerDialog tpd_close = null;
|
113
|
116
|
private String camePath;//拍照路径
|
|
@ -122,7 +125,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
122
|
125
|
private ImageView inBtn, outBtn;
|
123
|
126
|
private String jing, wei;
|
124
|
127
|
private PrivateZhuang privateZhuang;
|
125
|
|
// private LocationMode mCurrentMode;
|
126
|
128
|
public static final int REQUSET = 11;
|
127
|
129
|
|
128
|
130
|
public static boolean isFirstLoc = true;
|
|
@ -135,7 +137,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
135
|
137
|
|
136
|
138
|
ToggleButton carType;
|
137
|
139
|
private String suit_car2 = "国标";
|
138
|
|
// BitmapDescriptor mCurrentMarker;
|
139
|
140
|
|
140
|
141
|
private static boolean isGetData = false;
|
141
|
142
|
|
|
@ -158,7 +159,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
158
|
159
|
private String park = "1";
|
159
|
160
|
private ImageView ib_loaction, ib_add, ib_jian;
|
160
|
161
|
private RelativeLayout tv_notice;
|
161
|
|
// private String cost = "收费";
|
162
|
162
|
private EditText zhanName, fastNum, slowNum, parkCost, chargeCost, et_serviceCost, et_remark;
|
163
|
163
|
private CustomProgressDialog pd_info;
|
164
|
164
|
|
|
@ -177,7 +177,7 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
177
|
177
|
work_open, work_close, suit_car, pic_counts, pic;
|
178
|
178
|
private ProgressDialog insertDialog;
|
179
|
179
|
private static final int RC_ALBUM_PERM = 123;
|
180
|
|
|
|
180
|
public static final int REQUEST_CODE_CHOOSE = 341;
|
181
|
181
|
|
182
|
182
|
private Handler handler = new Handler() {
|
183
|
183
|
// 主线程通过这个方法处理消息
|
|
@ -185,12 +185,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
185
|
185
|
public void handleMessage(final Message msg) {
|
186
|
186
|
switch (msg.what) {
|
187
|
187
|
case 1:
|
188
|
|
// new Handler().postDelayed(new Runnable() {
|
189
|
|
// ////
|
190
|
|
// @Override
|
191
|
|
// public void run() {
|
192
|
|
//
|
193
|
|
//
|
194
|
188
|
Bundle bundle = msg.getData();
|
195
|
189
|
String id = bundle.getString("id");
|
196
|
190
|
Bitmap bitmap = (Bitmap) msg.obj;
|
|
@ -203,24 +197,11 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
203
|
197
|
} catch (Exception e) {
|
204
|
198
|
e.printStackTrace();
|
205
|
199
|
}
|
206
|
|
|
207
|
200
|
adapter.update();
|
208
|
|
// }
|
209
|
|
// }, 1000);
|
210
|
201
|
break;
|
211
|
202
|
case 2:
|
212
|
203
|
Toast.makeText(PrivateZhuangInfoActivity.this, "提交信息成功,感谢您的分享", Toast.LENGTH_SHORT).show();
|
213
|
204
|
dismissDialog();
|
214
|
|
// for(int i=0;i< PublicWay.activityList.size();i++){
|
215
|
|
// if (null != PublicWay.activityList.get(i)) {
|
216
|
|
// Bimp.tempSelectBitmap.clear();
|
217
|
|
//// PublicWay.activityList.get(i).finish();
|
218
|
|
// }
|
219
|
|
// }
|
220
|
|
// startActivity(new Intent(getApplication(),ShareListActivity.class));
|
221
|
|
// SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
|
222
|
|
// sharedPreferencesUtil.setFileName("shareInfo");
|
223
|
|
// sharedPreferencesUtil.clearData();
|
224
|
205
|
startActivity(new Intent(getApplicationContext(), PrivateZhaungListActivity.class));
|
225
|
206
|
finish();
|
226
|
207
|
break;
|
|
@ -228,74 +209,7 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
228
|
209
|
dismissDialog();
|
229
|
210
|
Toast.makeText(PrivateZhuangInfoActivity.this, "服务器处理错误", Toast.LENGTH_SHORT).show();
|
230
|
211
|
break;
|
231
|
|
|
232
|
212
|
case 5:
|
233
|
|
// try {
|
234
|
|
//// Log.e("!!!",msg.obj.toString());
|
235
|
|
// JSONObject jsonObj = new JSONObject(msg.obj.toString());
|
236
|
|
// String data = jsonObj.getString("data");
|
237
|
|
// String time = jsonObj.getString("time");
|
238
|
|
//// String pic = jsonObj.getString("pic");
|
239
|
|
// Log.i("data-----",data);
|
240
|
|
//// Log.i("pic------",pic);
|
241
|
|
// String zhan_data = DES3.decode(data);
|
242
|
|
// Log.i("zhan_data-----",zhan_data);
|
243
|
|
//
|
244
|
|
//
|
245
|
|
// try {
|
246
|
|
// Gson g = new Gson();
|
247
|
|
// List<Zhan> l = g.fromJson(zhan_data, new TypeToken<List<Zhan>>() {
|
248
|
|
// }.getType());
|
249
|
|
//
|
250
|
|
//
|
251
|
|
// list.clear();
|
252
|
|
//// mBaiduMap.clear();
|
253
|
|
// if (l != null && l.size() > 0) {
|
254
|
|
//// List<Zhan> ll = DES3.encode(l);
|
255
|
|
// list.addAll(l);
|
256
|
|
//// initOverlay(list);
|
257
|
|
// if (center != null) {
|
258
|
|
// for (int i = 0; i < list.size(); i++) {
|
259
|
|
// double dwei = Double.parseDouble(list.get(i)
|
260
|
|
// .getPoi_wei());
|
261
|
|
// double djing = Double.parseDouble(list.get(i)
|
262
|
|
// .getPoi_jing());
|
263
|
|
// LatLng ll = new LatLng(dwei, djing);
|
264
|
|
// double d = DistanceUtil.getDistance(center, ll);
|
265
|
|
// list.get(i).setDistance(Util.getDistance(d));
|
266
|
|
// }
|
267
|
|
//
|
268
|
|
// }
|
269
|
|
//
|
270
|
|
// } else {
|
271
|
|
//// Toast.makeText(getApplication(), "没有合适的充电桩", Toast.LENGTH_SHORT)
|
272
|
|
//// .show();
|
273
|
|
// showTextToast("没有合适的充电桩");
|
274
|
|
//// if (center != null) {
|
275
|
|
//// BitmapDescriptor point = BitmapDescriptorFactory
|
276
|
|
//// .fromResource(R.drawable.point_icon);
|
277
|
|
//// oo = new MarkerOptions().position(center)
|
278
|
|
//// .anchor(0.5f, 0.5f).zIndex(7).icon(point)
|
279
|
|
//// .draggable(true);
|
280
|
|
//// mBaiduMap.addOverlay(oo);
|
281
|
|
//// }
|
282
|
|
// }
|
283
|
|
//// if (list.size() > 0) {
|
284
|
|
//// list = Util.getSortList(list);
|
285
|
|
//// }
|
286
|
|
// }catch (Exception e){
|
287
|
|
//// BitmapDescriptor point = BitmapDescriptorFactory
|
288
|
|
//// .fromResource(R.drawable.point_icon);
|
289
|
|
//// oo = new MarkerOptions().position(center).
|
290
|
|
//// anchor(0.5f, 0.5f).zIndex(7)
|
291
|
|
//// .draggable(true).icon(point);
|
292
|
|
//// mBaiduMap.addOverlay(oo);
|
293
|
|
//// Toast.makeText(getApplication(),"该范围内没有充电桩",Toast.LENGTH_SHORT).show();
|
294
|
|
// }
|
295
|
|
//
|
296
|
|
// } catch (Exception e) {
|
297
|
|
// e.printStackTrace();
|
298
|
|
// }
|
299
|
213
|
break;
|
300
|
214
|
case 6:
|
301
|
215
|
try {
|
|
@ -314,19 +228,9 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
314
|
228
|
@Override
|
315
|
229
|
public void onClick(View v) {
|
316
|
230
|
startActivity(new Intent(PrivateZhuangInfoActivity.this, PrivateZhaungListActivity.class));
|
317
|
|
// for(int i=0;i<PublicWay.activityList.size();i++){
|
318
|
|
// if (null != PublicWay.activityList.get(i)) {
|
319
|
|
// Bimp.tempSelectBitmap.clear();
|
320
|
|
//// PublicWay.activityList.get(i).finish();
|
321
|
|
// }
|
322
|
|
// }
|
323
|
231
|
finish();
|
324
|
232
|
}
|
325
|
233
|
}).show();
|
326
|
|
|
327
|
|
|
328
|
|
// Toast.makeText(ShareTwoActivity.this, rtnMsg, Toast.LENGTH_SHORT).show();
|
329
|
|
|
330
|
234
|
} else {
|
331
|
235
|
dismissDialog();
|
332
|
236
|
Toast.makeText(PrivateZhuangInfoActivity.this, "提交失败", Toast.LENGTH_SHORT).show();
|
|
@ -335,10 +239,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
335
|
239
|
e.printStackTrace();
|
336
|
240
|
}
|
337
|
241
|
break;
|
338
|
|
// case StatusConstants.REQUEST_WHAT_SUCCESS:
|
339
|
|
//
|
340
|
|
//
|
341
|
|
// break;
|
342
|
242
|
|
343
|
243
|
default:
|
344
|
244
|
break;
|
|
@ -359,51 +259,13 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
359
|
259
|
getResources(),
|
360
|
260
|
R.drawable.addpic65);
|
361
|
261
|
PublicWay.activityList.add(this);
|
362
|
|
// parentView = getLayoutInflater().inflate(R.layout.activity_selectimg, null);
|
363
|
|
// setContentView(parentView);
|
364
|
262
|
setContentView(R.layout.activity_private_zhuang_info);
|
365
|
263
|
BarColorUtil.initStatusBarColor(PrivateZhuangInfoActivity.this);
|
366
|
264
|
|
367
|
265
|
list = new ArrayList<>();
|
368
|
266
|
mContext = this;
|
369
|
|
// map = new HashMap<>();
|
370
|
267
|
Init();
|
371
|
268
|
initView();
|
372
|
|
|
373
|
|
// try {
|
374
|
|
// new Thread(new Runnable() {
|
375
|
|
//
|
376
|
|
// @Override
|
377
|
|
// public void run() {
|
378
|
|
// try {
|
379
|
|
// bitmap = Bimp.revitionImageSize("http://cdz.d1ev.com/zhannew/uploadfile/2016/311471336239androidapp.jpg",300);
|
380
|
|
// } catch (IOException e) {
|
381
|
|
// e.printStackTrace();
|
382
|
|
// }
|
383
|
|
// }
|
384
|
|
// }).start();
|
385
|
|
//
|
386
|
|
// } catch (Exception e) {
|
387
|
|
// e.printStackTrace();
|
388
|
|
// }
|
389
|
|
//
|
390
|
|
//
|
391
|
|
// new Handler().postDelayed(new Runnable() {
|
392
|
|
//
|
393
|
|
// @Override
|
394
|
|
// public void run() {
|
395
|
|
// ImageItem mImageItem=new ImageItem();
|
396
|
|
// Log.e("bitmap", bitmap+"");
|
397
|
|
// mImageItem.setBitmap(bitmap);
|
398
|
|
//
|
399
|
|
//// mImageItem.setImagePath("http://cdz.d1ev.com/zhannew/uploadfile/2016/311471336239androidapp.jpg");
|
400
|
|
//// mImageItem.setImagePath("/storage/emulated/0/DCIM/Camera/aaaa.jpg");
|
401
|
|
// Bimp.tempSelectBitmap.add(0, mImageItem);
|
402
|
|
// adapter.update();
|
403
|
|
// }
|
404
|
|
// }, 1000);
|
405
|
|
//
|
406
|
|
// firstSelect();
|
407
|
269
|
}
|
408
|
270
|
|
409
|
271
|
|
|
@ -416,25 +278,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
416
|
278
|
toast.show();
|
417
|
279
|
}
|
418
|
280
|
|
419
|
|
// public static void firstSelect() {
|
420
|
|
// if (!isFirstLoc) {
|
421
|
|
// isFirstLoc = true;
|
422
|
|
//// tvLocation.setText("正在定位中...");
|
423
|
|
// mCurrentMode = MyLocationConfiguration.LocationMode.NORMAL;
|
424
|
|
// mBaiduMap
|
425
|
|
// .setMyLocationConfigeration(new MyLocationConfiguration(
|
426
|
|
// mCurrentMode, true, mCurrentMarker));
|
427
|
|
// mBaiduMap.setMapStatus(MapStatusUpdateFactory
|
428
|
|
// .newMapStatus(new MapStatus.Builder().zoom(15f).build()));
|
429
|
|
// mBaiduMap.setMyLocationEnabled(true);
|
430
|
|
// mLocClient.start();
|
431
|
|
//
|
432
|
|
// }
|
433
|
|
//
|
434
|
|
//
|
435
|
|
// }
|
436
|
|
|
437
|
|
|
438
|
281
|
public void createDialog() {
|
439
|
282
|
if (pd_info == null) {
|
440
|
283
|
pd_info = CustomProgressDialog.createDialog(mContext);
|
|
@ -490,20 +333,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
490
|
333
|
photo();
|
491
|
334
|
} else {
|
492
|
335
|
ToastUtil.showToast(getApplicationContext(), "您当前关闭了调用摄像头权限", Toast.LENGTH_SHORT);
|
493
|
|
// new AlertDialogTwo(PrivateZhuangInfoActivity.this).builder()
|
494
|
|
// .setMsg("您当前关闭了调用摄像头权限,是否去打开?")
|
495
|
|
// .setPositiveButton("去打开", new View.OnClickListener() {
|
496
|
|
// @Override
|
497
|
|
// public void onClick(View v) {
|
498
|
|
// Intent intent = new Intent(Settings.ACTION_SETTINGS);
|
499
|
|
// startActivity(intent);
|
500
|
|
// }
|
501
|
|
// }).setNegativeButton("忽略", new View.OnClickListener() {
|
502
|
|
// @Override
|
503
|
|
// public void onClick(View v) {
|
504
|
|
//
|
505
|
|
// }
|
506
|
|
// }).show();
|
507
|
336
|
}
|
508
|
337
|
}
|
509
|
338
|
});
|
|
@ -513,7 +342,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
513
|
342
|
AlbumActivity.class);
|
514
|
343
|
startActivity(intent);
|
515
|
344
|
overridePendingTransition(R.anim.activity_translate_in, R.anim.activity_translate_out);
|
516
|
|
// startActivityForResult(intent, 1);
|
517
|
345
|
pop.dismiss();
|
518
|
346
|
ll_popup.clearAnimation();
|
519
|
347
|
}
|
|
@ -528,25 +356,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
528
|
356
|
noScrollgridview = (GridView) findViewById(R.id.noScrollgridview);
|
529
|
357
|
noScrollgridview.setSelector(new ColorDrawable(Color.TRANSPARENT));
|
530
|
358
|
adapter = new GridAdapter(this);
|
531
|
|
// new Thread(new Runnable() {
|
532
|
|
// @Override
|
533
|
|
// public void run() {
|
534
|
|
//// Bitmap bitmap = getHttpBitmap("http://cdz.d1ev.com/zhannew/uploadfile/2016/311471336239androidapp.jpg");//从网络获取图片
|
535
|
|
//// savePicture(bitmap);
|
536
|
|
// ImageItem mImageItem=new ImageItem();
|
537
|
|
// Log.e("bitmap", bitmap+"");
|
538
|
|
// mImageItem.setBitmap(bitmap);
|
539
|
|
//
|
540
|
|
// mImageItem.setImagePath("http://cdz.d1ev.com/zhannew/uploadfile/2016/311471336239androidapp.jpg");
|
541
|
|
//// mImageItem.setImagePath("/storage/emulated/0/DCIM/Camera/aaaa.jpg");
|
542
|
|
// Bimp.tempSelectBitmap.add(0, mImageItem);
|
543
|
|
//// ImageItem mImageItem=new ImageItem();
|
544
|
|
//// mImageItem.setImagePath("/storage/emulated/0/DCIM/Camera/IMG_20160816_180805.jpg");
|
545
|
|
//// Bimp.tempSelectBitmap.add(0, mImageItem);
|
546
|
|
//// takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
|
547
|
|
//// Bimp.tempSelectBitmap.add(takePhoto);
|
548
|
|
// }
|
549
|
|
// }).start();
|
550
|
359
|
adapter.update();
|
551
|
360
|
noScrollgridview.setAdapter(adapter);
|
552
|
361
|
|
|
@ -555,9 +364,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
555
|
364
|
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
|
556
|
365
|
long arg3) {
|
557
|
366
|
if (arg2 == Bimp.tempSelectBitmap.size()) {
|
558
|
|
// Log.i("ddddddd", "----------");
|
559
|
|
// ll_popup.startAnimation(AnimationUtils.loadAnimation(PrivateZhuangInfoActivity.this,R.anim.activity_translate_in));
|
560
|
|
// pop.showAtLocation(parent, Gravity.CENTER, 0, 0);
|
561
|
367
|
permissionTask();
|
562
|
368
|
} else {
|
563
|
369
|
Intent intent = new Intent(PrivateZhuangInfoActivity.this,
|
|
@ -568,23 +374,20 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
568
|
374
|
}
|
569
|
375
|
}
|
570
|
376
|
});
|
571
|
|
|
572
|
377
|
}
|
573
|
378
|
|
574
|
379
|
/**
|
575
|
380
|
* 调用图库选择
|
576
|
381
|
*/
|
577
|
382
|
private void callGallery() {
|
578
|
|
Log.e(TAG, "callGallery: " + (Bimp.max - Bimp.tempSelectBitmap.size()));
|
579
|
|
//调用第三方图库选择
|
580
|
|
PhotoPicker.builder()
|
581
|
|
.setPhotoCount(PIC_NUM - Bimp.tempSelectBitmap.size())//可选择图片数量
|
582
|
|
.setShowCamera(true)//是否显示拍照按钮
|
583
|
|
.setShowGif(true)//是否显示动态图
|
584
|
|
.setPreviewEnabled(true)//是否可以预览
|
585
|
|
.start(this, PhotoPicker.REQUEST_CODE);
|
586
|
|
|
587
|
|
|
|
383
|
Matisse.from(PrivateZhuangInfoActivity.this)
|
|
384
|
.choose(MimeType.of(MimeType.JPEG, MimeType.PNG, MimeType.GIF))
|
|
385
|
.countable(true)
|
|
386
|
.maxSelectable(PIC_NUM - Bimp.tempSelectBitmap.size())
|
|
387
|
.capture(true)
|
|
388
|
.captureStrategy(new CaptureStrategy(true, "com.electric.chargingpile.provider"))
|
|
389
|
.imageEngine(new GlideEngine())
|
|
390
|
.forResult(REQUEST_CODE_CHOOSE);
|
588
|
391
|
}
|
589
|
392
|
|
590
|
393
|
@Override
|
|
@ -594,7 +397,7 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
594
|
397
|
if (data != null) {
|
595
|
398
|
if (requestCode == 1) {
|
596
|
399
|
//处理调用系统图库
|
597
|
|
} else if (requestCode == PhotoPicker.REQUEST_CODE) {
|
|
400
|
} else if (requestCode == REQUEST_CODE_CHOOSE) {
|
598
|
401
|
//异步方式插入图片
|
599
|
402
|
insertImagesSync(data);
|
600
|
403
|
} else if (requestCode == REQUSET) {
|
|
@ -620,24 +423,17 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
620
|
423
|
@Override
|
621
|
424
|
public void subscribe(ObservableEmitter<String> subscriber) {
|
622
|
425
|
try {
|
623
|
|
ArrayList<String> photos = data.getStringArrayListExtra(PhotoPicker.KEY_SELECTED_PHOTOS);
|
624
|
|
//可以同时插入多张图片
|
625
|
|
for (String imagePath : photos) {
|
626
|
|
|
627
|
|
Log.e(TAG, "call: imagePath " + imagePath);
|
628
|
|
Bitmap bitmap = BitmapFactory.decodeFile(imagePath);//压缩图片
|
629
|
|
if (ImageUtils.readPictureDegree(imagePath) != 0) {
|
630
|
|
bitmap = imageZoom(ImageUtils.toturn(bitmap));
|
631
|
|
} else {
|
632
|
|
bitmap = imageZoom(bitmap);
|
633
|
|
}
|
|
426
|
List<Uri> uriList = Matisse.obtainResult(data);
|
|
427
|
for (Uri uri: uriList) {
|
|
428
|
Bitmap bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri));
|
|
429
|
File file = FileUtils.from(PrivateZhuangInfoActivity.this, uri);
|
|
430
|
|
|
431
|
bitmap = FileUtils.rotateIfRequired(file, bitmap);
|
|
432
|
bitmap = imageZoom(bitmap);
|
634
|
433
|
ImageItem takePhoto = new ImageItem();
|
635
|
434
|
takePhoto.setBitmap(bitmap);
|
636
|
|
takePhoto.setImagePath(imagePath);
|
637
|
435
|
Bimp.tempSelectBitmap.add(takePhoto);
|
638
|
|
//
|
639
|
|
// Log.e(TAG, "call: "+imagePath );
|
640
|
|
subscriber.onNext(imagePath);
|
|
436
|
subscriber.onNext("");
|
641
|
437
|
}
|
642
|
438
|
subscriber.onComplete();
|
643
|
439
|
} catch (Exception e) {
|
|
@ -651,10 +447,8 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
651
|
447
|
.subscribe(new Observer<String>() {
|
652
|
448
|
@Override
|
653
|
449
|
public void onComplete() {
|
654
|
|
Log.e(TAG, "onCompleted: -------------");
|
655
|
450
|
insertDialog.dismiss();
|
656
|
451
|
adapter.update();
|
657
|
|
|
658
|
452
|
}
|
659
|
453
|
|
660
|
454
|
@Override
|
|
@ -666,18 +460,19 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
666
|
460
|
|
667
|
461
|
@Override
|
668
|
462
|
public void onSubscribe(Disposable d) {
|
669
|
|
|
670
|
463
|
}
|
671
|
464
|
|
672
|
465
|
@Override
|
673
|
466
|
public void onNext(String imagePath) {
|
674
|
|
|
675
|
467
|
}
|
676
|
468
|
});
|
677
|
469
|
}
|
678
|
470
|
|
679
|
|
|
680
|
471
|
private void initView() {
|
|
472
|
if (tag.equals("edit")) {
|
|
473
|
TextView titleView = findViewById(R.id.textview);
|
|
474
|
titleView.setText("编辑个人共享桩");
|
|
475
|
}
|
681
|
476
|
insertDialog = new ProgressDialog(this);
|
682
|
477
|
insertDialog.setMessage("正在插入图片...");
|
683
|
478
|
insertDialog.setCanceledOnTouchOutside(false);
|
|
@ -691,26 +486,8 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
691
|
486
|
|
692
|
487
|
rl_address = (RelativeLayout) findViewById(R.id.ll_address);
|
693
|
488
|
rl_address.setOnClickListener(this);
|
694
|
|
// et_zyNum = (EditText) findViewById(R.id.et_zyNum);
|
695
|
|
// parkLocation = (ToggleButton) findViewById(R.id.car_location);
|
696
|
|
// parkLocation.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
697
|
|
// @Override
|
698
|
|
// public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
699
|
|
// if(b){
|
700
|
|
// Log.e("!!!!","地下");
|
701
|
|
// park = "0";
|
702
|
|
// }else{
|
703
|
|
// Log.e("!!!!","地上");
|
704
|
|
// park = "1";
|
705
|
|
// }
|
706
|
|
// }
|
707
|
|
// });
|
708
|
489
|
shareNext = (TextView) findViewById(R.id.share_next);
|
709
|
490
|
shareNext.setOnClickListener(this);
|
710
|
|
|
711
|
|
// share_list = (TextView) findViewById(R.id.tv_share_list);
|
712
|
|
// share_list.setOnClickListener(this);
|
713
|
|
|
714
|
491
|
et_serviceCost = (EditText) findViewById(R.id.et_serviceCost);
|
715
|
492
|
et_remark = (EditText) findViewById(R.id.et_remarkclaim);
|
716
|
493
|
et_remark = (EditText) findViewById(R.id.et_remarkclaim);
|
|
@ -771,62 +548,15 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
771
|
548
|
close_time = (TextView) findViewById(R.id.tv_ferfect_time);
|
772
|
549
|
close_time.setOnClickListener(this);
|
773
|
550
|
|
774
|
|
// mMapView = (MapView) findViewById(R.id.mapView_share);
|
775
|
551
|
et_share_address = (TextView) findViewById(R.id.et_share_address);
|
776
|
552
|
zhuangType = (TextView) findViewById(R.id.tv_zhuangType);
|
777
|
|
// add = (TextView) findViewById(R.id.tv_add);
|
778
|
|
// rl_charge_cost_style = (RelativeLayout) findViewById(R.id.rl_charge_cost_style);
|
779
|
|
// rl_charge_cost_style.setOnClickListener(this);
|
780
|
|
// rl_open_object = (RelativeLayout) findViewById(R.id.rl_open_object);
|
781
|
|
// rl_open_object.setOnClickListener(this);
|
782
|
|
// rl_perfect_belong = (RelativeLayout) findViewById(R.id.rl_perfect_belong);
|
783
|
|
// rl_perfect_belong.setOnClickListener(this);
|
784
|
|
|
785
|
|
// et_address = (EditText) findViewById(R.id.et_address_detail);
|
786
|
|
|
787
|
|
|
788
|
|
// suit_car = getIntent().getStringExtra("suit_car");
|
789
|
|
// sf_cost = getIntent().getStringExtra("sf_cost");
|
790
|
|
// et_address.setText(zhan_address);
|
791
|
|
// et_name = (EditText) findViewById(R.id.et_name_detail);
|
792
|
|
//setEditTextCursorLocation(et_name);
|
793
|
|
// et_fast_num = (EditText) findViewById(R.id.et_prefect_fast_no);
|
794
|
|
// et_slow_num = (EditText) findViewById(R.id.et_prefect_slow_no);
|
795
|
|
// et_style = (TextView) findViewById(R.id.et_charge_style_detail);
|
796
|
|
//// et_open_object = (TextView) findViewById(R.id.et_open_object);
|
797
|
|
// et_belong = (EditText) findViewById(R.id.et_perfect_work_detail);
|
798
|
|
// et_phone = (EditText) findViewById(R.id.et_perfect_phone_detail);
|
799
|
|
// tv_run_state = (TextView) findViewById(R.id.tv_run_state);
|
800
|
|
// tv_suit_car = (TextView) findViewById(R.id.tv_prefect_suit_detail);
|
801
|
|
// tv_belong_type = (TextView) findViewById(R.id.tv_perfect_belong_detail);
|
802
|
|
// tv_submit = (TextView) findViewById(R.id.tv_submit);
|
803
|
|
// tv_submit.setOnClickListener(this);
|
804
|
|
// tv_belong_style = (TextView) findViewById(R.id.tv_perfect_work_style);
|
805
|
|
// tv_next = (TextView) findViewById(R.id.tv_next);
|
806
|
|
// tv_next.setOnClickListener(this);
|
807
|
|
// iv_run_state = (ImageView) findViewById(R.id.iv_run_state);
|
808
|
|
// iv_run_state.setOnClickListener(this);
|
809
|
553
|
iv_back = (ImageView) findViewById(R.id.iv_back);
|
810
|
|
// image = (ImageView) findViewById(R.id.iv_photo1);
|
811
|
|
// image1 = (ImageView) findViewById(R.id.iv_photo2);
|
812
|
|
// image1.setOnClickListener(this);
|
813
|
|
// image2 = (ImageView) findViewById(R.id.iv_photo3);
|
814
|
|
// image2.setOnClickListener(this);
|
815
|
554
|
iv_back.setOnClickListener(this);
|
816
|
|
// iv_ferfect_change_suit = (ImageView) findViewById(R.id.iv_prefect_change_suit);
|
817
|
|
// iv_ferfect_change_suit.setOnClickListener(this);
|
818
|
|
// iv_perfect_change_belong = (ImageView) findViewById(R.id.iv_perfect_change_belong);
|
819
|
|
// iv_perfect_change_belong.setOnClickListener(this);
|
820
|
555
|
open_time = (TextView) findViewById(R.id.tv_prefect_start_time);
|
821
|
556
|
open_time.setOnClickListener(this);
|
822
|
557
|
close_time = (TextView) findViewById(R.id.tv_ferfect_time);
|
823
|
558
|
close_time.setOnClickListener(this);
|
824
|
559
|
if (tag.equals("edit")) {
|
825
|
|
|
826
|
|
// imageView.setImageBitmap(bitmap);
|
827
|
|
// savePicture(bitmap);//保存图片到SD卡
|
828
|
|
|
829
|
|
|
830
|
560
|
fastNum.setText(fast_num);
|
831
|
561
|
slowNum.setText(slow_num);
|
832
|
562
|
et_telephone.setText(telephone);
|
|
@ -864,10 +594,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
864
|
594
|
for (int i = 0; i < listPic.size(); i++) {
|
865
|
595
|
try {
|
866
|
596
|
bitmap = Bimp.revitionImageSize(MainApplication.url + "/zhannew/uploadfile/" + listPic.get(i).getUrl(), 300);
|
867
|
|
// showPic(bitmap,finalI);
|
868
|
|
|
869
|
|
// Log.d("dddddmsg", msg + "");
|
870
|
|
|
871
|
597
|
if (bitmap != null) {
|
872
|
598
|
Message mes = new Message();
|
873
|
599
|
mes.obj = bitmap;
|
|
@ -885,27 +611,9 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
885
|
611
|
}
|
886
|
612
|
}
|
887
|
613
|
}).start();
|
888
|
|
|
889
|
|
|
890
|
614
|
}
|
891
|
|
|
892
|
|
|
893
|
615
|
}
|
894
|
616
|
|
895
|
|
// private void showPic(final Bitmap bitmap, final int i){
|
896
|
|
// new Handler().postDelayed(new Runnable() {
|
897
|
|
////
|
898
|
|
// @Override
|
899
|
|
// public void run() {
|
900
|
|
// ImageItem mImageItem=new ImageItem();
|
901
|
|
// Log.e("bitmap", bitmap+"");
|
902
|
|
// mImageItem.setBitmap(bitmap);
|
903
|
|
// Bimp.tempSelectBitmap.add(i, mImageItem);
|
904
|
|
// adapter.update();
|
905
|
|
// }
|
906
|
|
// }, 1000);
|
907
|
|
// }
|
908
|
|
|
909
|
617
|
private void initDate() {
|
910
|
618
|
tag = getIntent().getStringExtra("tag");
|
911
|
619
|
if (tag.equals("edit")) {
|
|
@ -927,114 +635,12 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
927
|
635
|
poi_jing = getIntent().getStringExtra("poi_jing");
|
928
|
636
|
poi_wei = getIntent().getStringExtra("poi_wei");
|
929
|
637
|
pic = getIntent().getStringExtra("pic");
|
930
|
|
|
931
|
|
|
932
|
638
|
}
|
933
|
639
|
|
934
|
640
|
}
|
935
|
641
|
|
936
|
|
// public void initOverlay(List<Zhan> l) {
|
937
|
|
// for (int i = 0; i < l.size(); i++) {
|
938
|
|
// double dwei = Double.parseDouble(l.get(i).getPoi_wei());
|
939
|
|
// double djing = Double.parseDouble(l.get(i).getPoi_jing());
|
940
|
|
// LatLng ll = new LatLng(dwei, djing);
|
941
|
|
//// if (l.get(i).getSuit_car2().equals("国标")&&l.get(i).getStatus().equals("99")) {
|
942
|
|
//// if (l.get(i).getStatus().equals("1")) {
|
943
|
|
//// oono = new MarkerOptions().position(ll).icon(bdno)
|
944
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
945
|
|
//// mBaiduMap.addOverlay(oono);
|
946
|
|
//// ooyes = new MarkerOptions().position(ll).icon(bdyes)
|
947
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
948
|
|
//// mBaiduMap.addOverlay(ooyes);
|
949
|
|
//// }
|
950
|
|
// if(l.get(i).getStatus().equals("4")){
|
951
|
|
// ooyes = new MarkerOptions().position(ll).icon(bdyes)
|
952
|
|
// .anchor(0.5f, 1.0f).zIndex(8);
|
953
|
|
// mBaiduMap.addOverlay(ooyes);
|
954
|
|
// }else if(l.get(i).getStatus().equals("3")){
|
955
|
|
// oono = new MarkerOptions().position(ll).icon(bdno)
|
956
|
|
// .anchor(0.5f, 1.0f).zIndex(8);
|
957
|
|
// mBaiduMap.addOverlay(oono);
|
958
|
|
// }
|
959
|
|
//
|
960
|
|
//
|
961
|
|
//// if(l.get(i).getAuthentication().equals("0")){
|
962
|
|
//// oono = new MarkerOptions().position(ll).icon(bdno)
|
963
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
964
|
|
//// mBaiduMap.addOverlay(oono);
|
965
|
|
//// }
|
966
|
|
//// else{
|
967
|
|
//// oono = new MarkerOptions().position(ll).icon(bdno)
|
968
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
969
|
|
//// mBaiduMap.addOverlay(oono);
|
970
|
|
//// }
|
971
|
|
//// if (l.get(i).getStatus().equals("99")) {
|
972
|
|
//// ooyes = new MarkerOptions().position(ll).icon(bdyes)
|
973
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
974
|
|
//// mBaiduMap.addOverlay(ooyes);
|
975
|
|
//// }
|
976
|
|
//// }else if (l.get(i).getSuit_car2().equals("特斯拉")&&l.get(i).getStatus().equals("99")) {
|
977
|
|
//
|
978
|
|
////
|
979
|
|
//// if(l.get(i).getSuit_car2().equals("特斯拉") && l.get(i).getAuthentication().equals("1")){
|
980
|
|
//// ooyes = new MarkerOptions().position(ll).icon(bdyes)
|
981
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
982
|
|
//// mBaiduMap.addOverlay(ooyes);
|
983
|
|
//// } else{
|
984
|
|
//// oono = new MarkerOptions().position(ll).icon(bdno)
|
985
|
|
//// .anchor(0.5f, 1.0f).zIndex(8).draggable(true);
|
986
|
|
//// mBaiduMap.addOverlay(oono);
|
987
|
|
//// }
|
988
|
|
////
|
989
|
|
////
|
990
|
|
////
|
991
|
|
////
|
992
|
|
// }
|
993
|
|
//// if (center != null) {
|
994
|
|
//// BitmapDescriptor point = BitmapDescriptorFactory
|
995
|
|
//// .fromResource(R.drawable.point_icon);
|
996
|
|
//// oo = new MarkerOptions().position(center).anchor(0.5f, 0.5f).zIndex(7).draggable(false).icon(point);
|
997
|
|
//// mBaiduMap.addOverlay(oo);
|
998
|
|
//// }
|
999
|
|
//// mBaiduMap.clear();
|
1000
|
|
//
|
1001
|
|
// }
|
1002
|
|
//
|
1003
|
|
// private void getAddress() {
|
1004
|
|
// mSearch = GeoCoder.newInstance();
|
1005
|
|
// mSearch.setOnGetGeoCodeResultListener(this);
|
1006
|
|
// mSearch.reverseGeoCode(new ReverseGeoCodeOption().location(llposition));
|
1007
|
|
// }
|
1008
|
|
|
1009
|
|
|
1010
|
|
// private void initData(){
|
1011
|
|
// zhan_address = getIntent().getStringExtra("zhan_address");
|
1012
|
|
// poi_jing = getIntent().getDoubleExtra("jing", 0);
|
1013
|
|
// poi_wei = getIntent().getDoubleExtra("wei", 0);
|
1014
|
|
// costType = getIntent().getStringExtra("cost_type");
|
1015
|
|
// suit_car2 = getIntent().getStringExtra("suit_car2");
|
1016
|
|
// fast_num = getIntent().getStringExtra("fast_num");
|
1017
|
|
// slow_num = getIntent().getStringExtra("slow_num");
|
1018
|
|
// stop_cost = getIntent().getStringExtra("stop_cost");
|
1019
|
|
// charge_cost = getIntent().getStringExtra("charge_cost");
|
1020
|
|
// zhan_name = getIntent().getStringExtra("zhan_name");
|
1021
|
|
//
|
1022
|
|
// Log.e("share1_data", "zhan_address=" + zhan_address + ",poi_jing=" + poi_jing + ",poi_wei=" + poi_wei
|
1023
|
|
// + ",costType=" + costType + ",suit_car2=" + suit_car2 + ",fast_num=" + fast_num + ",slow_num=" + slow_num
|
1024
|
|
// + ",stop_cost=" + stop_cost + ",zhan_name=" + zhan_name + ",charge_cost=" + charge_cost);
|
1025
|
|
//
|
1026
|
|
// }
|
1027
|
|
|
1028
|
|
|
1029
|
642
|
@Override
|
1030
|
643
|
public void onClick(View v) {
|
1031
|
|
// if (imm.isActive()) {
|
1032
|
|
// View view = getWindow().peekDecorView();
|
1033
|
|
// if (view != null) {
|
1034
|
|
// imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
1035
|
|
// }
|
1036
|
|
// }
|
1037
|
|
// this.mapStatus = mBaiduMap.getMapStatus();
|
1038
|
644
|
switch (v.getId()) {
|
1039
|
645
|
case R.id.ll_address:
|
1040
|
646
|
Intent intent = new Intent(PrivateZhuangInfoActivity.this, PrivateZhuangMapActivity.class);
|
|
@ -1075,28 +681,11 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1075
|
681
|
rb_xia.setBackgroundResource(R.drawable.icon_xiaselected1105);
|
1076
|
682
|
break;
|
1077
|
683
|
|
1078
|
|
|
1079
|
|
// case R.id.ib_location:
|
1080
|
|
// if (!isFirstLoc) {
|
1081
|
|
// isFirstLoc = true;
|
1082
|
|
// // Toast.makeText(this,"正在定位当前位置...",Toast.LENGTH_LONG);
|
1083
|
|
// mCurrentMode = MyLocationConfiguration.LocationMode.NORMAL;
|
1084
|
|
// mBaiduMap
|
1085
|
|
// .setMyLocationConfigeration(new MyLocationConfiguration(
|
1086
|
|
// mCurrentMode, true, mCurrentMarker));
|
1087
|
|
// mBaiduMap.setMapStatus(MapStatusUpdateFactory
|
1088
|
|
// .newMapStatus(new MapStatus.Builder().zoom(15f).build()));
|
1089
|
|
// mBaiduMap.setMyLocationEnabled(true);
|
1090
|
|
// mLocClient.start();
|
1091
|
|
// }
|
1092
|
|
// break;
|
1093
|
|
|
1094
|
684
|
case R.id.tv_notice:
|
1095
|
685
|
tv_notice.setVisibility(View.GONE);
|
1096
|
686
|
break;
|
1097
|
687
|
|
1098
|
688
|
case R.id.tv_costtype:
|
1099
|
|
// startActivity(new Intent(PrivateZhuangInfoActivity.this,ChargeCostWayActivity.class));
|
1100
|
689
|
LayoutInflater inflater1 = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
|
1101
|
690
|
popupWindowView = inflater1.inflate(R.layout.popupwindow_privatecostway, null);
|
1102
|
691
|
popupWindow = new PopupWindow(popupWindowView,
|
|
@ -1105,14 +694,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1105
|
694
|
popupWindow.setBackgroundDrawable(new BitmapDrawable());
|
1106
|
695
|
// 设置PopupWindow的弹出和消失效果
|
1107
|
696
|
popupWindow.setAnimationStyle(R.style.popupAnimation);
|
1108
|
|
// confirmButton = (Button) popupWindowView
|
1109
|
|
// .findViewById(R.id.confirmButton);
|
1110
|
|
// confirmButton.setOnClickListener(new OnClickListener() {
|
1111
|
|
// @Override
|
1112
|
|
// public void onClick(View view) {
|
1113
|
|
// popupWindow.dismiss();
|
1114
|
|
// }
|
1115
|
|
// });
|
1116
|
697
|
cancleButton = (Button) popupWindowView
|
1117
|
698
|
.findViewById(R.id.cancleButton);
|
1118
|
699
|
cancleButton.setOnClickListener(new View.OnClickListener() {
|
|
@ -1147,9 +728,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1147
|
728
|
});
|
1148
|
729
|
popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
|
1149
|
730
|
break;
|
1150
|
|
// case R.id.iv_back:
|
1151
|
|
// finish();
|
1152
|
|
// break;
|
1153
|
731
|
|
1154
|
732
|
case R.id.share_next:
|
1155
|
733
|
if (et_share_address.getText().toString().equals("")) {
|
|
@ -1189,216 +767,21 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1189
|
767
|
new Thread(new Runnable() {
|
1190
|
768
|
@Override
|
1191
|
769
|
public void run() {
|
1192
|
|
// submitShareTwo();
|
1193
|
|
|
1194
|
770
|
try {
|
1195
|
|
|
1196
|
771
|
shite("");
|
1197
|
|
|
1198
|
|
|
1199
|
772
|
} catch (Exception e) {
|
1200
|
773
|
e.printStackTrace();
|
1201
|
774
|
}
|
1202
|
775
|
|
1203
|
|
// uploadFile();
|
1204
|
776
|
}
|
1205
|
777
|
}).start();
|
1206
|
778
|
}
|
1207
|
|
// if (!zhanName.getText().toString().equals("") && !fastNum.getText().toString().equals("") && !slowNum.getText().toString().equals("")
|
1208
|
|
// && !chargeCost.getText().toString().equals("") && !costWay.getText().toString().equals("请选择支付方式")
|
1209
|
|
// && !parkCost.getText().toString().equals("") && !et_share_address.getText().toString().equals("")
|
1210
|
|
// && !et_serviceCost.getText().toString().equals("")) {
|
1211
|
|
// createDialog();
|
1212
|
|
// new Thread(new Runnable() {
|
1213
|
|
// @Override
|
1214
|
|
// public void run() {
|
1215
|
|
//// submitShareTwo();
|
1216
|
|
//
|
1217
|
|
// try {
|
1218
|
|
//
|
1219
|
|
// shite("");
|
1220
|
|
//
|
1221
|
|
//
|
1222
|
|
// } catch (Exception e) {
|
1223
|
|
// e.printStackTrace();
|
1224
|
|
// }
|
1225
|
|
//
|
1226
|
|
//// uploadFile();
|
1227
|
|
// }
|
1228
|
|
// }).start();
|
1229
|
|
// }else{
|
1230
|
|
// Toast.makeText(ShareTwoActivity.this,"请确认必填项是否全部填写",Toast.LENGTH_SHORT).show();
|
1231
|
|
// }
|
1232
|
779
|
break;
|
1233
|
|
// case R.id.rl_open_object:
|
1234
|
|
// LayoutInflater inflater1 = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
|
1235
|
|
// popupWindowView = inflater1.inflate(R.layout.popupwindow_open, null);
|
1236
|
|
// popupWindow = new PopupWindow(popupWindowView,
|
1237
|
|
// ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
|
1238
|
|
// true);
|
1239
|
|
// popupWindow.setBackgroundDrawable(new BitmapDrawable());
|
1240
|
|
// // 设置PopupWindow的弹出和消失效果
|
1241
|
|
// popupWindow.setAnimationStyle(R.style.popupAnimation);
|
1242
|
|
//// confirmButton = (Button) popupWindowView
|
1243
|
|
//// .findViewById(R.id.confirmButton);
|
1244
|
|
//// confirmButton.setOnClickListener(new View.OnClickListener() {
|
1245
|
|
//// @Override
|
1246
|
|
//// public void onClick(View view) {
|
1247
|
|
//// Toast.makeText(ShareTwoActivity.this, "YES", Toast.LENGTH_SHORT).show();
|
1248
|
|
//// popupWindow.dismiss();
|
1249
|
|
//// }
|
1250
|
|
//// });
|
1251
|
|
// cancleButton = (Button) popupWindowView
|
1252
|
|
// .findViewById(R.id.cancleButton);
|
1253
|
|
// cancleButton.setOnClickListener(new View.OnClickListener() {
|
1254
|
|
// @Override
|
1255
|
|
// public void onClick(View view) {
|
1256
|
|
//// Toast.makeText(ShareTwoActivity.this, "NO", Toast.LENGTH_SHORT).show();
|
1257
|
|
// popupWindow.dismiss();
|
1258
|
|
// }
|
1259
|
|
// });
|
1260
|
|
// TextView tvOne1 = (TextView) popupWindowView.findViewById(R.id.tvOne);
|
1261
|
|
// tvOne1.setOnClickListener(new View.OnClickListener() {
|
1262
|
|
// @Override
|
1263
|
|
// public void onClick(View view) {
|
1264
|
|
// et_open_object.setText("开放");
|
1265
|
|
// popupWindow.dismiss();
|
1266
|
|
// }
|
1267
|
|
// });
|
1268
|
|
// TextView tvTwo1 = (TextView) popupWindowView.findViewById(R.id.tvTwo);
|
1269
|
|
// tvTwo1.setOnClickListener(new View.OnClickListener() {
|
1270
|
|
// @Override
|
1271
|
|
// public void onClick(View view) {
|
1272
|
|
// et_open_object.setText("对内开放");
|
1273
|
|
// popupWindow.dismiss();
|
1274
|
|
// }
|
1275
|
|
// });
|
1276
|
|
// popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
|
1277
|
|
// break;
|
1278
|
|
// case R.id.rl_charge_cost_style:
|
1279
|
|
// LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
|
1280
|
|
// popupWindowView = inflater.inflate(R.layout.popupwindow_cost, null);
|
1281
|
|
// popupWindow = new PopupWindow(popupWindowView,
|
1282
|
|
// ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
|
1283
|
|
// true);
|
1284
|
|
// popupWindow.setBackgroundDrawable(new BitmapDrawable());
|
1285
|
|
// // 设置PopupWindow的弹出和消失效果
|
1286
|
|
// popupWindow.setAnimationStyle(R.style.popupAnimation);
|
1287
|
|
//// confirmButton = (Button) popupWindowView
|
1288
|
|
// .findViewById(R.id.confirmButton);
|
1289
|
|
// confirmButton.setOnClickListener(new View.OnClickListener() {
|
1290
|
|
// @Override
|
1291
|
|
// public void onClick(View view) {
|
1292
|
|
// Toast.makeText(ShareTwoActivity.this, "YES", Toast.LENGTH_SHORT).show();
|
1293
|
|
// popupWindow.dismiss();
|
1294
|
|
// }
|
1295
|
|
// });
|
1296
|
|
// cancleButton = (Button) popupWindowView
|
1297
|
|
// .findViewById(R.id.cancleButton);
|
1298
|
|
// cancleButton.setOnClickListener(new View.OnClickListener() {
|
1299
|
|
// @Override
|
1300
|
|
// public void onClick(View view) {
|
1301
|
|
//// Toast.makeText(ShareTwoActivity.this, "NO", Toast.LENGTH_SHORT).show();
|
1302
|
|
// popupWindow.dismiss();
|
1303
|
|
// }
|
1304
|
|
// });
|
1305
|
|
// tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
|
1306
|
|
// tvOne.setOnClickListener(new View.OnClickListener() {
|
1307
|
|
// @Override
|
1308
|
|
// public void onClick(View view) {
|
1309
|
|
// et_style.setText("北京国家电网充电卡");
|
1310
|
|
// popupWindow.dismiss();
|
1311
|
|
// }
|
1312
|
|
// });
|
1313
|
|
// tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
|
1314
|
|
// tvTwo.setOnClickListener(new View.OnClickListener() {
|
1315
|
|
// @Override
|
1316
|
|
// public void onClick(View view) {
|
1317
|
|
// et_style.setText("北京富电科技充电卡");
|
1318
|
|
// popupWindow.dismiss();
|
1319
|
|
// }
|
1320
|
|
// });
|
1321
|
|
// tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
|
1322
|
|
// tvThree.setOnClickListener(new View.OnClickListener() {
|
1323
|
|
// @Override
|
1324
|
|
// public void onClick(View view) {
|
1325
|
|
// et_style.setText("北京普天新能源充电卡");
|
1326
|
|
// popupWindow.dismiss();
|
1327
|
|
// }
|
1328
|
|
// });
|
1329
|
|
// tvFour = (TextView) popupWindowView.findViewById(R.id.tvFour);
|
1330
|
|
// tvFour.setOnClickListener(new View.OnClickListener() {
|
1331
|
|
// @Override
|
1332
|
|
// public void onClick(View view) {
|
1333
|
|
// et_style.setText("上海国家电网充电卡");
|
1334
|
|
// popupWindow.dismiss();
|
1335
|
|
// }
|
1336
|
|
// });
|
1337
|
|
// tvFive = (TextView) popupWindowView.findViewById(R.id.tvFive);
|
1338
|
|
// tvFive.setOnClickListener(new View.OnClickListener() {
|
1339
|
|
// @Override
|
1340
|
|
// public void onClick(View view) {
|
1341
|
|
// et_style.setText("上海普天新能源充电卡");
|
1342
|
|
// popupWindow.dismiss();
|
1343
|
|
// }
|
1344
|
|
// });
|
1345
|
|
// tvSix = (TextView) popupWindowView.findViewById(R.id.tvSix);
|
1346
|
|
// tvSix.setOnClickListener(new View.OnClickListener() {
|
1347
|
|
// @Override
|
1348
|
|
// public void onClick(View view) {
|
1349
|
|
// et_style.setFocusableInTouchMode(true);
|
1350
|
|
// popupWindow.dismiss();
|
1351
|
|
// }
|
1352
|
|
// });
|
1353
|
|
// popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
|
1354
|
|
// break;
|
1355
|
|
// case R.id.ll_add_photo:
|
1356
|
|
// CharSequence[] items = { "手机相册","拍照" };
|
1357
|
|
// // CharSequence[] items = { "手机相册", "手机拍照" };
|
1358
|
|
// imageChooseItem(items);
|
1359
|
|
//
|
1360
|
|
//
|
1361
|
|
// break;
|
1362
|
|
|
1363
|
|
// case R.id.tv_holiday_start_time:
|
1364
|
|
// if (tpd_holiday_open == null) {
|
1365
|
|
// TimePickerDialog.OnTimeSetListener otsl = new TimePickerDialog.OnTimeSetListener() {
|
1366
|
|
// public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
1367
|
|
// holiday_open.setText(((hourOfDay < 10 ? 0 + "" + hourOfDay : hourOfDay) + ":" + (minute < 10 ? 0 + "" + minute : minute)).toString());
|
1368
|
|
// //close_time.setText(((hourOfDay < 10 ? 0 +""+ hourOfDay : hourOfDay)+":"+(minute<10?0+""+minute:minute)).toString());
|
1369
|
|
// tpd_holiday_open.dismiss();
|
1370
|
|
// }
|
1371
|
|
// };
|
1372
|
|
// Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
|
1373
|
|
// int hourOfDay = calendar.get(Calendar.HOUR_OF_DAY);
|
1374
|
|
// int minute = calendar.get(Calendar.MINUTE);
|
1375
|
|
// tpd_holiday_open = new TimePickerDialog(this, otsl, hourOfDay, minute, true);
|
1376
|
|
// }
|
1377
|
|
// tpd_holiday_open.show();
|
1378
|
|
// break;
|
1379
|
|
//
|
1380
|
|
// case R.id.tv_holiday_stop_time:
|
1381
|
|
// if (tpd_holiday_close == null) {
|
1382
|
|
// TimePickerDialog.OnTimeSetListener otsl = new TimePickerDialog.OnTimeSetListener() {
|
1383
|
|
// public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
1384
|
|
// holiday_close.setText(((hourOfDay < 10 ? 0 + "" + hourOfDay : hourOfDay) + ":" + (minute < 10 ? 0 + "" + minute : minute)).toString());
|
1385
|
|
// //close_time.setText(((hourOfDay < 10 ? 0 +""+ hourOfDay : hourOfDay)+":"+(minute<10?0+""+minute:minute)).toString());
|
1386
|
|
// tpd_holiday_close.dismiss();
|
1387
|
|
// }
|
1388
|
|
// };
|
1389
|
|
// Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
|
1390
|
|
// int hourOfDay = calendar.get(Calendar.HOUR_OF_DAY);
|
1391
|
|
// int minute = calendar.get(Calendar.MINUTE);
|
1392
|
|
// tpd_holiday_close = new TimePickerDialog(this, otsl, hourOfDay, minute, true);
|
1393
|
|
// }
|
1394
|
|
// tpd_holiday_close.show();
|
1395
|
|
// break;
|
1396
|
780
|
case R.id.tv_prefect_start_time:
|
1397
|
781
|
if (tpd_open == null) {
|
1398
|
782
|
TimePickerDialog.OnTimeSetListener otsl = new TimePickerDialog.OnTimeSetListener() {
|
1399
|
783
|
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
1400
|
784
|
open_time.setText(((hourOfDay < 10 ? 0 + "" + hourOfDay : hourOfDay) + ":" + (minute < 10 ? 0 + "" + minute : minute)).toString());
|
1401
|
|
//close_time.setText(((hourOfDay < 10 ? 0 +""+ hourOfDay : hourOfDay)+":"+(minute<10?0+""+minute:minute)).toString());
|
1402
|
785
|
tpd_open.dismiss();
|
1403
|
786
|
}
|
1404
|
787
|
};
|
|
@ -1413,7 +796,6 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1413
|
796
|
if (tpd_close == null) {
|
1414
|
797
|
TimePickerDialog.OnTimeSetListener otsl = new TimePickerDialog.OnTimeSetListener() {
|
1415
|
798
|
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
1416
|
|
//open_time.setText(((hourOfDay < 10 ? 0 +""+ hourOfDay : hourOfDay)+":"+(minute<10?0+""+minute:minute)).toString());
|
1417
|
799
|
close_time.setText(((hourOfDay < 10 ? 0 + "" + hourOfDay : hourOfDay) + ":" + (minute < 10 ? 0 + "" + minute : minute)).toString());
|
1418
|
800
|
tpd_close.dismiss();
|
1419
|
801
|
}
|
|
@ -1425,318 +807,22 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1425
|
807
|
}
|
1426
|
808
|
tpd_close.show();
|
1427
|
809
|
break;
|
1428
|
|
// case R.id.tv_next:
|
1429
|
|
// Intent intent = new Intent(getApplication(), ShareThreeActivity.class);
|
1430
|
|
// intent.putExtra("location", share_address);
|
1431
|
|
// intent.putExtra("POI_jing", poi_jing);
|
1432
|
|
// intent.putExtra("POI_wei", poi_wei);
|
1433
|
|
// intent.putExtra("fast_num", et_fast_num.getText().toString());
|
1434
|
|
// intent.putExtra("slow_num", et_slow_num.getText().toString());
|
1435
|
|
// intent.putExtra("suit_car", tv_suit_car.getText().toString());
|
1436
|
|
// intent.putExtra("belong_attribute", tv_belong_type.getText().toString());
|
1437
|
|
// intent.putExtra("telephone", et_phone.getText().toString());
|
1438
|
|
// intent.putExtra("Person_name", et_belong.getText().toString());
|
1439
|
|
// intent.putExtra("company_name", et_belong.getText().toString());
|
1440
|
|
// intent.putExtra("open_time", open_time.getText().toString());
|
1441
|
|
// intent.putExtra("zhan_name", et_name.getText().toString());
|
1442
|
|
// intent.putExtra("close_time", close_time.getText().toString());
|
1443
|
|
// intent.putExtra("holiday_open", holiday_open.getText().toString());
|
1444
|
|
// intent.putExtra("holiday_close", holiday_close.getText().toString());
|
1445
|
|
// intent.putExtra("open_object", et_open_object.getText().toString());
|
1446
|
|
// intent.putExtra("run_state", tv_run_state.getText().toString());
|
1447
|
|
// intent.putExtra("pic", srcPath);
|
1448
|
|
// intent.putExtra("city", city);
|
1449
|
|
// if (checkText()) {
|
1450
|
|
// startActivity(intent);
|
1451
|
|
// }
|
1452
|
|
// break;
|
1453
|
810
|
case R.id.iv_back:
|
1454
|
|
// SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
|
1455
|
|
// sharedPreferencesUtil.setFileName("shareInfo");
|
1456
|
|
// sharedPreferencesUtil.clearData();
|
1457
|
811
|
finish();
|
1458
|
812
|
break;
|
1459
|
|
// case R.id.iv_run_state:
|
1460
|
|
// final String[] operationSelect = {"正常", "故障", "废弃", "调试"};
|
1461
|
|
// new AlertDialog.Builder(ShareTwoActivity.this)
|
1462
|
|
// .setTitle("请选择")
|
1463
|
|
// .setItems(operationSelect, new DialogInterface.OnClickListener() {
|
1464
|
|
// @Override
|
1465
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1466
|
|
// switch (which) {
|
1467
|
|
// case 0:
|
1468
|
|
// tv_run_state.setText(operationSelect[0]);
|
1469
|
|
// break;
|
1470
|
|
// case 1:
|
1471
|
|
// tv_run_state.setText(operationSelect[1]);
|
1472
|
|
// break;
|
1473
|
|
// case 2:
|
1474
|
|
// tv_run_state.setText(operationSelect[2]);
|
1475
|
|
// break;
|
1476
|
|
// case 3:
|
1477
|
|
// tv_run_state.setText(operationSelect[3]);
|
1478
|
|
// default:
|
1479
|
|
// break;
|
1480
|
|
// }
|
1481
|
|
// }
|
1482
|
|
// })
|
1483
|
|
// .setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
1484
|
|
// @Override
|
1485
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1486
|
|
// dialog.cancel();
|
1487
|
|
// }
|
1488
|
|
// }).show();
|
1489
|
|
// break;
|
1490
|
|
// case R.id.iv_prefect_change_suit:
|
1491
|
|
//
|
1492
|
|
// String[] changeSelect = {"国标充电", "特斯拉", "德系"};
|
1493
|
|
// new AlertDialog.Builder(ShareTwoActivity.this)
|
1494
|
|
// .setTitle("请选择")
|
1495
|
|
// .setItems(changeSelect, new DialogInterface.OnClickListener() {
|
1496
|
|
// @Override
|
1497
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1498
|
|
// switch (which) {
|
1499
|
|
// case 0:
|
1500
|
|
// tv_suit_car.setText("国标充电");
|
1501
|
|
// break;
|
1502
|
|
// case 1:
|
1503
|
|
// tv_suit_car.setText("特斯拉");
|
1504
|
|
// break;
|
1505
|
|
// case 2:
|
1506
|
|
// tv_suit_car.setText("德系");
|
1507
|
|
// break;
|
1508
|
|
// default:
|
1509
|
|
// break;
|
1510
|
|
// }
|
1511
|
|
// }
|
1512
|
|
// })
|
1513
|
|
// .setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
1514
|
|
// @Override
|
1515
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1516
|
|
// dialog.cancel();
|
1517
|
|
// }
|
1518
|
|
// }).show();
|
1519
|
|
// break;
|
1520
|
|
// case R.id.rl_perfect_belong:
|
1521
|
|
// final String[] belongSelect = {"企业", "私人"};
|
1522
|
|
// new AlertDialog.Builder(ShareTwoActivity.this)
|
1523
|
|
// .setTitle("请选择")
|
1524
|
|
// .setItems(belongSelect, new DialogInterface.OnClickListener() {
|
1525
|
|
// @Override
|
1526
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1527
|
|
// switch (which) {
|
1528
|
|
// case 0:
|
1529
|
|
// tv_belong_type.setText(belongSelect[0]);
|
1530
|
|
// break;
|
1531
|
|
// case 1:
|
1532
|
|
// tv_belong_type.setText(belongSelect[1]);
|
1533
|
|
//// tv_belong_style.setText("联系人");
|
1534
|
|
//// et_belong.setText("王先生");
|
1535
|
|
// break;
|
1536
|
|
// default:
|
1537
|
|
// break;
|
1538
|
|
// }
|
1539
|
|
// }
|
1540
|
|
// })
|
1541
|
|
// .setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
1542
|
|
// @Override
|
1543
|
|
// public void onClick(DialogInterface dialog, int which) {
|
1544
|
|
// dialog.cancel();
|
1545
|
|
// }
|
1546
|
|
// }).show();
|
1547
|
|
// LayoutInflater inflater2 = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
|
1548
|
|
// popupWindowView = inflater2.inflate(R.layout.popupwindow_belong, null);
|
1549
|
|
// popupWindow = new PopupWindow(popupWindowView,
|
1550
|
|
// ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
|
1551
|
|
// true);
|
1552
|
|
// popupWindow.setBackgroundDrawable(new BitmapDrawable());
|
1553
|
|
// // 设置PopupWindow的弹出和消失效果
|
1554
|
|
// popupWindow.setAnimationStyle(R.style.popupAnimation);
|
1555
|
|
// confirmButton = (Button) popupWindowView
|
1556
|
|
// .findViewById(R.id.confirmButton);
|
1557
|
|
// confirmButton.setOnClickListener(new View.OnClickListener() {
|
1558
|
|
// @Override
|
1559
|
|
// public void onClick(View view) {
|
1560
|
|
// Toast.makeText(ShareTwoActivity.this, "YES", Toast.LENGTH_SHORT).show();
|
1561
|
|
// popupWindow.dismiss();
|
1562
|
|
// }
|
1563
|
|
// });
|
1564
|
|
// cancleButton = (Button) popupWindowView
|
1565
|
|
// .findViewById(R.id.cancleButton);
|
1566
|
|
// cancleButton.setOnClickListener(new View.OnClickListener() {
|
1567
|
|
// @Override
|
1568
|
|
// public void onClick(View view) {
|
1569
|
|
//// Toast.makeText(ShareTwoActivity.this, "NO", Toast.LENGTH_SHORT).show();
|
1570
|
|
// popupWindow.dismiss();
|
1571
|
|
// }
|
1572
|
|
// });
|
1573
|
|
// TextView tvOne2 = (TextView) popupWindowView.findViewById(R.id.tvOne);
|
1574
|
|
// tvOne2.setOnClickListener(new View.OnClickListener() {
|
1575
|
|
// @Override
|
1576
|
|
// public void onClick(View view) {
|
1577
|
|
// tv_belong_type.setText("企业");
|
1578
|
|
// popupWindow.dismiss();
|
1579
|
|
// }
|
1580
|
|
// });
|
1581
|
|
// TextView tvTwo2 = (TextView) popupWindowView.findViewById(R.id.tvTwo);
|
1582
|
|
// tvTwo2.setOnClickListener(new View.OnClickListener() {
|
1583
|
|
// @Override
|
1584
|
|
// public void onClick(View view) {
|
1585
|
|
// tv_belong_type.setText("私人");
|
1586
|
|
// popupWindow.dismiss();
|
1587
|
|
// }
|
1588
|
|
// });
|
1589
|
|
// popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
|
1590
|
|
// break;
|
1591
|
|
// case R.id.tv_submit:
|
1592
|
|
// if (!et_serviceCost.getText().toString().equals("")&& Bimp.tempSelectBitmap.size() != 0) {
|
1593
|
|
// createDialog();
|
1594
|
|
// new Thread(new Runnable() {
|
1595
|
|
// @Override
|
1596
|
|
// public void run() {
|
1597
|
|
//// submitShareTwo();
|
1598
|
|
//
|
1599
|
|
// try {
|
1600
|
|
//
|
1601
|
|
// shite("");
|
1602
|
|
//
|
1603
|
|
//
|
1604
|
|
// } catch (Exception e) {
|
1605
|
|
// e.printStackTrace();
|
1606
|
|
// }
|
1607
|
|
//
|
1608
|
|
//// uploadFile();
|
1609
|
|
// }
|
1610
|
|
// }).start();
|
1611
|
|
// }else if (Bimp.tempSelectBitmap.size() == 0){
|
1612
|
|
// Toast.makeText(getApplication(),"请提交站点照片",Toast.LENGTH_SHORT).show();
|
1613
|
|
// } else{
|
1614
|
|
// Toast.makeText(ClaimSurveyTwoActivity.this,"请确认必填项是否全部填写",Toast.LENGTH_SHORT).show();
|
1615
|
|
// }
|
1616
|
|
// break;
|
1617
|
|
|
1618
|
|
// case R.id.zoomin1:
|
1619
|
|
// mBaiduMap.setMapStatus(MapStatusUpdateFactory
|
1620
|
|
// .zoomTo(mapStatus.zoom + 1));
|
1621
|
|
// controlZoomShow();
|
1622
|
|
// break;
|
1623
|
|
// case R.id.zoomout1:
|
1624
|
|
// mBaiduMap.setMapStatus(MapStatusUpdateFactory
|
1625
|
|
// .zoomTo(mapStatus.zoom - 1));
|
1626
|
|
// controlZoomShow();
|
1627
|
|
// break;
|
1628
|
|
|
1629
|
813
|
}
|
1630
|
|
|
1631
|
|
// mapStatus = mBaiduMap.getMapStatus();
|
1632
|
|
|
1633
|
|
|
1634
|
814
|
}
|
1635
|
815
|
|
1636
|
816
|
|
1637
|
817
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
1638
|
818
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
1639
|
|
// SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
|
1640
|
|
// sharedPreferencesUtil.setFileName("shareInfo");
|
1641
|
|
// sharedPreferencesUtil.clearData();
|
1642
|
819
|
finish();
|
1643
|
820
|
}
|
1644
|
821
|
return false;
|
1645
|
822
|
|
1646
|
823
|
}
|
1647
|
824
|
|
1648
|
|
//地图缩放方法
|
1649
|
|
// private void controlZoomShow() {
|
1650
|
|
// float zoom = mBaiduMap.getMapStatus().zoom;
|
1651
|
|
// try {
|
1652
|
|
// if (zoom >= maxZoomLevel) {
|
1653
|
|
// inBtn.setImageResource(R.drawable.icon_nojia2_0);
|
1654
|
|
// inBtn.setEnabled(false);
|
1655
|
|
//// Toast.makeText(getApplication(), "已放大到最大级别", Toast.LENGTH_SHORT)
|
1656
|
|
//// .show();
|
1657
|
|
// return;
|
1658
|
|
// } else {
|
1659
|
|
// inBtn.setImageResource(R.drawable.icon_jia2_0);
|
1660
|
|
// inBtn.setEnabled(true);
|
1661
|
|
// }
|
1662
|
|
//
|
1663
|
|
// if (zoom <= minZoomLevel) {
|
1664
|
|
// outBtn.setImageResource(R.drawable.icon_nojian2_0);
|
1665
|
|
// outBtn.setEnabled(false);
|
1666
|
|
//// Toast.makeText(getApplication(), "已缩小到最小级别", Toast.LENGTH_SHORT)
|
1667
|
|
//// .show();
|
1668
|
|
// return;
|
1669
|
|
// } else {
|
1670
|
|
// outBtn.setImageResource(R.drawable.icon_jian2_0);
|
1671
|
|
// outBtn.setEnabled(true);
|
1672
|
|
// }
|
1673
|
|
// } catch (Exception e) {
|
1674
|
|
// e.printStackTrace();
|
1675
|
|
// }
|
1676
|
|
//
|
1677
|
|
// }
|
1678
|
|
|
1679
|
|
// public void getPoint() {
|
1680
|
|
// if (!isGetData) {
|
1681
|
|
// isGetData = true;
|
1682
|
|
// new Handler().postDelayed(new Runnable() {
|
1683
|
|
//
|
1684
|
|
// @Override
|
1685
|
|
// public void run() {
|
1686
|
|
// MyLocationData locCenter = mBaiduMap.getLocationData();
|
1687
|
|
// if (locCenter != null) {
|
1688
|
|
// center = new LatLng(locCenter.latitude,
|
1689
|
|
// locCenter.longitude);
|
1690
|
|
//
|
1691
|
|
//// mBaiduMap.addOverlay(new MarkerOptions().position(center).icon(
|
1692
|
|
//// BitmapDescriptorFactory
|
1693
|
|
//// .fromResource(R.drawable.position_icon)));
|
1694
|
|
// } else {
|
1695
|
|
// return;
|
1696
|
|
// }
|
1697
|
|
//// Point p1 = new Point(0, 0);
|
1698
|
|
//// LatLng locLeftTop = mBaiduMap.getProjection()
|
1699
|
|
//// .fromScreenLocation(p1);
|
1700
|
|
//// Point p2 = new Point(MainApplication.mScreenWidth, mMapView
|
1701
|
|
//// .getHeight());
|
1702
|
|
//// LatLng llRightBottom = mBaiduMap.getProjection()
|
1703
|
|
//// .fromScreenLocation(p2);
|
1704
|
|
//// MainMap();
|
1705
|
|
// }
|
1706
|
|
// }, 500);
|
1707
|
|
// }
|
1708
|
|
// }
|
1709
|
|
|
1710
|
|
// private void MainMap() {
|
1711
|
|
// new Thread(new Runnable() {
|
1712
|
|
// Point p1 = new Point(0,0);
|
1713
|
|
// LatLng locLeftTop = mBaiduMap.getProjection()
|
1714
|
|
// .fromScreenLocation(p1);
|
1715
|
|
// Point p2 = new Point(MainApplication.mScreenWidth, mMapView
|
1716
|
|
// .getHeight());
|
1717
|
|
// LatLng llRightBottom = mBaiduMap.getProjection()
|
1718
|
|
// .fromScreenLocation(p2);
|
1719
|
|
//
|
1720
|
|
//
|
1721
|
|
// // GeoPoint centerPoint = mapview.getMapCenter();// 地图中心坐标
|
1722
|
|
//// int tbSpan = mapview.getLatitudeSpan();// 当前纬线的跨度(从地图的上边缘到下边缘)
|
1723
|
|
//// int lrSpan = mapview.getLongitudeSpan();// 当前经度的跨度(从地图的左边缘到地图的右边缘)
|
1724
|
|
//// GeoPoint ltPoint = new GeoPoint(centerPoint.getLatitudeE6() - tbSpan / 2, centerPoint.getLongitudeE6() - lrSpan
|
1725
|
|
//// / 2);// 左上角坐标
|
1726
|
|
//// GeoPoint rbPoint = new GeoPoint(centerPoint.getLatitudeE6()// 右下角坐标
|
1727
|
|
//// + tbSpan / 2, centerPoint.getLongitudeE6() + lrSpan / 2);
|
1728
|
|
// @Override
|
1729
|
|
// public void run() {
|
1730
|
|
// String url=MainApplication.url+"/zhannew/basic/web/index.php/zhanlist/getlist?poi_lux="+ locLeftTop.longitude+""+"&poi_luy="+ locLeftTop.latitude+"" +"&poi_rdx="+ llRightBottom.longitude+""+"&poi_rdy="+ llRightBottom.latitude+ ""+"&suit_car2="+MainApplication.userTpye;
|
1731
|
|
// submitShowMap(url);
|
1732
|
|
// }
|
1733
|
|
// }).start();
|
1734
|
|
//
|
1735
|
|
// }
|
1736
|
|
|
1737
|
825
|
private void submitShowMap(String sms) {
|
1738
|
|
|
1739
|
|
Log.e("url", sms);
|
1740
|
826
|
Request request = new Request.Builder().url(sms).build();
|
1741
|
827
|
Response response = null;
|
1742
|
828
|
try {
|
|
@ -1867,48 +953,11 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1867
|
953
|
par.put("slow_num", slowNum.getText().toString());
|
1868
|
954
|
if (tag.equals("edit")) {
|
1869
|
955
|
par.put("where", id);
|
1870
|
|
// JSONObject jsonObject = new JSONObject();
|
1871
|
|
// JSONArray jsonArray = new JSONArray();
|
1872
|
|
// jsonArray.put(0,"a");
|
1873
|
|
// jsonObject.put("jsonArray",jsonArray);
|
1874
|
956
|
par.put("picid", "a");
|
1875
|
957
|
}
|
1876
|
958
|
|
1877
|
|
// if ()
|
1878
|
|
// par.put("where", zhan_id);
|
1879
|
|
|
1880
|
|
|
1881
|
|
// par.put("zhan_id", zhan_id);
|
1882
|
|
// par.put("total_num", "");
|
1883
|
|
//
|
1884
|
|
// par.put("open_object", "");
|
1885
|
|
// par.put("charges", "");
|
1886
|
|
//
|
1887
|
|
// par.put("stop_cost_way", "");
|
1888
|
|
//
|
1889
|
|
//
|
1890
|
|
// par.put("other_cost", et_serviceCost.getText().toString());
|
1891
|
|
//
|
1892
|
|
// par.put("zhuang_produce", "");
|
1893
|
|
//
|
1894
|
|
// par.put("city", "");
|
1895
|
|
// par.put("supplier", "");
|
1896
|
|
// par.put("facilities_classify", "");
|
1897
|
|
// par.put("belong_attribute", "");
|
1898
|
|
// par.put("operation_state", "");
|
1899
|
|
//
|
1900
|
|
// par.put("holiday_open", "");
|
1901
|
|
// par.put("holiday_close", "");
|
1902
|
|
// par.put("company_name", "");
|
1903
|
|
// par.put("person_name", "");
|
1904
|
|
// par.put("zhuang_num", "");
|
1905
|
|
// par.put("zy_num", "");
|
1906
|
|
//
|
1907
|
|
//
|
1908
|
|
// par.put("token", DES3.encode(token));
|
1909
|
959
|
try {
|
1910
|
960
|
String u = UploadUtil.post(
|
1911
|
|
// "http://123.57.6.131/zhannew/basic/web/index.php/zhanlist/add",
|
1912
|
961
|
MainApplication.url + "/zhannew/basic/web/index.php/applist/createpile",
|
1913
|
962
|
par, null);
|
1914
|
963
|
System.err.println(u);
|
|
@ -1936,51 +985,25 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
1936
|
985
|
public void permissionTask() {
|
1937
|
986
|
if (isPermissionOK()) {
|
1938
|
987
|
callGallery();
|
1939
|
|
// Have permission, do the thing!
|
1940
|
|
// Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show();
|
1941
|
|
// ifTimeout();
|
1942
|
988
|
} else {
|
1943
|
|
// Ask for one permission
|
1944
|
989
|
EasyPermissions.requestPermissions(
|
1945
|
990
|
this, "充电桩想要获取您的图片读取权限,是否允许?",
|
1946
|
991
|
RC_ALBUM_PERM,
|
1947
|
992
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
1948
|
|
Manifest.permission.READ_EXTERNAL_STORAGE);
|
|
993
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
|
994
|
Manifest.permission.CAMERA
|
|
995
|
);
|
1949
|
996
|
}
|
1950
|
997
|
}
|
1951
|
998
|
|
1952
|
999
|
private boolean isPermissionOK() {
|
1953
|
1000
|
return EasyPermissions.hasPermissions(this,
|
1954
|
1001
|
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
1955
|
|
Manifest.permission.READ_EXTERNAL_STORAGE
|
|
1002
|
Manifest.permission.READ_EXTERNAL_STORAGE,
|
|
1003
|
Manifest.permission.CAMERA
|
1956
|
1004
|
);
|
1957
|
1005
|
}
|
1958
|
1006
|
|
1959
|
|
|
1960
|
|
// @Override
|
1961
|
|
// public void onGetGeoCodeResult(GeoCodeResult geoCodeResult) {
|
1962
|
|
//
|
1963
|
|
// }
|
1964
|
|
//
|
1965
|
|
// @Override
|
1966
|
|
// public void onGetReverseGeoCodeResult(ReverseGeoCodeResult result) {
|
1967
|
|
// if (result == null || result.error != SearchResult.ERRORNO.NO_ERROR) {
|
1968
|
|
// Toast.makeText(ShareTwoActivity.this, "抱歉,未能找到结果",
|
1969
|
|
// Toast.LENGTH_LONG).show();
|
1970
|
|
// return;
|
1971
|
|
// }
|
1972
|
|
//// TextView tv = new TextView(this);
|
1973
|
|
//// tv.setBackgroundResource(R.color.bkg_button_green);
|
1974
|
|
//// tv.setPadding(7, 7, 7, 7);
|
1975
|
|
//// tv.setText(result.getAddress());
|
1976
|
|
//// tv.setTextColor(Color.WHITE);
|
1977
|
|
//// mInfoWindow = new InfoWindow(tv, llposition, -60);
|
1978
|
|
//// mBaiduMap.showInfoWindow(mInfoWindow);
|
1979
|
|
// location = result.getAddress();
|
1980
|
|
// city = Util.getCityName(result.getAddress());
|
1981
|
|
// et_share_address.setText(location);
|
1982
|
|
// }
|
1983
|
|
|
1984
|
1007
|
@SuppressLint("HandlerLeak")
|
1985
|
1008
|
public class GridAdapter extends BaseAdapter {
|
1986
|
1009
|
private LayoutInflater inflater;
|
|
@ -2106,242 +1129,13 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
2106
|
1129
|
private static final int TAKE_PICTURE = 0x000001;
|
2107
|
1130
|
|
2108
|
1131
|
public void photo() {
|
2109
|
|
// Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
2110
|
|
// startActivityForResult(openCameraIntent, TAKE_PICTURE);
|
2111
|
|
// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
2112
|
|
// File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/myimage/", String.valueOf(System
|
2113
|
|
// .currentTimeMillis()) + ".jpg");
|
2114
|
|
// camePath = file.getPath();
|
2115
|
|
// Uri imageUri = Uri.fromFile(file);
|
2116
|
|
// intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
|
2117
|
|
// startActivityForResult(intent, TAKE_PICTURE);
|
2118
|
|
|
2119
|
1132
|
if (hasSdcard()) {
|
2120
|
1133
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//���������
|
2121
|
1134
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));
|
2122
|
|
// intent.putExtra(MediaStore.EXTRA_OUTPUT, cutImgUri);
|
2123
|
1135
|
startActivityForResult(intent, PHOTO_REQUEST_CAMERA);
|
2124
|
1136
|
}
|
2125
|
|
|
2126
|
|
// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
2127
|
|
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
2128
|
|
// Environment.getExternalStorageDirectory(), "androidapp.jpg")));
|
2129
|
|
// ((Activity) mContext).startActivityForResult(intent, 2);
|
2130
|
1137
|
}
|
2131
|
1138
|
|
2132
|
|
// public void photo() {
|
2133
|
|
// Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
2134
|
|
// startActivityForResult(openCameraIntent, TAKE_PICTURE);
|
2135
|
|
//// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
2136
|
|
//// File file = new File(Environment.getExternalStorageDirectory() + "/myimage/", String.valueOf(System
|
2137
|
|
//// .currentTimeMillis()) + ".jpg");
|
2138
|
|
//// camePath = file.getPath();
|
2139
|
|
//// Uri imageUri = Uri.fromFile(file);
|
2140
|
|
//// intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
|
2141
|
|
//// startActivityForResult(intent, TAKE_PICTURE);
|
2142
|
|
// }
|
2143
|
|
|
2144
|
|
// protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
2145
|
|
// System.out.println("--------data------->"+data);
|
2146
|
|
// //���ѡȡ
|
2147
|
|
// if(requestCode == PHOTO_REQUEST_CAMERA && resultCode == Activity.RESULT_OK ){
|
2148
|
|
// //��������ͼƬ�ͽ�ȡ���ͼƬ�ļ���д����ͬһ���ļ���photo.jpg
|
2149
|
|
// crop(Uri.fromFile(tempFile),Uri.fromFile(tempFile));
|
2150
|
|
// }
|
2151
|
|
// //���ؽ�ȡ��ͼƬ
|
2152
|
|
// else if(requestCode == PHOTO_REQUEST_CUT ){
|
2153
|
|
// //���д�ͼʹ��Uri
|
2154
|
|
// Bitmap bitmap = decodeUriAsBitmap(Uri.fromFile(tempFile));//decode bitmap
|
2155
|
|
//// mFace.setImageBitmap(bitmap);
|
2156
|
|
// String fileName = String.valueOf(System.currentTimeMillis());
|
2157
|
|
// ImageItem takePhoto = new ImageItem();
|
2158
|
|
// takePhoto.setBitmap(bitmap);
|
2159
|
|
// takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
|
2160
|
|
// Bimp.tempSelectBitmap.add(takePhoto);
|
2161
|
|
// }else {
|
2162
|
|
//// Toast.makeText(getApplicationContext(), "��ȡͼƬʧ��", Toast.LENGTH_SHORT).show();
|
2163
|
|
// }
|
2164
|
|
// super.onActivityResult(requestCode, resultCode, data);
|
2165
|
|
// if (resultCode != Activity.RESULT_OK) {
|
2166
|
|
// return;
|
2167
|
|
// }
|
2168
|
|
// switch (requestCode) {
|
2169
|
|
// // 如果是直接从相册获取
|
2170
|
|
// case REQUSET:
|
2171
|
|
// poi_jing = data.getStringExtra("poi_jing");
|
2172
|
|
// Log.e("返回==poi_jing",poi_jing);
|
2173
|
|
// poi_wei = data.getStringExtra("poi_wei");
|
2174
|
|
// Log.e("返回==poi_wei",poi_wei);
|
2175
|
|
// et_share_address.setText(data.getStringExtra("address"));
|
2176
|
|
// default:
|
2177
|
|
// break;
|
2178
|
|
// }
|
2179
|
|
// }
|
2180
|
|
|
2181
|
|
// protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
2182
|
|
// switch (requestCode) {
|
2183
|
|
// case TAKE_PICTURE:
|
2184
|
|
// if (Bimp.tempSelectBitmap.size() < 3 && resultCode == RESULT_OK) {
|
2185
|
|
//
|
2186
|
|
//// String fileName = String.valueOf(System.currentTimeMillis());
|
2187
|
|
//// Bundle bundle = data.getExtras("data");
|
2188
|
|
//// Bitmap bm = (Bitmap) data.getExtras().get("data");
|
2189
|
|
//// FileUtils.saveBitmap(bm, fileName);
|
2190
|
|
////
|
2191
|
|
//// ImageItem takePhoto = new ImageItem();
|
2192
|
|
//// takePhoto.setBitmap(bm);
|
2193
|
|
//// takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
|
2194
|
|
//// Bimp.tempSelectBitmap.add(takePhoto);
|
2195
|
|
//
|
2196
|
|
//// SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
2197
|
|
//
|
2198
|
|
// Bitmap bitmap = BitmapFactory.decodeFile(camePath);
|
2199
|
|
// File file = new File(String.valueOf(Environment.getDataDirectory()));
|
2200
|
|
// file.mkdirs();
|
2201
|
|
// String fileName = Environment.getExternalStorageDirectory().getAbsolutePath() + "/myimage/" + System.currentTimeMillis()
|
2202
|
|
// + ".jpg";
|
2203
|
|
// try {
|
2204
|
|
// FileOutputStream b = new FileOutputStream(fileName);
|
2205
|
|
// bitmap.compress(Bitmap.CompressFormat.JPEG, 50, b);
|
2206
|
|
// b.flush();
|
2207
|
|
// b.close();
|
2208
|
|
// bitmap = Bimp.revitionImageSize(fileName);
|
2209
|
|
// FileUtils.saveBitmap(bitmap,
|
2210
|
|
// "" + fileName.substring(fileName.lastIndexOf("/") + 1, fileName.lastIndexOf(".")));
|
2211
|
|
// ImageItem takePhoto = new ImageItem();
|
2212
|
|
// takePhoto.setBitmap(bitmap);
|
2213
|
|
// takePhoto.setImagePath(fileName);
|
2214
|
|
// Bimp.tempSelectBitmap.add(takePhoto);
|
2215
|
|
// if (null != adapter) {
|
2216
|
|
// adapter.notifyDataSetChanged();
|
2217
|
|
// }
|
2218
|
|
// File refile = new File(camePath);
|
2219
|
|
// if (refile.exists()) {
|
2220
|
|
// refile.delete();
|
2221
|
|
// }
|
2222
|
|
// } catch (Exception e) {
|
2223
|
|
// e.printStackTrace();
|
2224
|
|
// }
|
2225
|
|
//
|
2226
|
|
//
|
2227
|
|
//// Bitmap bitmap = BitmapFactory.decodeFile(camePath);
|
2228
|
|
//// File file = new File(Environment.getExternalStorageDirectory() + "/myImage/");
|
2229
|
|
//// file.mkdirs();
|
2230
|
|
//// String fileName = Environment.getExternalStorageDirectory() + "/myImage/" + System.currentTimeMillis()
|
2231
|
|
//// + ".jpg";
|
2232
|
|
//// try {
|
2233
|
|
//// FileOutputStream b = new FileOutputStream(fileName);
|
2234
|
|
//// bitmap.compress(Bitmap.CompressFormat.JPEG, 50, b);
|
2235
|
|
//// b.flush();
|
2236
|
|
//// b.close();
|
2237
|
|
//// bitmap = Bimp.revitionImageSize(fileName);
|
2238
|
|
//// FileUtils.saveBitmap(bitmap,
|
2239
|
|
//// "" + fileName.substring(fileName.lastIndexOf("/") + 1, fileName.lastIndexOf(".")));
|
2240
|
|
//// ImageItem takePhoto = new ImageItem();
|
2241
|
|
//// takePhoto.setBitmap(bitmap);
|
2242
|
|
//// takePhoto.setImagePath(fileName);
|
2243
|
|
//// Bimp.tempSelectBitmap.add(takePhoto);
|
2244
|
|
//// if (null != adapter) {
|
2245
|
|
//// adapter.notifyDataSetChanged();
|
2246
|
|
//// }
|
2247
|
|
//// File refile = new File(camePath);
|
2248
|
|
//// if (refile.exists()) {
|
2249
|
|
//// refile.delete();
|
2250
|
|
//// }
|
2251
|
|
//// } catch (Exception e) {
|
2252
|
|
//// e.printStackTrace();
|
2253
|
|
//// }
|
2254
|
|
// }
|
2255
|
|
//
|
2256
|
|
// break;
|
2257
|
|
//// case 1:
|
2258
|
|
//// if (data != null) {
|
2259
|
|
//// startPhotoZoom(data.getData());
|
2260
|
|
//// Toast.makeText(mContext, "拖动正方形角可调整剪切大小",
|
2261
|
|
//// android.widget.Toast.LENGTH_SHORT).show();
|
2262
|
|
//// }
|
2263
|
|
//// break;
|
2264
|
|
//// // 如果是调用相机拍照时
|
2265
|
|
//// case 2:
|
2266
|
|
//// File temp = new File(Environment.getExternalStorageDirectory()
|
2267
|
|
//// + "/androidapp.jpg");
|
2268
|
|
//// startPhotoZoom(Uri.fromFile(temp));
|
2269
|
|
//// break;
|
2270
|
|
// }
|
2271
|
|
// }
|
2272
|
|
|
2273
|
|
// private void cameraCamera(Intent data) {
|
2274
|
|
// SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
2275
|
|
// String name = formatter.format(System.currentTimeMillis()) + ".jpg";
|
2276
|
|
// Log.i("zhiwei.zhao", "image name:" + name);
|
2277
|
|
// Toast.makeText(this, name, Toast.LENGTH_LONG).show();
|
2278
|
|
// Bundle bundle = data.getExtras();
|
2279
|
|
// /* 获取相机返回的数据,并转换为Bitmap图片格式 */
|
2280
|
|
// Bitmap bitmap = (Bitmap) bundle.get("data");
|
2281
|
|
// FileOutputStream b = null;
|
2282
|
|
//
|
2283
|
|
// String path = Environment.getExternalStorageDirectory().getPath();
|
2284
|
|
// File file = new File(path + "/myImage/");
|
2285
|
|
// /** 检测文件夹是否存在,不存在则创建文件夹 **/
|
2286
|
|
// if (!file.exists() && !file.isDirectory())
|
2287
|
|
// file.mkdirs();
|
2288
|
|
// String fileName = file.getPath() + "/" + name;
|
2289
|
|
// Log.i("zhiwei.zhao", "camera file path:" + fileName);
|
2290
|
|
// try {
|
2291
|
|
// b = new FileOutputStream(fileName);
|
2292
|
|
// /* 把数据写入文件 */
|
2293
|
|
// bitmap.compress(Bitmap.CompressFormat.JPEG, 100, b);
|
2294
|
|
// } catch (FileNotFoundException e) {
|
2295
|
|
// e.printStackTrace();
|
2296
|
|
// } finally {
|
2297
|
|
// try {
|
2298
|
|
// if (b == null)
|
2299
|
|
// return;
|
2300
|
|
// b.flush();
|
2301
|
|
// b.close();
|
2302
|
|
// } catch (IOException e) {
|
2303
|
|
// e.printStackTrace();
|
2304
|
|
// }
|
2305
|
|
// }
|
2306
|
|
// showImgs(bitmap, true);
|
2307
|
|
// }
|
2308
|
|
|
2309
|
|
|
2310
|
|
// public class MyLocationListenner implements BDLocationListener {
|
2311
|
|
//
|
2312
|
|
//
|
2313
|
|
// @Override
|
2314
|
|
// public void onReceiveLocation(BDLocation location) {
|
2315
|
|
// if (location == null || mMapView == null)
|
2316
|
|
// return;
|
2317
|
|
// MyLocationData locData = new MyLocationData.Builder()
|
2318
|
|
// .accuracy(location.getRadius()).direction(1000)
|
2319
|
|
// .latitude(location.getLatitude())
|
2320
|
|
// .longitude(location.getLongitude()).build();
|
2321
|
|
// mBaiduMap.setMyLocationData(locData);
|
2322
|
|
// if (isFirstLoc) {
|
2323
|
|
// isFirstLoc = false;
|
2324
|
|
// mLocClient.stop();
|
2325
|
|
// mBaiduMap.setMyLocationEnabled(true);
|
2326
|
|
// LatLng ll = new LatLng(location.getLatitude(),
|
2327
|
|
// location.getLongitude());
|
2328
|
|
// if (TextUtils.isEmpty(location.getCity())) {
|
2329
|
|
//// mSearch.reverseGeoCode(new ReverseGeoCodeOption()
|
2330
|
|
//// .location(ll));
|
2331
|
|
// } else {
|
2332
|
|
// city = location.getCity();
|
2333
|
|
// }
|
2334
|
|
// MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(ll);
|
2335
|
|
// mBaiduMap.animateMapStatus(u);
|
2336
|
|
// getPoint();
|
2337
|
|
// }
|
2338
|
|
// }
|
2339
|
|
//
|
2340
|
|
// public void onReceivePoi(BDLocation poiLocation) {
|
2341
|
|
// }
|
2342
|
|
// }
|
2343
|
|
|
2344
|
|
|
2345
|
1139
|
@Override
|
2346
|
1140
|
protected void onDestroy() {
|
2347
|
1141
|
Bimp.tempSelectBitmap.clear();
|
|
@ -2366,18 +1160,9 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
2366
|
1160
|
|
2367
|
1161
|
|
2368
|
1162
|
private void crop(Uri uri, Uri cutImgUri) {
|
2369
|
|
// �ü�ͼƬ��ͼ
|
2370
|
1163
|
Intent intent = new Intent("com.android.camera.action.CROP");
|
2371
|
1164
|
intent.setDataAndType(uri, "image/*");
|
2372
|
1165
|
intent.putExtra("crop", "true");
|
2373
|
|
// �ü���ı�����1��1
|
2374
|
|
// intent.putExtra("aspectX", 4);
|
2375
|
|
// intent.putExtra("aspectY", 3);
|
2376
|
|
// �ü������ͼƬ�ijߴ��С
|
2377
|
|
// intent.putExtra("outputX", 400);
|
2378
|
|
// intent.putExtra("outputY", 300);
|
2379
|
|
|
2380
|
|
// ͼƬ��ʽ
|
2381
|
1166
|
intent.putExtra("outputFormat", "JPEG");
|
2382
|
1167
|
intent.putExtra("noFaceDetection", true);// ȡ������ʶ��
|
2383
|
1168
|
intent.putExtra("return-data", false);// true:������uri��false������uri
|
|
@ -2512,26 +1297,12 @@ public class PrivateZhuangInfoActivity extends Activity implements View.OnClickL
|
2512
|
1297
|
matrix.postScale(scaleWidth, scaleHeight);
|
2513
|
1298
|
Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
|
2514
|
1299
|
(int) height, matrix, true);
|
2515
|
|
// iv_2.setImageBitmap(bitmap);
|
2516
|
|
// tv_2.setText(bitmap.getRowBytes() * bitmap.getHeight() + "");
|
2517
|
1300
|
return bitmap;
|
2518
|
1301
|
}
|
2519
|
1302
|
|
2520
|
1303
|
@Override
|
2521
|
1304
|
protected void onResume() {
|
2522
|
1305
|
super.onResume();
|
2523
|
|
// SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
|
2524
|
|
// sharedPreferencesUtil.setFileName("shareInfo");
|
2525
|
|
// String address =sharedPreferencesUtil.getString("address", "");
|
2526
|
|
// String costway =sharedPreferencesUtil.getString("costWay", "");
|
2527
|
|
// jing =sharedPreferencesUtil.getString("poi_jing", "");
|
2528
|
|
// wei =sharedPreferencesUtil.getString("poi_wei", "");
|
2529
|
|
//// String tel =sharedPreferencesUtil.getString("tel", "");
|
2530
|
|
////// String car =sharedPreferencesUtil.getString("car", "");
|
2531
|
|
//// String alipay =sharedPreferencesUtil.getString("alipay", "");
|
2532
|
|
//// carType.setText(car);
|
2533
|
|
// et_share_address.setText(address);
|
2534
|
|
// costWay.setText(costway);
|
2535
|
1306
|
}
|
2536
|
1307
|
|
2537
|
1308
|
public Bitmap getHttpBitmap(String url) {
|