修改poi图片
This commit is contained in:
parent
f7311533c3
commit
957364872a
@ -591,7 +591,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
case R.id.rl_panorama:
|
case R.id.rl_panorama:
|
||||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||||
file = PhotoUtils.showPhotoFile("a", latLng);;
|
file = PhotoUtils.showPhotoFile("a", latLng);;
|
||||||
|
|
||||||
intentPanorama.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
|
intentPanorama.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
|
||||||
startActivityForResult(intentPanorama, 101);
|
startActivityForResult(intentPanorama, 101);
|
||||||
break;
|
break;
|
||||||
@ -854,15 +853,16 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
}*/
|
}*/
|
||||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
|
||||||
if (file==null||!file.exists()){
|
if (file==null||!file.exists()){
|
||||||
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
}else {
|
||||||
|
String s = PhotoUtils.showPhotoAndGetPath(file, ivName);
|
||||||
|
tvName.setTag(s);
|
||||||
}
|
}
|
||||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
file=null;
|
||||||
String takePhotoPath2 = PhotoPathUtil.getTakePhotoPath(data, "b", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
|
||||||
tvName.setTag(takePhotoPath2);
|
|
||||||
ivName.setImageBitmap(bitmap);//显示图像
|
|
||||||
/* int height = bitmap.getHeight();
|
/* int height = bitmap.getHeight();
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
if (height > width) {
|
if (height > width) {
|
||||||
@ -879,16 +879,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
}*/
|
}*/
|
||||||
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
|
||||||
if (file==null||!file.exists()){
|
if (file==null||!file.exists()){
|
||||||
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
}else {
|
||||||
|
String s = PhotoUtils.showPhotoAndGetPath(file, ivInternal);
|
||||||
|
tvInternal.setTag(s);
|
||||||
}
|
}
|
||||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
file=null;
|
||||||
String takePhotoPath3 = PhotoPathUtil.getTakePhotoPath(data, "c", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
|
||||||
tvInternal.setTag(takePhotoPath3);
|
|
||||||
ivInternal.setImageBitmap(bitmap);//显示图像
|
|
||||||
file = null;
|
|
||||||
/*int height = bitmap.getHeight();
|
/*int height = bitmap.getHeight();
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
if (height > width) {
|
if (height > width) {
|
||||||
@ -905,15 +903,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
}*/
|
}*/
|
||||||
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
|
||||||
if (file==null||!file.exists()){
|
if (file==null||!file.exists()){
|
||||||
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
}else {
|
||||||
|
String s = PhotoUtils.showPhotoAndGetPath(file, ivCard);
|
||||||
|
tvCard.setTag(s);
|
||||||
}
|
}
|
||||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
|
||||||
String takePhotoPath4 = PhotoPathUtil.getTakePhotoPath(data, "d", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
|
||||||
tvCard.setTag(takePhotoPath4);
|
|
||||||
ivCard.setImageBitmap(bitmap);//显示图像
|
|
||||||
file = null;
|
file = null;
|
||||||
/* int height = bitmap.getHeight();
|
/* int height = bitmap.getHeight();
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
@ -931,15 +927,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
}*/
|
}*/
|
||||||
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
|
||||||
if (file==null||!file.exists()){
|
if (file==null||!file.exists()){
|
||||||
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先拍照", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
|
}else {
|
||||||
|
String s = PhotoUtils.showPhotoAndGetPath(file, ivElse);
|
||||||
|
tvElse.setTag(s);
|
||||||
}
|
}
|
||||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
|
||||||
String takePhotoPath5 = PhotoPathUtil.getTakePhotoPath(data, "e", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
|
||||||
tvElse.setTag(takePhotoPath5);
|
|
||||||
ivElse.setImageBitmap(bitmap);//显示图像
|
|
||||||
file = null;
|
file = null;
|
||||||
/* int height = bitmap.getHeight();
|
/* int height = bitmap.getHeight();
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user