修改POI录像的崩溃问题

This commit is contained in:
md 2021-08-04 14:42:13 +08:00
parent 30ad378cde
commit 771fce9b79
13 changed files with 247 additions and 174 deletions

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android { android {
compileSdkVersion 29 compileSdkVersion 29
buildToolsVersion '29.0.2' buildToolsVersion '29.0.2'
// ndkVersion '23.0.7123448' ndkVersion '23.0.7123448'
defaultConfig { defaultConfig {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"

View File

@ -438,9 +438,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
private void initShowPoi() { private void initShowPoi() {
// 添加信息 // 添加信息
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity"); showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
if (showPoiEntity.getTaskStatus()==1||showPoiEntity.getTaskStatus()==5){ if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
tvExamine.setVisibility(View.GONE); tvExamine.setVisibility(View.GONE);
}else { } else {
tvExamine.setVisibility(View.VISIBLE); tvExamine.setVisibility(View.VISIBLE);
} }
String name = showPoiEntity.getName();//名称 String name = showPoiEntity.getName();//名称
@ -579,7 +579,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
obtain.what = Constant.CHARGING_STATION; obtain.what = Constant.CHARGING_STATION;
obtain.obj = showStation; obtain.obj = showStation;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
}else { } else {
Message obtains = Message.obtain(); Message obtains = Message.obtain();
obtains.what = Constant.CHARGING_STATION_PILE; obtains.what = Constant.CHARGING_STATION_PILE;
obtains.obj = null; obtains.obj = null;
@ -1093,7 +1093,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
@Override @Override
public void onSuccess(ChargingStationBean chargingStationBean, int id) { public void onSuccess(ChargingStationBean chargingStationBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (chargingStationBean.getCode() == 200) {
bodyId = chargingStationBean.getBody(); bodyId = chargingStationBean.getBody();
if (bodyId != null && bodyId != 0) {
poiEntity.setBodyId(bodyId); poiEntity.setBodyId(bodyId);
poiEntity.setTaskStatus(3); poiEntity.setTaskStatus(3);
new Thread(new Runnable() { new Thread(new Runnable() {
@ -1117,6 +1119,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
}); });
} }
}).start(); }).start();
} else {
Toast.makeText(getContext(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(getContext(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} }
@Override @Override
@ -1453,7 +1461,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
public void run() { public void run() {
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId()); PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
if (poiDaoPoiEntity != null) { if (poiDaoPoiEntity != null) {
if (poiDaoPoiEntity.getTaskStatus()==5){ if (poiDaoPoiEntity.getTaskStatus() == 5) {
poiDao.deletePoiEntity(poiDaoPoiEntity); poiDao.deletePoiEntity(poiDaoPoiEntity);
} }
} }

View File

@ -358,8 +358,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntityList); InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntityList);
} }
//获取当前位置的marker //获取当前位置的marker
senMessageMarker(chargingStationEntity.getType(), chargingStationEntity.getY(), chargingStationEntity.getX()); // senMessageMarker(chargingStationEntity.getType(), chargingStationEntity.getY(), chargingStationEntity.getX());
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(),chargingStationEntity); // InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(),chargingStationEntity);
getActivity().runOnUiThread(new Runnable() { getActivity().runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -681,8 +681,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
poiListEntity.setY(latPolygon.get(0).latitude + ""); poiListEntity.setY(latPolygon.get(0).latitude + "");
} }
// 通知地图界面显示当前编辑数据的marker // 通知地图界面显示当前编辑数据的marker
senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX()); // senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX());
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity); // InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
getActivity().runOnUiThread(new Runnable() { getActivity().runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -790,8 +790,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
poiListEntity.setY(latPolygon.get(0).latitude + ""); poiListEntity.setY(latPolygon.get(0).latitude + "");
} }
// 通知地图界面显示当前编辑数据的marker // 通知地图界面显示当前编辑数据的marker
senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX()); // senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX());
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity); // InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
getActivity().runOnUiThread(new Runnable() { getActivity().runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@ -526,7 +526,9 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
@Override @Override
public void onSuccess(PoiSaveBean poiSaveBean, int id) { public void onSuccess(PoiSaveBean poiSaveBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (poiSaveBean.getCode()==200){
Integer body = poiSaveBean.getBody(); Integer body = poiSaveBean.getBody();
if (body!=null&&body!=0){
poiEntity.setBodyId(body); poiEntity.setBodyId(body);
poiEntity.setTaskStatus(3); poiEntity.setTaskStatus(3);
new Thread(new Runnable() { new Thread(new Runnable() {
@ -546,6 +548,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
}); });
} }
}).start(); }).start();
}else {
Toast.makeText(getActivity(), ""+poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(getActivity(), ""+poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} }
@Override @Override

View File

@ -799,7 +799,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
@Override @Override
public void onSuccess(PoiSaveBean poiSaveBean, int id) { public void onSuccess(PoiSaveBean poiSaveBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (poiSaveBean.getCode()==200){
Integer body = poiSaveBean.getBody(); Integer body = poiSaveBean.getBody();
if (body!=null&&body!=0){
poiEntity.setBodyId(body); poiEntity.setBodyId(body);
poiEntity.setTaskStatus(3); poiEntity.setTaskStatus(3);
new Thread(new Runnable() { new Thread(new Runnable() {
@ -819,6 +821,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}); });
} }
}).start(); }).start();
}else {
Toast.makeText(getActivity(), ""+poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(getActivity(), ""+poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} }
@Override @Override

View File

@ -14,6 +14,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RadioButton; import android.widget.RadioButton;
import android.widget.RadioGroup; import android.widget.RadioGroup;
@ -91,6 +92,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
private Button btnPoiVideoUpload; private Button btnPoiVideoUpload;
private String videoPath; private String videoPath;
private File fileZip; private File fileZip;
private FrameLayout fmPoiVideoPic;
public static PoiVideoFragment newInstance(Bundle bundle) { public static PoiVideoFragment newInstance(Bundle bundle) {
PoiVideoFragment fragment = new PoiVideoFragment(); PoiVideoFragment fragment = new PoiVideoFragment();
@ -151,12 +153,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
rbWalking = (RadioButton) findViewById(R.id.rb_walking); rbWalking = (RadioButton) findViewById(R.id.rb_walking);
rbManual = (RadioButton) findViewById(R.id.rb_manual); rbManual = (RadioButton) findViewById(R.id.rb_manual);
etDesc = (EditText) findViewById(R.id.et_desc); etDesc = (EditText) findViewById(R.id.et_desc);
fmPoiVideoPic = findViewById(R.id.fm_poi_video_picture);
btnRoadSave = (Button) findViewById(R.id.btn_poi_video_save); btnRoadSave = (Button) findViewById(R.id.btn_poi_video_save);
btnRoadSave.setOnClickListener(this::onClick); btnRoadSave.setOnClickListener(this::onClick);
btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload); btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload);
btnPoiVideoUpload.setOnClickListener(this::onClick); btnPoiVideoUpload.setOnClickListener(this::onClick);
rgType = (RadioGroup) findViewById(R.id.rg_type); rgType = (RadioGroup) findViewById(R.id.rg_type);
ivPoiVideoPicture.setOnClickListener(new View.OnClickListener() { fmPoiVideoPic.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (v.getTag() == null) { if (v.getTag() == null) {
@ -164,19 +167,19 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
return; return;
} }
File videoFile = (File) v.getTag(); File videoFile = (File) v.getTag();
Intent intent = new Intent(getContext(), PicturesActivity.class); Intent intent = new Intent(getContext(), PictureActivity.class);
intent.putExtra(Constant.INTENT_VIDEO_PATH, videoFile.getAbsolutePath()); intent.putExtra(Constant.INTENT_VIDEO_PATH, videoFile.getAbsolutePath());
startActivityForResult(intent, 0x101); startActivityForResult(intent, 0x101);
} }
}); });
ivPoiVideoPicture.setOnLongClickListener(new View.OnLongClickListener() { fmPoiVideoPic.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE; DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
File videoFile = (File) ivPoiVideoPicture.getTag(); File videoFile = (File) fmPoiVideoPic.getTag();
if (videoFile != null) { if (videoFile != null) {
videoFile.delete(); videoFile.delete();
//获取文件名 //获取文件名
@ -215,7 +218,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
if (videoFile.exists()) { if (videoFile.exists()) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
ivPoiVideoPicture.setTag(videoFile); fmPoiVideoPic.setTag(videoFile);
} }
} }
} }
@ -271,7 +274,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
// 根据用户点击的时间为视频名称赋值 // 根据用户点击的时间为视频名称赋值
DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
String videoFormatName = formatter.format(new Date()); String videoFormatName = formatter.format(new Date());
Intent intent = new Intent(getContext(), PicturesActivity.class); Intent intent = new Intent(getContext(), PictureActivity.class);
intent.putExtra(Constant.INTENT_VIDEO_PATH, Constant.PICTURE_FOLDER + "/" + videoFormatName + ".mp4"); intent.putExtra(Constant.INTENT_VIDEO_PATH, Constant.PICTURE_FOLDER + "/" + videoFormatName + ".mp4");
startActivityForResult(intent, 0x101); startActivityForResult(intent, 0x101);
@ -280,8 +283,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
case R.id.btn_poi_video_upload: case R.id.btn_poi_video_upload:
showLoadingDialog(); showLoadingDialog();
ArrayList<File> videoFileList = new ArrayList<>(); ArrayList<File> videoFileList = new ArrayList<>();
if (ivPoiVideoPicture.getTag() != null) { if (fmPoiVideoPic.getTag() != null) {
File videoFile = (File) ivPoiVideoPicture.getTag(); File videoFile = (File) fmPoiVideoPic.getTag();
videoFileList.add(videoFile); videoFileList.add(videoFile);
File file = new File(videoFile.getPath()+".txt"); File file = new File(videoFile.getPath()+".txt");
videoFileList.add(file); videoFileList.add(file);
@ -372,7 +375,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
poiEntity.setTaskId(showPoiEntity.getTaskId()); poiEntity.setTaskId(showPoiEntity.getTaskId());
} }
} }
File videoFile = (File) ivPoiVideoPicture.getTag(); File videoFile = (File) fmPoiVideoPic.getTag();
if (videoFile == null ) { if (videoFile == null ) {
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
return; return;
@ -505,6 +508,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
@Override @Override
public void onSuccess(PoiVideoBean poiVideoBean, int id) { public void onSuccess(PoiVideoBean poiVideoBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (poiVideoBean.getCode()==200){
Integer poiVideoBody = poiVideoBean.getBody(); Integer poiVideoBody = poiVideoBean.getBody();
if (poiVideoBody != null && poiVideoBody != 0) { if (poiVideoBody != null && poiVideoBody != 0) {
poiEntity.setBodyId(poiVideoBody); poiEntity.setBodyId(poiVideoBody);
@ -529,6 +533,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
} else { } else {
Toast.makeText(getActivity(), ""+poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), ""+poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
} }
}else {
Toast.makeText(getActivity(), ""+poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} }
@ -552,7 +560,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
File videoFile = new File(videoPath); File videoFile = new File(videoPath);
if (videoFile.exists()) { if (videoFile.exists()) {
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
ivPoiVideoPicture.setTag(videoFile); fmPoiVideoPic.setTag(videoFile);
} }
} }
} }

View File

@ -14,6 +14,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RadioButton; import android.widget.RadioButton;
import android.widget.RadioGroup; import android.widget.RadioGroup;
@ -86,6 +87,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
private Button roadUpload; private Button roadUpload;
private String videoPath; private String videoPath;
private File fileZip; private File fileZip;
private FrameLayout fmRoadPic;
public static RoadFragment newInstance(Bundle bundle) { public static RoadFragment newInstance(Bundle bundle) {
RoadFragment fragment = new RoadFragment(); RoadFragment fragment = new RoadFragment();
@ -147,12 +149,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
rbWalking = (RadioButton) findViewById(R.id.rb_walking); rbWalking = (RadioButton) findViewById(R.id.rb_walking);
rbManual = (RadioButton) findViewById(R.id.rb_manual); rbManual = (RadioButton) findViewById(R.id.rb_manual);
etDesc = (EditText) findViewById(R.id.et_desc); etDesc = (EditText) findViewById(R.id.et_desc);
fmRoadPic = findViewById(R.id.fm_road_picture);
btnRoadSave = (Button) findViewById(R.id.btn_road_save); btnRoadSave = (Button) findViewById(R.id.btn_road_save);
btnRoadSave.setOnClickListener(this::onClick); btnRoadSave.setOnClickListener(this::onClick);
rgType = (RadioGroup) findViewById(R.id.rg_type); rgType = (RadioGroup) findViewById(R.id.rg_type);
roadUpload = findViewById(R.id.road_upload); roadUpload = findViewById(R.id.road_upload);
roadUpload.setOnClickListener(this::onClick); roadUpload.setOnClickListener(this::onClick);
ivRoadPicture.setOnClickListener(new View.OnClickListener() { fmRoadPic.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (v.getTag() == null) { if (v.getTag() == null) {
@ -192,7 +195,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
if (videoFile.exists()) { if (videoFile.exists()) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
ivRoadPicture.setTag(videoFile); fmRoadPic.setTag(videoFile);
} }
} }
} }
@ -263,9 +266,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
case R.id.road_upload: case R.id.road_upload:
showLoadingDialog(); showLoadingDialog();
ArrayList<File> videoFileList = new ArrayList<>(); ArrayList<File> videoFileList = new ArrayList<>();
if (ivRoadPicture.getTag() != null) { if (fmRoadPic.getTag() != null) {
File videoFile = (File) ivRoadPicture.getTag(); File videoFile = (File) fmRoadPic.getTag();
videoFileList.add(videoFile); videoFileList.add(videoFile);
File file = new File(videoFile.getPath() + ".txt"); File file = new File(videoFile.getPath() + ".txt");
videoFileList.add(file); videoFileList.add(file);
@ -346,11 +349,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
poiEntity.setTaskId(showPoiEntity.getTaskId()); poiEntity.setTaskId(showPoiEntity.getTaskId());
} }
} }
if (ivRoadPicture.getTag() == null) { if (fmRoadPic.getTag() == null) {
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
return; return;
} else { } else {
File videoFile = (File) ivRoadPicture.getTag(); File videoFile = (File) fmRoadPic.getTag();
String path = videoFile.getPath() + ".txt"; String path = videoFile.getPath() + ".txt";
poiEntity.setPhoto(videoFile.getAbsolutePath()); poiEntity.setPhoto(videoFile.getAbsolutePath());
List<String> strings = FileUtils.readFileToList(path, "utf-8"); List<String> strings = FileUtils.readFileToList(path, "utf-8");
@ -482,6 +485,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
@Override @Override
public void onSuccess(RoadSaveBean roadSaveBean, int id) { public void onSuccess(RoadSaveBean roadSaveBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (roadSaveBean.getCode()==200){
Integer roadBody = roadSaveBean.getBody(); Integer roadBody = roadSaveBean.getBody();
if (roadBody!=null&&roadBody!=0){ if (roadBody!=null&&roadBody!=0){
poiEntity.setBodyId(roadBody); poiEntity.setBodyId(roadBody);
@ -506,6 +510,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
}else { }else {
Toast.makeText(getContext(), ""+roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), ""+roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
} }
}else {
Toast.makeText(getContext(), ""+roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
}
} }
@ -530,7 +538,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
File videoFile = new File(videoPath); File videoFile = new File(videoPath);
if (videoFile.exists()) { if (videoFile.exists()) {
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
ivRoadPicture.setTag(videoFile); fmRoadPic.setTag(videoFile);
} }
} }
} }

View File

@ -203,7 +203,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
staySubmitAdapter.setAllCheckedDelete(); staySubmitAdapter.setAllCheckedDelete();
refreshData(); // refreshData();
return false; return false;
} }
}); });

View File

@ -72,8 +72,8 @@
<Button <Button
android:id="@+id/btn_attestation" android:id="@+id/btn_attestation"
style="@style/user_style" style="@style/user_style"
android:layout_width="70dp" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="去认证" android:text="去认证"
@ -102,8 +102,8 @@
/> />
<Button <Button
android:id="@+id/btn_gathering" android:id="@+id/btn_gathering"
android:layout_width="70dp" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="去绑定" android:text="去绑定"
@ -258,8 +258,8 @@
style="@style/user_text_style" style="@style/user_text_style"
/> />
<Button <Button
android:layout_width="70dp" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:text="去绑定" android:text="去绑定"

View File

@ -36,11 +36,11 @@
android:id="@+id/ll_name" android:id="@+id/ll_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/road_shape" android:background="@drawable/road_shape"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
app:layout_constraintStart_toStartOf="@+id/tv_message" app:layout_constraintStart_toStartOf="@+id/tv_message"
app:layout_constraintTop_toBottomOf="@+id/tv_message"> app:layout_constraintTop_toBottomOf="@+id/tv_message">
@ -56,12 +56,12 @@
<EditText <EditText
android:id="@+id/et_road_name" android:id="@+id/et_road_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:gravity="center_vertical"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="14sp" android:background="@null"
android:gravity="center_vertical"
android:inputType="text" android:inputType="text"
android:maxLines="1" android:maxLines="1"
android:background="@null" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<TextView <TextView
@ -79,8 +79,8 @@
android:id="@+id/ll_mode" android:id="@+id/ll_mode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginLeft="2dp" android:layout_marginLeft="2dp"
android:layout_marginTop="15dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@id/tv_mode"> app:layout_constraintTop_toBottomOf="@id/tv_mode">
@ -96,32 +96,32 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/test_color_selector" android:text="车行"
android:text="车行" /> android:textColor="@color/test_color_selector" />
<RadioButton <RadioButton
android:id="@+id/rb_bicycle" android:id="@+id/rb_bicycle"
android:layout_width="0dp" android:layout_width="0dp"
android:textColor="@color/test_color_selector"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="自行车" /> android:text="自行车"
android:textColor="@color/test_color_selector" />
<RadioButton <RadioButton
android:id="@+id/rb_walking" android:id="@+id/rb_walking"
android:layout_width="0dp" android:layout_width="0dp"
android:textColor="@color/test_color_selector"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="步行" /> android:text="步行"
android:textColor="@color/test_color_selector" />
<RadioButton <RadioButton
android:id="@+id/rb_manual" android:id="@+id/rb_manual"
android:layout_width="0dp" android:layout_width="0dp"
android:textColor="@color/test_color_selector"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="手动" /> android:text="手动"
android:textColor="@color/test_color_selector" />
</RadioGroup> </RadioGroup>
</LinearLayout> </LinearLayout>
@ -146,8 +146,8 @@
<TextView <TextView
android:id="@+id/tv_pictures" android:id="@+id/tv_pictures"
style="@style/user_style" style="@style/user_style"
android:layout_width="40dp" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:gravity="center" android:gravity="center"
android:text="拍照" android:text="拍照"
@ -155,21 +155,35 @@
android:textSize="15sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
<FrameLayout
android:id="@+id/fm_road_picture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:layout_constraintLeft_toLeftOf="@id/ll_pictures"
app:layout_constraintTop_toBottomOf="@id/ll_pictures">
<ImageView <ImageView
android:id="@+id/iv_road_picture" android:id="@+id/iv_road_picture"
android:layout_width="200dp" android:layout_width="wrap_content"
android:layout_height="100dp" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:minWidth="140dp"
app:layout_constraintLeft_toLeftOf="@id/ll_pictures" android:minHeight="70dp"
app:layout_constraintTop_toBottomOf="@id/ll_pictures" /> android:maxHeight="100dp"
android:maxWidth="200dp"
android:scaleType="fitXY"
/>
</FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_desc" android:id="@+id/ll_desc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="@id/iv_road_picture" app:layout_constraintLeft_toLeftOf="@id/fm_road_picture"
app:layout_constraintTop_toBottomOf="@id/iv_road_picture"> app:layout_constraintTop_toBottomOf="@id/fm_road_picture">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -179,6 +193,7 @@
android:text="03.描述" android:text="03.描述"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" /> android:textSize="16sp" />
<LinearLayout <LinearLayout
android:id="@+id/linear_describe" android:id="@+id/linear_describe"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -187,24 +202,25 @@
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:background="@drawable/underline" android:background="@drawable/underline"
app:layout_constraintTop_toBottomOf="@id/tv_03"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_03">
<EditText <EditText
android:id="@+id/et_desc" android:id="@+id/et_desc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingBottom="30dp"
android:layout_margin="2dp" android:layout_margin="2dp"
android:gravity="top" android:background="@color/white"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:background="@color/white" android:gravity="top"
android:hint="任务描述" android:hint="任务描述"
android:textSize="15sp" android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingBottom="30dp"
android:textColor="@color/test_color_selector" android:textColor="@color/test_color_selector"
android:textSize="15sp"
/> />

View File

@ -134,8 +134,8 @@
<TextView <TextView
android:id="@+id/tv_pictures" android:id="@+id/tv_pictures"
style="@style/user_style" style="@style/user_style"
android:layout_width="40dp" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:gravity="center" android:gravity="center"
android:text="拍照" android:text="拍照"
@ -144,21 +144,31 @@
</LinearLayout> </LinearLayout>
<FrameLayout
<ImageView android:id="@+id/fm_poi_video_picture"
android:id="@+id/iv_poi_video_picture" android:layout_width="wrap_content"
android:layout_width="100dp" android:layout_height="wrap_content"
android:layout_height="100dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
app:layout_constraintLeft_toLeftOf="@id/ll_pictures" app:layout_constraintLeft_toLeftOf="@id/ll_pictures"
app:layout_constraintTop_toBottomOf="@id/ll_pictures" /> app:layout_constraintTop_toBottomOf="@id/ll_pictures">
<ImageView
android:id="@+id/iv_poi_video_picture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="140dp"
android:minHeight="70dp"
android:maxHeight="100dp"
android:maxWidth="200dp"
android:scaleType="fitXY"/>
</FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_desc" android:id="@+id/ll_desc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="@id/iv_poi_video_picture" app:layout_constraintLeft_toLeftOf="@id/fm_poi_video_picture"
app:layout_constraintTop_toBottomOf="@id/iv_poi_video_picture"> app:layout_constraintTop_toBottomOf="@id/fm_poi_video_picture">
<RelativeLayout <RelativeLayout
android:id="@+id/linear_exist" android:id="@+id/linear_exist"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -2,4 +2,5 @@
<!--状态栏--> <!--状态栏-->
<dimen name="top_pind_sp">20dp</dimen> <dimen name="top_pind_sp">20dp</dimen>
<dimen name="fab_margin">16dp</dimen> <dimen name="fab_margin">16dp</dimen>
<dimen name="default_widget_padding">6dp</dimen>
</resources> </resources>

View File

@ -82,6 +82,7 @@
<!-- ‘我的-用户资料’方框设置--> <!-- ‘我的-用户资料’方框设置-->
<style name="user_style"> <style name="user_style">
<item name="android:background">@drawable/selector_red_bg</item> <item name="android:background">@drawable/selector_red_bg</item>
<item name="android:padding">@dimen/default_widget_padding</item>
</style> </style>
<!-- ‘我的-用户资料’字体设置--> <!-- ‘我的-用户资料’字体设置-->
<style name="user_text_style"> <style name="user_text_style">