修改充电站
This commit is contained in:
parent
6f0402f0d9
commit
8430b05cf8
@ -91,6 +91,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlElse, rlScutcheon, rlNull;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivElse, ivScutcheon;
|
||||
private TextView tvExamine;
|
||||
private TextView tvPanorama;
|
||||
private TextView tvName;
|
||||
private TextView tvInternal;
|
||||
private TextView tvElse;
|
||||
private TextView tvScutcheon;
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal;
|
||||
@ -246,7 +251,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||
rlScutcheon.setOnClickListener(this::onClick);
|
||||
|
||||
tvPanorama = findViewById(R.id.tv_panorama);
|
||||
tvElse = findViewById(R.id.tv_else);
|
||||
tvInternal = findViewById(R.id.tv_internal);
|
||||
tvName = findViewById(R.id.tv_name);
|
||||
tvScutcheon = findViewById(R.id.tv_scutcheon);
|
||||
/* recyclerPhone = findViewById(R.id.recycler_phone);
|
||||
recyclerPhone.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||
@ -538,19 +547,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String[] split = photo.split("/");
|
||||
if (split[split.length - 1].startsWith("a")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivPanorama);
|
||||
ivPanorama.setTag(photo);
|
||||
tvPanorama.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("b")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivName);
|
||||
ivName.setTag(photo);
|
||||
tvName.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("c")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivInternal);
|
||||
ivInternal.setTag(photo);
|
||||
tvInternal.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("d")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivElse);
|
||||
ivElse.setTag(photo);
|
||||
tvElse.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("e")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivScutcheon);
|
||||
ivScutcheon.setTag(photo);
|
||||
tvScutcheon.setTag(photo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -714,14 +723,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
return;
|
||||
}
|
||||
chargingStationList = new ArrayList<>();
|
||||
String tagPanorama = (String) ivPanorama.getTag();
|
||||
String tagPanorama = (String) tvPanorama.getTag();
|
||||
if (tagPanorama == null) {
|
||||
Toast.makeText(getContext(), "请拍照", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
chargingStationList.add(new File(tagPanorama));
|
||||
}
|
||||
String tagName = (String) ivName.getTag();
|
||||
String tagName = (String) tvName.getTag();
|
||||
if (tagName == null) {
|
||||
Toast.makeText(getContext(), "请拍照", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -729,7 +738,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
chargingStationList.add(new File(tagName));
|
||||
}
|
||||
if (existence == 0) {
|
||||
String tagInternal = (String) ivInternal.getTag();
|
||||
String tagInternal = (String) tvInternal.getTag();
|
||||
if (tagInternal == null) {
|
||||
Toast.makeText(getContext(), "请拍照", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -743,7 +752,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
} else {
|
||||
chargingStationList.add(new File(tagElse));
|
||||
}
|
||||
String tagScutcheon = (String) ivScutcheon.getTag();
|
||||
String tagScutcheon = (String) tvScutcheon.getTag();
|
||||
if (tagScutcheon == null) {
|
||||
Toast.makeText(getContext(), "请拍照", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -1114,7 +1123,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data, "a", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||
ivPanorama.setTag(takePhotoPath);
|
||||
tvPanorama.setTag(takePhotoPath);
|
||||
ivPanorama.setImageBitmap(bitmap);//显示图像
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
@ -1135,7 +1144,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data, "b", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||
ivName.setTag(takePhotoPath);
|
||||
tvName.setTag(takePhotoPath);
|
||||
ivName.setImageBitmap(bitmap);//显示图像
|
||||
/*int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
@ -1156,7 +1165,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data, "c", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||
ivInternal.setTag(takePhotoPath);
|
||||
tvInternal.setTag(takePhotoPath);
|
||||
ivInternal.setImageBitmap(bitmap);//显示图像
|
||||
/*int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
@ -1177,7 +1186,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data, "d", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||
ivElse.setTag(takePhotoPath);
|
||||
tvElse.setTag(takePhotoPath);
|
||||
ivElse.setImageBitmap(bitmap);//显示图像
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
@ -1198,7 +1207,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data, "e", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||
ivScutcheon.setTag(takePhotoPath);
|
||||
tvScutcheon.setTag(takePhotoPath);
|
||||
ivScutcheon.setImageBitmap(bitmap);//显示图像
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
@ -1324,23 +1333,23 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String list = contactView.getList();
|
||||
poiEntity.setTelPhone(list);
|
||||
}
|
||||
String tagPanorama = (String) ivPanorama.getTag();
|
||||
String tagPanorama = (String) tvPanorama.getTag();
|
||||
if (tagPanorama != null && !tagPanorama.equals("")) {
|
||||
infoPhoto.add(new Info(tagPanorama));
|
||||
}
|
||||
String tagName = (String) ivName.getTag();
|
||||
String tagName = (String) tvName.getTag();
|
||||
if (tagName != null && !tagName.equals("")) {
|
||||
infoPhoto.add(new Info(tagName));
|
||||
}
|
||||
String tagInternal = (String) ivInternal.getTag();
|
||||
String tagInternal = (String) tvInternal.getTag();
|
||||
if (tagInternal != null && !tagInternal.equals("")) {
|
||||
infoPhoto.add(new Info(tagInternal));
|
||||
}
|
||||
String tagElse = (String) ivElse.getTag();
|
||||
String tagElse = (String) tvElse.getTag();
|
||||
if (tagElse != null && !tagElse.equals("")) {
|
||||
infoPhoto.add(new Info(tagElse));
|
||||
}
|
||||
String tagScutcheon = (String) ivScutcheon.getTag();
|
||||
String tagScutcheon = (String) tvScutcheon.getTag();
|
||||
if (tagScutcheon != null && !tagScutcheon.equals("")) {
|
||||
infoPhoto.add(new Info(tagScutcheon));
|
||||
}
|
||||
@ -1366,28 +1375,28 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
poiCheckResult.setMsg("请输入 名称");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (ivPanorama.getTag()==null){
|
||||
if (tvPanorama.getTag()==null){
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("请拍照 全景图");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (ivName.getTag()==null){
|
||||
if (tvName.getTag()==null){
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("请拍照 名称照片");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (entity.getExistence()==0){
|
||||
if (ivInternal.getTag()==null){
|
||||
if (tvInternal.getTag()==null){
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("请拍照 服务说明");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (ivElse.getTag()==null){
|
||||
if (tvElse.getTag()==null){
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("请拍照 充电站指引牌");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (ivScutcheon.getTag()==null){
|
||||
if (tvScutcheon.getTag()==null){
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("请拍照 收费标牌");
|
||||
return poiCheckResult;
|
||||
|
@ -315,6 +315,7 @@
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_panorama"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
@ -350,6 +351,7 @@
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
@ -385,6 +387,7 @@
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_internal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
@ -426,6 +429,7 @@
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_else"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
@ -461,6 +465,7 @@
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_scutcheon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
|
Loading…
x
Reference in New Issue
Block a user