充电站充电桩页面
@@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.0"
|
||||
ndkVersion '23.0.7123448'
|
||||
buildToolsVersion '29.0.2'
|
||||
// ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.navinfo.outdoor.fragment.AboutFragment;
|
||||
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment;
|
||||
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment2;
|
||||
import com.navinfo.outdoor.fragment.CapacityMeasurementFragment;
|
||||
import com.navinfo.outdoor.fragment.ChargingPileFragment;
|
||||
import com.navinfo.outdoor.fragment.ContactFragment;
|
||||
import com.navinfo.outdoor.fragment.EventPrefectureFragment;
|
||||
import com.navinfo.outdoor.fragment.FilterFragment;
|
||||
@@ -86,6 +87,8 @@ public class FragmentManagement extends BaseActivity {
|
||||
private PoiTaskFragment poiTaskFragment;//记录-已提交-POI任务列表的fragment -31
|
||||
private FilterFragment filterFragment;//寻宝-筛选界面 -32
|
||||
private OtherFragment otherFragment;//寻宝-上传-其他的fragment -33
|
||||
private ChargingPileFragment chargingPileFragment;//寻宝-上传-充电站-充电桩的fragment-34
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.management_fragment;
|
||||
@@ -170,6 +173,8 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.hide(filterFragment);
|
||||
if (otherFragment != null)//寻宝-上传-其他 -33
|
||||
fragmentTransaction.hide(otherFragment);
|
||||
if (chargingPileFragment!=null)//寻宝-上传-充电站-充电桩的fragment-34
|
||||
fragmentTransaction.hide(chargingPileFragment);
|
||||
|
||||
|
||||
}
|
||||
@@ -445,6 +450,13 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.show(otherFragment);
|
||||
}
|
||||
break;
|
||||
case 34://寻宝-上传-充电站-充电桩
|
||||
if (chargingPileFragment ==null){
|
||||
chargingPileFragment =ChargingPileFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout,chargingPileFragment);
|
||||
}else {
|
||||
fragmentTransaction.show(chargingPileFragment);
|
||||
}
|
||||
}
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,9 @@ public class Constant {
|
||||
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
||||
public static final int MAIN_CHARGING_STATION = 13;//充电站的Fragment 对地图页面marker 的一个展示
|
||||
public static final int CHARGING_STATION_WORD = 15;//地图页面marker 的经纬都回传
|
||||
|
||||
public static final int CHARGING_STATION = 16;//跳转到充电桩
|
||||
public static final int MAIN_CHARGING_PILE= 18;//充电桩的Fragment 对地图页面marker 的一个展示
|
||||
public static final int CHARGING_PILE_WORD = 20;//地图页面marker 的经纬都回传
|
||||
/**
|
||||
* 用户当前位置
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,531 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.Permission;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.PoiRecycleAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
/**
|
||||
* 充电站中的充电桩的Fragment
|
||||
* 2021-5-25
|
||||
*/
|
||||
public class ChargingPileFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private EditText editDescribe, editNameContent;
|
||||
private Button btnSaveLocal;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private String inode;
|
||||
private List<Info> photoBean;
|
||||
private CheckBox checkBoxLife, checkBoxRight;
|
||||
private Spinner spinnerType, spinnerScutcheon, spinnerStake;
|
||||
String[] type = new String[]{"地上五层", "地上四层", "地上三层", "地上二层", "地上一层","地下一层", "地下二层", "地下三层", "地下四层", "地下五层"};
|
||||
String[] scutcheon = new String[]{"存在", "不存在"};
|
||||
String[] stake = new String[]{"全部", "poi", "道路", "充电站", "其他"};
|
||||
private ArrayAdapter<String> adapterType, adapterScutcheon, adapterStake;
|
||||
private RadioGroup radioGroup;
|
||||
private RadioButton radioButton1, radioButton2, radioButton3, radioButton4, radioButton5, radioButton6;
|
||||
private RelativeLayout rlPanorama, rlCoding, rlEquipment, rlFacility, rlUsable, rlAvailable, rlParking, rlNumber;
|
||||
private ImageView ivPanorama, ivCoding, ivEquipment, ivFacility, ivUsable, ivAvailable, ivParking, ivNumber;
|
||||
|
||||
public static ChargingPileFragment newInstance(Bundle bundle) {
|
||||
ChargingPileFragment fragment = new ChargingPileFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.charging_pile_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
View header = LayoutInflater.from(getActivity()).inflate(R.layout.charging_pile_header, null);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.MAIN_HEADER;
|
||||
obtain.obj = header;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.MAIN_CHARGING_PILE;
|
||||
obtain.obj = isChecked;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
checkBoxRight.setVisibility(View.GONE);
|
||||
editNameContent = findViewById(R.id.tv_name_content);
|
||||
radioGroup = findViewById(R.id.radio_group);
|
||||
radioButton1 = findViewById(R.id.radio_button1);
|
||||
radioButton2 = findViewById(R.id.radio_button2);
|
||||
radioButton3 = findViewById(R.id.radio_button3);
|
||||
radioButton4 = findViewById(R.id.radio_button4);
|
||||
radioButton5 = findViewById(R.id.radio_button5);
|
||||
radioButton6 = findViewById(R.id.radio_button6);
|
||||
spinnerType = findViewById(R.id.spinner_type);
|
||||
adapterType = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, type);
|
||||
adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerType.setAdapter(adapterType);
|
||||
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
spinnerScutcheon = findViewById(R.id.spinner_scutcheon);
|
||||
adapterScutcheon = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, scutcheon);
|
||||
adapterScutcheon.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerScutcheon.setAdapter(adapterScutcheon);
|
||||
spinnerScutcheon.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
spinnerStake = findViewById(R.id.spinner_stake);
|
||||
adapterStake = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, stake);
|
||||
adapterStake.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerStake.setAdapter(adapterStake);
|
||||
spinnerStake.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
rlPanorama = findViewById(R.id.rl_panorama);
|
||||
rlPanorama.setOnClickListener(this::onClick);
|
||||
ivPanorama = findViewById(R.id.iv_panorama);
|
||||
rlCoding = findViewById(R.id.rl_coding);
|
||||
rlCoding.setOnClickListener(this::onClick);
|
||||
ivCoding = findViewById(R.id.iv_coding);
|
||||
rlEquipment = findViewById(R.id.rl_equipment);
|
||||
rlEquipment.setOnClickListener(this::onClick);
|
||||
ivEquipment = findViewById(R.id.iv_equipment);
|
||||
rlFacility = findViewById(R.id.rl_facility);
|
||||
rlFacility.setOnClickListener(this::onClick);
|
||||
ivFacility = findViewById(R.id.iv_facility);
|
||||
rlUsable = findViewById(R.id.rl_usable);
|
||||
rlUsable.setOnClickListener(this::onClick);
|
||||
ivUsable = findViewById(R.id.iv_usable);
|
||||
rlAvailable = findViewById(R.id.rl_available);
|
||||
rlAvailable.setOnClickListener(this::onClick);
|
||||
ivAvailable = findViewById(R.id.iv_available);
|
||||
rlParking = findViewById(R.id.rl_parking);
|
||||
rlParking.setOnClickListener(this::onClick);
|
||||
ivParking = findViewById(R.id.iv_parking);
|
||||
rlNumber = findViewById(R.id.rl_number);
|
||||
rlNumber.setOnClickListener(this::onClick);
|
||||
ivNumber = findViewById(R.id.iv_number);
|
||||
editDescribe = findViewById(R.id.edit_describe);
|
||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||
btnSaveLocal.setOnClickListener(this::onClick);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//禁用所有可操作性控件
|
||||
private void disables() {
|
||||
checkBoxLife.setEnabled(false);
|
||||
editNameContent.setEnabled(false);
|
||||
editDescribe.setEnabled(false);
|
||||
btnSaveLocal.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
//存储图片地址
|
||||
photoBean = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.CHARGING_PILE_WORD) {
|
||||
inode = data.obj.toString();
|
||||
Toast.makeText(getContext(), inode, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_save_local:
|
||||
XXPermissions.with(this)
|
||||
//读写权限
|
||||
.permission(Permission.MANAGE_EXTERNAL_STORAGE)
|
||||
.request(new OnPermissionCallback() {
|
||||
@Override
|
||||
public void onGranted(List<String> permissions, boolean all) {
|
||||
if (all) {
|
||||
//保存数据库:
|
||||
PoiEntity poiEntity = new PoiEntity();
|
||||
String name = editNameContent.getText().toString().trim();//名称
|
||||
if (name == null || name.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入 名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
poiEntity.setName(name);
|
||||
}
|
||||
if (inode == null || inode.equals("")) {
|
||||
Toast.makeText(getActivity(), "请确定点位", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
String[] split = inode.split(",");
|
||||
poiEntity.setX(split[0]);
|
||||
poiEntity.setY(split[1]);
|
||||
}
|
||||
String describe = editDescribe.getText().toString().trim();
|
||||
if (describe == null || describe.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入任务描述", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
poiEntity.setDescribe(describe);
|
||||
}
|
||||
if (photoBean.size() < 0) {
|
||||
Toast.makeText(getActivity(), "请拍照", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
poiEntity.setPhotoInfo(photoBean);
|
||||
}
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setTaskStatus(0);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.insertPoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.TREASURE_FRAGMENT;
|
||||
obtains.obj = false;
|
||||
EventBus.getDefault().post(obtains);
|
||||
onBackPressed();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有申请权限,请手动申请", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDenied(List<String> permissions, boolean never) {
|
||||
if (never) {
|
||||
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予权限", Toast.LENGTH_SHORT).show();
|
||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||
XXPermissions.startPermissionActivity(getActivity(), permissions);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case R.id.rl_panorama:
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
break;
|
||||
case R.id.rl_coding:
|
||||
Intent intentCoding = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentCoding, 102);
|
||||
break;
|
||||
case R.id.rl_equipment:
|
||||
Intent intentEquipment = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentEquipment, 103);
|
||||
break;
|
||||
case R.id.rl_facility:
|
||||
Intent intentFacility = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentFacility, 104);
|
||||
break;
|
||||
case R.id.rl_usable:
|
||||
Intent intentUsable = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentUsable, 105);
|
||||
break;
|
||||
case R.id.rl_available:
|
||||
Intent intentAvailable = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentAvailable, 106);
|
||||
break;
|
||||
case R.id.rl_parking:
|
||||
Intent intentParking = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentParking, 107);
|
||||
break;
|
||||
case R.id.rl_number:
|
||||
Intent intentNumber = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentNumber, 108);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 101 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivPanorama.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 102);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivCoding.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 103);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivEquipment.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 104);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivFacility.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 105);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivUsable.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}else if (requestCode == 106 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 106);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivAvailable.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}else if (requestCode == 107 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 107);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivParking.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}else if (requestCode == 108 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 108);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivNumber.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
@@ -62,8 +63,8 @@ import static android.app.Activity.RESULT_OK;
|
||||
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
|
||||
private EditText editDescribe;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlCard, rlElse;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivCard, ivElse;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlCard, rlElse,rlScutcheon;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivCard, ivElse,ivScutcheon;
|
||||
private TextView tvExamine;
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private RecyclerView recyclerPhone;
|
||||
@@ -82,6 +83,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private Spinner spinnerType;
|
||||
String[] ctype = new String[]{"全部", "poi", "道路", "充电站", "其他"};
|
||||
private ArrayAdapter<String> adapter;
|
||||
private LinearLayout linearChargingPile;
|
||||
|
||||
public static ChargingStationFragment newInstance(Bundle bundle) {
|
||||
ChargingStationFragment fragment = new ChargingStationFragment();
|
||||
@@ -94,6 +96,17 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
return R.layout.charging_station_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
super.onHiddenChanged(hidden);
|
||||
if (!hidden) {
|
||||
View header = LayoutInflater.from(getActivity()).inflate(R.layout.charging_station_header, null);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.MAIN_HEADER;
|
||||
obtain.obj = header;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
@@ -125,20 +138,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
});
|
||||
checkBoxRight.setVisibility(View.GONE);
|
||||
spinnerType = findViewById(R.id.spinner_type);
|
||||
adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item, ctype);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, ctype);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerType.setAdapter(adapter);
|
||||
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
public void onNothingSelected(AdapterView<?> parent) {}
|
||||
});
|
||||
//添加桩
|
||||
linearChargingPile = findViewById(R.id.linear_charging_pile);
|
||||
linearChargingPile.setOnClickListener(this::onClick);
|
||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||
btnSaveLocal.setOnClickListener(this::onClick);
|
||||
btnUploading = findViewById(R.id.btn_uploading);
|
||||
@@ -153,6 +165,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
ivInternal = findViewById(R.id.iv_internal);
|
||||
ivCard = findViewById(R.id.iv_card);
|
||||
ivElse = findViewById(R.id.iv_else);
|
||||
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
||||
rlPanorama = findViewById(R.id.rl_panorama);
|
||||
rlPanorama.setOnClickListener(this::onClick);
|
||||
rlName = findViewById(R.id.rl_name);
|
||||
@@ -163,6 +176,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlCard.setOnClickListener(this::onClick);
|
||||
rlElse = findViewById(R.id.rl_else);
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlScutcheon= findViewById(R.id.rl_scutcheon);
|
||||
rlScutcheon.setOnClickListener(this::onClick);
|
||||
recyclerPhone = findViewById(R.id.recycler_phone);
|
||||
recyclerPhone.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||
@@ -335,6 +350,36 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
case R.id.tv_examine:
|
||||
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case R.id.rl_panorama:
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
break;
|
||||
case R.id.rl_name:
|
||||
Intent intentName = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentName, 102);
|
||||
break;
|
||||
case R.id.rl_internal_photos:
|
||||
Intent intentInternal = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentInternal, 103);
|
||||
break;
|
||||
case R.id.rl_card:
|
||||
Intent intentCard = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentCard, 104);
|
||||
break;
|
||||
case R.id.rl_else:
|
||||
Intent intentElse = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentElse, 105);
|
||||
break;
|
||||
case R.id.rl_scutcheon:
|
||||
Intent intentScutcheon = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentScutcheon, 106);
|
||||
break;
|
||||
case R.id.linear_charging_pile:
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.CHARGING_STATION;
|
||||
obtains.obj = true;
|
||||
EventBus.getDefault().post(obtains);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,15 +387,147 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 101 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivPanorama.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
|
||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 102);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivName.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
|
||||
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 103);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivInternal.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 104);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivCard.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 105);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivElse.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
|
||||
}else if (requestCode==106 &&resultCode ==RESULT_OK){
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 106);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String takePhotoPath = PhotoPathUtil.getTakePhotoPath(data);
|
||||
Info info = new Info();
|
||||
info.setPhoto(takePhotoPath);
|
||||
photoBean.add(info);
|
||||
ivScutcheon.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -195,10 +195,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
OtherFragment otherFragment = OtherFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(otherFragment);
|
||||
break;
|
||||
}
|
||||
} else if (data.what == Constant.FILTER_LIST) { // 筛选列表所有数据地图显示
|
||||
List<PoiEntity> poiEntities = (List<PoiEntity>) data.obj;
|
||||
@@ -206,8 +202,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (data.what == Constant.TREASURE_WORD) { // POI采集-移动位置
|
||||
initPoiMarker(Boolean.valueOf((Boolean) data.obj), Constant.POI_WORD);
|
||||
|
||||
} else if (data.what == Constant.MAIN_CHARGING_STATION) {//道路采集-移动位置
|
||||
initPoiMarker(Boolean.valueOf((Boolean) data.obj), Constant.CHARGING_STATION_WORD);
|
||||
}else if (data.what==Constant.MAIN_CHARGING_STATION){//充电站采集-移动位置
|
||||
initPoiMarker(Boolean.valueOf((Boolean) data.obj),Constant.CHARGING_STATION_WORD);
|
||||
}else if (data.what ==Constant.MAIN_CHARGING_PILE){//充电桩采集-移动位置
|
||||
initPoiMarker(Boolean.valueOf((Boolean)data.obj),Constant.CHARGING_PILE_WORD);
|
||||
} else if (data.what == Constant.TREASURE_FRAGMENT) {
|
||||
if ((boolean) data.obj == true) {
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
@@ -233,6 +231,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
}
|
||||
}else if (data.what==Constant.CHARGING_STATION){//充电站的充电桩
|
||||
if ((boolean)data.obj){
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putBoolean("isSliding", false); // 通知抽屉不收回
|
||||
ChargingPileFragment chargingPileFragment = ChargingPileFragment.newInstance(bundle);
|
||||
showSlidingFragment(chargingPileFragment);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +268,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
|
||||
private void initPoiMarker(Boolean t, int aInt) {
|
||||
private void initPoiMarker(Boolean t,int aInt) {
|
||||
if (t == true) {
|
||||
//移动地图
|
||||
CameraUpdate cameraSigma =
|
||||
@@ -466,7 +472,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
/**
|
||||
* header 头部布局
|
||||
*
|
||||
* @param view
|
||||
*/
|
||||
public void initHeader(View view) {
|
||||
@@ -497,6 +502,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
fragmentTransaction.hide(filterFragment);
|
||||
}
|
||||
}
|
||||
if (!(fragment instanceof FilterFragment)) {
|
||||
ChargingStationFragment chargingStationFragment = (ChargingStationFragment) supportFragmentManager.findFragmentByTag(ChargingStationFragment.class.getName());
|
||||
if (chargingStationFragment != null) {
|
||||
fragmentTransaction.hide(chargingStationFragment);
|
||||
}
|
||||
}
|
||||
if (!(fragment instanceof PoiFragment)) {
|
||||
PoiFragment poiFragment = (PoiFragment) supportFragmentManager.findFragmentByTag(PoiFragment.class.getName());
|
||||
if (poiFragment != null) {
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.navinfo.outdoor.room;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.OnConflictStrategy;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 访问数据库操作的接口
|
||||
*/
|
||||
@Dao
|
||||
public interface ChargingPileDao {
|
||||
/**
|
||||
* 查询
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM pile")
|
||||
List<ChargingPileEntity> getChargingPile();
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insertChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Update
|
||||
void updateChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
|
||||
/**
|
||||
*删除
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteAll(List<ChargingPileEntity> chargingPileEntities);
|
||||
|
||||
/**
|
||||
* 根据条件删除
|
||||
* @param taskStatus
|
||||
*/
|
||||
@Query("DELETE FROM pile where taskStatus=:taskStatus")
|
||||
void deleteFormName(int taskStatus);
|
||||
|
||||
|
||||
/**
|
||||
* 全部删除
|
||||
*/
|
||||
@Query("DELETE FROM pile")
|
||||
void deleteAllChargingPileEntity();
|
||||
|
||||
/**
|
||||
* 降序排列
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM pile ORDER BY pileId DESC")
|
||||
List<ChargingPileEntity> getAllChargingPileEntity();
|
||||
|
||||
@Query("SELECT * FROM pile where userId = :userId")
|
||||
ChargingPileEntity queryChargingPileEntity(int userId);
|
||||
|
||||
@Query("DELETE FROM pile where userId = :userId")
|
||||
void deleteChargingPileEntity(int userId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
package com.navinfo.outdoor.room;
|
||||
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.PrimaryKey;
|
||||
import androidx.room.TypeConverters;
|
||||
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.util.PhotoInfoConverter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static androidx.room.ForeignKey.CASCADE;
|
||||
|
||||
/**
|
||||
* 充电桩的表结构
|
||||
* PoiEntity实体类的id和ChargingPileEntity实体类的pileId相关联
|
||||
* 注解中包含Delete = CASCADE, 你可以告诉SQLite,如果相应的PoiEntity实例被删除,那么删除这个PoiEntity下的所有ChargingPileEntity。
|
||||
*/
|
||||
@Entity(tableName = "pile", foreignKeys = @ForeignKey(entity = PoiEntity.class,parentColumns = "id",childColumns = "pileId",onDelete =CASCADE))
|
||||
public class ChargingPileEntity {
|
||||
@PrimaryKey(autoGenerate = true) // 设置主键,并且自动生长
|
||||
private int pileId;
|
||||
private int pid; //采集id 保存本地或提交数据时时返回
|
||||
private int taskId;//任务id
|
||||
private int userId;//用户id
|
||||
private String createTime; //创建时间/采集时间
|
||||
private String name;//名称
|
||||
private String describe;//任务描述
|
||||
private String address;//地址
|
||||
private String telPhone;//电话
|
||||
private String memo;//备注
|
||||
private double precision;//金额
|
||||
private String photo;//照片信息
|
||||
//ROOM不支持直接存储集合
|
||||
@TypeConverters(PhotoInfoConverter.class)
|
||||
private List<Info> photoInfo;//照片信息
|
||||
private int existence;//是否存在
|
||||
private String x;//经度
|
||||
private String y;//纬度
|
||||
private String detail;//深度信息
|
||||
private int taskStatus;//任务状态 0.待提交,1.已提交,2 已领取
|
||||
private int type;//0.poi,1.道路,2.充电站,3.其他
|
||||
|
||||
public int getPileId() {
|
||||
return pileId;
|
||||
}
|
||||
|
||||
public void setPileId(int pileId) {
|
||||
this.pileId = pileId;
|
||||
}
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(int taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(int pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public int getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(int taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescribe() {
|
||||
return describe;
|
||||
}
|
||||
|
||||
public void setDescribe(String describe) {
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getTelPhone() {
|
||||
return telPhone;
|
||||
}
|
||||
|
||||
public void setTelPhone(String telPhone) {
|
||||
this.telPhone = telPhone;
|
||||
}
|
||||
|
||||
public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public void setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
}
|
||||
|
||||
public double getPrecision() {
|
||||
return precision;
|
||||
}
|
||||
|
||||
public void setPrecision(double precision) {
|
||||
this.precision = precision;
|
||||
}
|
||||
|
||||
public String getPhoto() {
|
||||
return photo;
|
||||
}
|
||||
|
||||
public void setPhoto(String photo) {
|
||||
this.photo = photo;
|
||||
}
|
||||
|
||||
public List<Info> getPhotoInfo() {
|
||||
return photoInfo;
|
||||
}
|
||||
|
||||
public void setPhotoInfo(List<Info> infoList) {
|
||||
this.photoInfo = infoList;
|
||||
}
|
||||
|
||||
public int getExistence() {
|
||||
return existence;
|
||||
}
|
||||
|
||||
public void setExistence(int existence) {
|
||||
this.existence = existence;
|
||||
}
|
||||
|
||||
public String getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(String x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public String getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY(String y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
@Database(entities = {PoiEntity.class}, version = 1, exportSchema = false)
|
||||
@Database(entities = {PoiEntity.class,ChargingPileEntity.class}, version = 1, exportSchema = false)
|
||||
public abstract class PoiDatabase extends RoomDatabase {
|
||||
private static final String DB_NAME = "navinfo.db";
|
||||
private static volatile PoiDatabase instance;
|
||||
@@ -59,5 +59,6 @@ public abstract class PoiDatabase extends RoomDatabase {
|
||||
};
|
||||
|
||||
public abstract PoiDao getPoiDao();
|
||||
public abstract ChargingPileDao getChargingPileDao();
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ import com.navinfo.outdoor.util.PhotoInfoConverter;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
//poi 的实体类
|
||||
/**
|
||||
* poi, 道路,充电站,其他的表结构
|
||||
*/
|
||||
@Entity(tableName = "poi")
|
||||
public class PoiEntity implements Serializable {
|
||||
@PrimaryKey(autoGenerate = true) // 设置主键,并且自动生长
|
||||
@@ -20,10 +22,10 @@ public class PoiEntity implements Serializable {
|
||||
private int taskId;//任务id
|
||||
private int userId;//用户id
|
||||
private String createTime; //创建时间/采集时间
|
||||
private String name;//poi名称
|
||||
private String name;//名称
|
||||
private String describe;//任务描述
|
||||
private String address;//poi地址
|
||||
private String telPhone;//poi电话
|
||||
private String address;//地址
|
||||
private String telPhone;//电话
|
||||
private String memo;//备注
|
||||
private double precision;//金额
|
||||
private String photo;//照片信息
|
||||
|
||||
BIN
app/src/main/res/drawable/canuse.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/res/drawable/chargeaim.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/res/drawable/chartall.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/res/drawable/equipnum.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/equipsign.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/explain.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable/explain1.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable/name.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/parknum.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/res/drawable/parkprice.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
659
app/src/main/res/layout/charging_pile_fragment.xml
Normal file
@@ -0,0 +1,659 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scroller_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/tv_01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="01.基本资料填写"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_pot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_01">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:text="点位*"
|
||||
android:textColor="#333" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_pot_life"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/tv_pot"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:text="编辑"
|
||||
android:textSize="8sp" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_pot_right"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/check_pot_life"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
android:text="保存"
|
||||
android:textSize="8sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_pot"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="名称*"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_name_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_name"
|
||||
android:background="@color/white"
|
||||
android:hint="充电桩"
|
||||
android:layout_toEndOf="@id/tv_name"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="开放状态"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="normal"
|
||||
android:textColor="#333"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_name" />
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对所有车辆开放"
|
||||
/>
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对环卫车开放"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对公交车开放"
|
||||
/>
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对出租车开放"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对除环卫,公交,出租,品牌,之外的其他 特种车辆开放"
|
||||
/>
|
||||
<RadioButton
|
||||
android:id="@+id/radio_button6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="对某品牌汽车开放"
|
||||
/>
|
||||
|
||||
</RadioGroup>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/radio_group"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="充电地面层"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_type"
|
||||
android:background="@color/white"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toEndOf="@id/tv_type"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_02"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="02.拍照"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_type" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_photograph"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_02"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_panorama"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#03A9F4"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/image_panorama"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/chartall"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*全景照片"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_panorama"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_panorama"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_coding"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#03A9F4"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/image_coding"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/equipnum"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*充电桩编码"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_coding"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_coding"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_scutcheon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/radio_group"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_scutcheon"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="设备标牌"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_scutcheon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_scutcheon"
|
||||
android:background="@color/white"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toEndOf="@id/tv_scutcheon"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_equipment"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#03A9F4"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/image_equipment"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/equipsign"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*设备标牌"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_equipment"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_equipment"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_facility"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#EFEDED"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/image_facility"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/equipsign"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*设备标牌"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_facility"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_facility"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_stake"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/radio_group"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_stake"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="桩可用状态"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_stake"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_stake"
|
||||
android:background="@color/white"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toEndOf="@id/tv_stake"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="100dp"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_usable"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#03A9F4"
|
||||
android:layout_alignParentLeft="true"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/image_usable"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/canuse"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*可用状态"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_usable"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_usable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_available"
|
||||
android:layout_width="100dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#EFEDED">
|
||||
<ImageView
|
||||
android:id="@+id/image_available"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/canuse"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="可用状态"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_available"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_available"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_parking"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="#03A9F4">
|
||||
<ImageView
|
||||
android:id="@+id/image_parking"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/parknum"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*停车位编号"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_parking"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_parking"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_number"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="#EFEDED"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/image_number"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/parknum"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="停车位编号"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_number"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_03"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="03.描述"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_photograph" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_describe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_03"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<EditText
|
||||
android:id="@+id/edit_describe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="30dp"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="top"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@color/white"
|
||||
android:hint="任务描述"
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_describe">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save_local"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_red_radius_bg"
|
||||
android:text="保存并返回"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
58
app/src/main/res/layout/charging_pile_header.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<ImageView
|
||||
android:id="@+id/road_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="150dp"
|
||||
android:background="@drawable/top_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="充电桩"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/road_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/road_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/road_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/road_bg" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/top_bg_line_left"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv1"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv1"
|
||||
app:layout_constraintTop_toTopOf="@id/tv1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@drawable/top_bg_line_right"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv1"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv1"
|
||||
app:layout_constraintTop_toTopOf="@id/tv1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="任务说明"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv1"
|
||||
app:layout_constraintRight_toRightOf="@id/tv1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -257,14 +257,14 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/quanjing"
|
||||
android:background="@drawable/chartall"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*全景图"
|
||||
android:text="*全景照片"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
@@ -291,14 +291,14 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/mingcheng"
|
||||
android:background="@drawable/name"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="*名称"
|
||||
android:text="*名称照片"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
@@ -325,14 +325,14 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/mingcheng"
|
||||
android:background="@drawable/explain"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="内部照片"
|
||||
android:text="*服务说明"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
@@ -357,7 +357,7 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#EFEDED"
|
||||
android:background="#03A9F4"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
@@ -365,14 +365,14 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/mingpian"
|
||||
android:background="@drawable/explain1"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="名片"
|
||||
android:text="服务说明"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
@@ -391,7 +391,7 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#EFEDED"
|
||||
android:background="#03A9F4"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
@@ -399,14 +399,14 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/qita"
|
||||
android:background="@drawable/chargeaim"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="其他"
|
||||
android:text="充电站指引牌"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
@@ -419,14 +419,40 @@
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_scutcheon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="#03A9F4"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/image_scutcheon"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/parkprice"
|
||||
android:layout_height="20dp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="停车收费标牌"
|
||||
android:textSize="8sp"
|
||||
android:layout_margin="5dp"
|
||||
android:textColor="@color/pickerview_wheelview_textcolor_divider"
|
||||
android:layout_below="@id/image_scutcheon"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/iv_scutcheon"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
@@ -437,6 +463,39 @@
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_photograph" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_charging_pile"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_03">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:background="@drawable/plus"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="添加桩"
|
||||
android:textColor="#D1CBCB"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_04"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="03.描述"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_charging_pile" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_describe"
|
||||
android:layout_width="match_parent"
|
||||
@@ -445,7 +504,7 @@
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_03"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_04"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<EditText
|
||||
|
||||