完成‘其他’页面的布局展示和添加回退按钮

This commit is contained in:
md 2021-06-22 18:26:02 +08:00
parent 191242b9b3
commit f7e28719ec
21 changed files with 628 additions and 233 deletions

View File

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

View File

@ -21,6 +21,7 @@ import com.navinfo.outdoor.fragment.IssueFragment;
import com.navinfo.outdoor.fragment.IssueWebFragment; import com.navinfo.outdoor.fragment.IssueWebFragment;
import com.navinfo.outdoor.fragment.MapDownloadFragment; import com.navinfo.outdoor.fragment.MapDownloadFragment;
import com.navinfo.outdoor.fragment.MineFragment; import com.navinfo.outdoor.fragment.MineFragment;
import com.navinfo.outdoor.fragment.OtherFragment;
import com.navinfo.outdoor.fragment.PoiFragment; import com.navinfo.outdoor.fragment.PoiFragment;
import com.navinfo.outdoor.fragment.PoiTaskFragment; import com.navinfo.outdoor.fragment.PoiTaskFragment;
import com.navinfo.outdoor.fragment.PrivilegeFragment; import com.navinfo.outdoor.fragment.PrivilegeFragment;
@ -84,7 +85,7 @@ public class FragmentManagement extends BaseActivity {
private HasSubmitFragment hasSubmitFragment;//记录-已提交的fragment -30 private HasSubmitFragment hasSubmitFragment;//记录-已提交的fragment -30
private PoiTaskFragment poiTaskFragment;//记录-已提交-POI任务列表的fragment -31 private PoiTaskFragment poiTaskFragment;//记录-已提交-POI任务列表的fragment -31
private FilterFragment filterFragment;//寻宝-筛选界面 -32 private FilterFragment filterFragment;//寻宝-筛选界面 -32
private OtherFragment otherFragment;//寻宝-上传-其他的fragment -33
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.management_fragment; return R.layout.management_fragment;
@ -165,8 +166,10 @@ public class FragmentManagement extends BaseActivity {
fragmentTransaction.hide(hasSubmitFragment); fragmentTransaction.hide(hasSubmitFragment);
if (poiTaskFragment != null) //记录-已提交-任务列表的fragment -31 if (poiTaskFragment != null) //记录-已提交-任务列表的fragment -31
fragmentTransaction.hide(poiTaskFragment); fragmentTransaction.hide(poiTaskFragment);
if (filterFragment != null)//寻宝-删选 if (filterFragment != null)//寻宝-筛选 -32
fragmentTransaction.hide(filterFragment); fragmentTransaction.hide(filterFragment);
if (otherFragment != null)//寻宝-上传-其他 -33
fragmentTransaction.hide(otherFragment);
} }
@ -426,7 +429,7 @@ public class FragmentManagement extends BaseActivity {
fragmentTransaction.show(poiTaskFragment); fragmentTransaction.show(poiTaskFragment);
} }
break; break;
case 32://寻宝- case 32://寻宝-
if (filterFragment == null) { if (filterFragment == null) {
filterFragment = FilterFragment.newInstance(new Bundle()); filterFragment = FilterFragment.newInstance(new Bundle());
fragmentTransaction.add(R.id.frame_layout, filterFragment); fragmentTransaction.add(R.id.frame_layout, filterFragment);
@ -434,6 +437,14 @@ public class FragmentManagement extends BaseActivity {
fragmentTransaction.show(filterFragment); fragmentTransaction.show(filterFragment);
} }
break; break;
case 33://寻宝- 上传-其他
if (otherFragment == null) {
otherFragment = OtherFragment.newInstance(new Bundle());
fragmentTransaction.add(R.id.frame_layout, otherFragment);
} else {
fragmentTransaction.show(otherFragment);
}
break;
} }
fragmentTransaction.commit(); fragmentTransaction.commit();
} }

View File

@ -105,7 +105,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
obtain.what = Constant.MAIN_HEADER; obtain.what = Constant.MAIN_HEADER;
obtain.obj = header; obtain.obj = header;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
} }
@Override @Override

View File

@ -6,6 +6,7 @@ import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
@ -52,6 +53,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
obtain.what = Constant.MAIN_HEADER; obtain.what = Constant.MAIN_HEADER;
obtain.obj = header; obtain.obj = header;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
} }
} }

View File

@ -1,30 +1,57 @@
package com.navinfo.outdoor.fragment; package com.navinfo.outdoor.fragment;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.slidingpanelayout.widget.SlidingPaneLayout;
import com.navinfo.outdoor.R; import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseFragment; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment;
import org.greenrobot.eventbus.EventBus;
/** /**
* 寻宝-上报-其他的fragment * 寻宝-上报-其他的fragment
*/ */
public class OtherFragment extends BaseFragment implements View.OnClickListener{ public class OtherFragment extends BaseDrawerFragment implements View.OnClickListener {
private ImageView ivOtherFinal;
public static OtherFragment newInstance(Bundle bundle) {
OtherFragment fragment = new OtherFragment();
fragment.setArguments(bundle);
return fragment;
}
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.fragment_other; return R.layout.fragment_other;
} }
@Override
public void onStart() {
super.onStart();
View header = LayoutInflater.from(getActivity()).inflate(R.layout.other_header, null);
Message obtain = Message.obtain();
obtain.what = Constant.MAIN_HEADER;
obtain.obj = header;
EventBus.getDefault().post(obtain);
}
@Override @Override
protected void initView() { protected void initView() {
super.initView(); super.initView();
} }
@Override @Override
@ -34,6 +61,8 @@ public class OtherFragment extends BaseFragment implements View.OnClickListener
@Override @Override
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) {
}
} }
} }

View File

@ -1,17 +1,10 @@
package com.navinfo.outdoor.fragment; package com.navinfo.outdoor.fragment;
import android.Manifest;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.media.ExifInterface;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
@ -34,11 +27,12 @@ import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.Permission; import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions; import com.hjq.permissions.XXPermissions;
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener; import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
import com.kongzue.dialog.interfaces.OnDismissListener;
import com.kongzue.dialog.util.BaseDialog; import com.kongzue.dialog.util.BaseDialog;
import com.kongzue.dialog.util.DialogSettings; import com.kongzue.dialog.util.DialogSettings;
import com.kongzue.dialog.v3.MessageDialog; import com.kongzue.dialog.v3.MessageDialog;
import com.kongzue.dialog.v3.ShareDialog;
import com.navinfo.outdoor.R; import com.navinfo.outdoor.R;
import com.navinfo.outdoor.activity.FragmentManagement;
import com.navinfo.outdoor.adapter.PoiRecycleAdapter; import com.navinfo.outdoor.adapter.PoiRecycleAdapter;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
@ -47,14 +41,11 @@ import com.navinfo.outdoor.bean.PoiBean;
import com.navinfo.outdoor.room.PoiDao; import com.navinfo.outdoor.room.PoiDao;
import com.navinfo.outdoor.room.PoiDatabase; import com.navinfo.outdoor.room.PoiDatabase;
import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.PhotoPathUtil; import com.navinfo.outdoor.util.PhotoPathUtil;
import com.navinfo.outdoor.util.ToastUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import java.io.Serializable;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -109,12 +100,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
if (!EventBus.getDefault().isRegistered(this)) {//加上判断 if (!EventBus.getDefault().isRegistered(this)) {//加上判断
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
} }
View header = LayoutInflater.from(getActivity()).inflate(R.layout.poi_header, null); View header = LayoutInflater.from(getActivity()).inflate(R.layout.poi_header, null);
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what = Constant.MAIN_HEADER; obtain.what = Constant.MAIN_HEADER;
obtain.obj = header; obtain.obj = header;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
} }
@Override @Override
@ -156,23 +149,25 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
rlInternalPhotos.setOnClickListener(this::onClick); rlInternalPhotos.setOnClickListener(this::onClick);
rlCard = findViewById(R.id.rl_card); rlCard = findViewById(R.id.rl_card);
rlCard.setOnClickListener(this::onClick); rlCard.setOnClickListener(this::onClick);
rlElse = findViewById(R.id.rl_else); rlElse = findViewById(R.id.rl_else);
rlElse.setOnClickListener(this::onClick); rlElse.setOnClickListener(this::onClick);
recyclerPhone = findViewById(R.id.recycler_phone); recyclerPhone = findViewById(R.id.recycler_phone);
// 添加信息 // 添加信息
showPoiEntity = (PoiEntity) getArguments().getSerializable("PoiEntity"); showPoiEntity = (PoiEntity) getArguments().getSerializable("PoiEntity");
if (showPoiEntity !=null){ if (showPoiEntity != null) {
editNameContent.setText(showPoiEntity.getName()); editNameContent.setText(showPoiEntity.getName());
inode= showPoiEntity.getX()+","+ showPoiEntity.getY(); inode = showPoiEntity.getX() + "," + showPoiEntity.getY();
editSiteContent.setText(showPoiEntity.getAddress()); editSiteContent.setText(showPoiEntity.getAddress());
editDescribe.setText(showPoiEntity.getDescribe()); editDescribe.setText(showPoiEntity.getDescribe());
phoneData.add(showPoiEntity.getTelPhone()); phoneData.add(showPoiEntity.getTelPhone());
phone= showPoiEntity.getTelPhone(); phone = showPoiEntity.getTelPhone();
if (showPoiEntity.getPhotoInfo()!=null){ if (showPoiEntity.getPhotoInfo() != null) {
if (showPoiEntity.getPhotoInfo().get(0).getPhoto()!=null){ if (showPoiEntity.getPhotoInfo().get(0).getPhoto() != null) {
Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(0).getPhoto()).into(ivPanorama); Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(0).getPhoto()).into(ivPanorama);
} }
if (showPoiEntity.getPhotoInfo().get(1).getPhoto()!=null){ if (showPoiEntity.getPhotoInfo().get(1).getPhoto() != null) {
Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(1).getPhoto()).into(ivName); Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(1).getPhoto()).into(ivName);
} }
@ -213,8 +208,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
//禁用所有可操作控件 //禁用所有可操作控件
//disables(); //disables();
} }
//禁用所有可操作性控件
//禁用所有可操作性控件
private void disables() { private void disables() {
checkBoxLife.setEnabled(false); checkBoxLife.setEnabled(false);
editNameContent.setEnabled(false); editNameContent.setEnabled(false);
@ -242,8 +239,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} }
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) {
if (data.what == Constant.POI_WORD) { if (data.what == Constant.POI_WORD) {
@ -324,9 +319,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
if (showPoiEntity!=null){ if (showPoiEntity != null) {
poiDao.updatePoiEntity(poiEntity); poiDao.updatePoiEntity(poiEntity);
}else { } else {
poiDao.insertPoiEntity(poiEntity); poiDao.insertPoiEntity(poiEntity);
} }
@ -383,6 +378,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Intent intentElse = new Intent("android.media.action.IMAGE_CAPTURE"); Intent intentElse = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intentElse, 105); startActivityForResult(intentElse, 105);
break; break;
} }
} }

View File

@ -72,6 +72,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
obtain.what = Constant.MAIN_HEADER; obtain.what = Constant.MAIN_HEADER;
obtain.obj = header; obtain.obj = header;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
ImageView ivPoiVideoFinal = header.findViewById(R.id.iv_poiVideo_final);
ivPoiVideoFinal.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getActivity().finish();
}
});
} }

View File

@ -15,7 +15,6 @@ import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.hjq.permissions.OnPermissionCallback; import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.Permission; import com.hjq.permissions.Permission;
@ -24,9 +23,6 @@ import com.navinfo.outdoor.R;
import com.navinfo.outdoor.activity.PictureActivity; import com.navinfo.outdoor.activity.PictureActivity;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.bean.Info;
import com.navinfo.outdoor.bean.JsonBean;
import com.navinfo.outdoor.bean.RoadExtend; import com.navinfo.outdoor.bean.RoadExtend;
import com.navinfo.outdoor.room.PoiDao; import com.navinfo.outdoor.room.PoiDao;
import com.navinfo.outdoor.room.PoiDatabase; import com.navinfo.outdoor.room.PoiDatabase;
@ -36,7 +32,6 @@ import org.greenrobot.eventbus.EventBus;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
@ -59,6 +54,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
private PoiDatabase poiDatabase; private PoiDatabase poiDatabase;
private PoiDao poiDao; private PoiDao poiDao;
private PoiEntity showPoiEntity; private PoiEntity showPoiEntity;
private ImageView ivRoadFinal;
public static RoadFragment newInstance(Bundle bundle) { public static RoadFragment newInstance(Bundle bundle) {
RoadFragment fragment = new RoadFragment(); RoadFragment fragment = new RoadFragment();
@ -79,8 +75,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
obtain.what = Constant.MAIN_HEADER; obtain.what = Constant.MAIN_HEADER;
obtain.obj = header; obtain.obj = header;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
}
}
@Override @Override
@ -92,7 +88,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
tvPictures.setOnClickListener(this::onClick); tvPictures.setOnClickListener(this::onClick);
etRoadName = (EditText) findViewById(R.id.et_road_name); etRoadName = (EditText) findViewById(R.id.et_road_name);
ivRoadPicture = (ImageView) findViewById(R.id.iv_road_picture); ivRoadPicture = (ImageView) findViewById(R.id.iv_road_picture);
// Glide.with(getContext()).load(getLocalVideoBitmap(String.valueOf(R.drawable.bg_01))).into(ivRoadPicture); // Glide.with(getContext()).load(getLocalVideoBitmap(String.valueOf(R.drawable.bg_01))).into(ivRoadPicture);
rbCar = (RadioButton) findViewById(R.id.rb_car); rbCar = (RadioButton) findViewById(R.id.rb_car);
rbBicycle = (RadioButton) findViewById(R.id.rb_bicycle); rbBicycle = (RadioButton) findViewById(R.id.rb_bicycle);
rbWalking = (RadioButton) findViewById(R.id.rb_walking); rbWalking = (RadioButton) findViewById(R.id.rb_walking);
@ -105,6 +101,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
//禁用可操作性控件 //禁用可操作性控件
// disables(); // disables();
//获取 //获取
} }
private void disables() { private void disables() {
@ -119,7 +116,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
@Override @Override
protected void initData() { protected void initData() {
super.initData(); super.initData();
// infos = new ArrayList<>(); // infos = new ArrayList<>();
} }
/** /**
@ -164,9 +161,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
} }
RoadExtend roadExtend = new RoadExtend(); RoadExtend roadExtend = new RoadExtend();
int type = getPictureType(); int type = getPictureType();
if (type== -1){ if (type == -1) {
Toast.makeText(getContext(), "请选择拍照方式", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "请选择拍照方式", Toast.LENGTH_SHORT).show();
return; return;
} }
roadExtend.setType(type); roadExtend.setType(type);
Gson gson = new Gson(); Gson gson = new Gson();
@ -187,7 +184,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
if (showPoiEntity!=null){ if (showPoiEntity != null) {
poiDao.updatePoiEntity(poiEntity); poiDao.updatePoiEntity(poiEntity);
} }
poiDao.insertPoiEntity(poiEntity); poiDao.insertPoiEntity(poiEntity);
@ -213,6 +210,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
Intent intent = new Intent(getContext(), PictureActivity.class); Intent intent = new Intent(getContext(), PictureActivity.class);
startActivity(intent); startActivity(intent);
break; break;
} }
} }
@ -224,7 +222,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
return 1; return 1;
} else if (rbWalking != null && rbWalking.isChecked()) { } else if (rbWalking != null && rbWalking.isChecked()) {
return 2; return 2;
}else if (rbManual != null && rbManual.isChecked()) { } else if (rbManual != null && rbManual.isChecked()) {
return 3; return 3;
} }
return -1; return -1;

View File

@ -146,12 +146,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
case 0: case 0:
List<PoiEntity> poiEntities = initRoadWord(0); List<PoiEntity> poiEntities = initRoadWord(0);
staySubmitAdapter.setAllRoad(poiEntities); staySubmitAdapter.setAllRoad(poiEntities);
// Toast.makeText(getContext(), "poi类型的数据"+poiEntities.toString(), Toast.LENGTH_SHORT).show();
break; break;
case 1: case 1:
List<PoiEntity> poiEntitiesList = initRoadWord(1); List<PoiEntity> poiEntitiesList = initRoadWord(1);
staySubmitAdapter.setAllRoad(poiEntitiesList); staySubmitAdapter.setAllRoad(poiEntitiesList);
// Toast.makeText(getContext(), "道路类型的数据"+poiEntitiesList.toString(), Toast.LENGTH_SHORT).show();
break; break;
} }
tvStayType.setText(text); tvStayType.setText(text);

View File

@ -159,7 +159,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()){ switch (v.getId()){
case R.id.iv_find_task: case R.id.iv_find_task:
getActivity().finish(); getActivity().finish();
break; break;
} }
} }

View File

@ -174,10 +174,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment); fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment);
fragmentTransaction.commit(); fragmentTransaction.commit();
} else if (data.what == Constant.GATHER_GET) { // 点击开始采集 } else if (data.what == Constant.GATHER_GET) { // 点击开始采集
PoiEntity poiEntity = (PoiEntity) data.obj; PoiEntity poiEntity = (PoiEntity) data.obj;
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putBoolean("isSliding", false); // 通知抽屉不收回 bundle.putBoolean("isSliding", false); // 通知抽屉不收回
bundle.putSerializable("PoiEntity",poiEntity); bundle.putSerializable("PoiEntity", poiEntity);
frameLayout.setVisibility(View.GONE); frameLayout.setVisibility(View.GONE);
fragmentTransaction.remove(gatherGetFragment); fragmentTransaction.remove(gatherGetFragment);
switch (poiEntity.getType()) { switch (poiEntity.getType()) {
@ -195,17 +195,20 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break; break;
case 3: case 3:
break; break;
case 4:
OtherFragment otherFragment = OtherFragment.newInstance(new Bundle());
showSlidingFragment(otherFragment);
break;
} }
} else if (data.what == Constant.FILTER_LIST) { // 筛选列表所有数据地图显示 } else if (data.what == Constant.FILTER_LIST) { // 筛选列表所有数据地图显示
List<PoiEntity> poiEntities = (List<PoiEntity>) data.obj; List<PoiEntity> poiEntities = (List<PoiEntity>) data.obj;
initFilterMarker(poiEntities); initFilterMarker(poiEntities);
} else if (data.what == Constant.TREASURE_WORD) { // POI采集-移动位置 } else if (data.what == Constant.TREASURE_WORD) { // POI采集-移动位置
initPoiMarker(Boolean.valueOf((Boolean) data.obj),Constant.POI_WORD); initPoiMarker(Boolean.valueOf((Boolean) data.obj), Constant.POI_WORD);
}else if (data.what==Constant.MAIN_CHARGING_STATION){//道路采集-移动位置 } else if (data.what == Constant.MAIN_CHARGING_STATION) {//道路采集-移动位置
initPoiMarker(Boolean.valueOf((Boolean) data.obj),Constant.CHARGING_STATION_WORD); initPoiMarker(Boolean.valueOf((Boolean) data.obj), Constant.CHARGING_STATION_WORD);
} } else if (data.what == Constant.TREASURE_FRAGMENT) {
else if (data.what == Constant.TREASURE_FRAGMENT) {
if ((boolean) data.obj == true) { if ((boolean) data.obj == true) {
frameLayout.setVisibility(View.GONE); frameLayout.setVisibility(View.GONE);
sliding_layout.setPanelHeight(0); sliding_layout.setPanelHeight(0);
@ -216,16 +219,16 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} }
} else if (data.what == Constant.MAIN_BUTTON_VISIABLE) { } else if (data.what == Constant.MAIN_BUTTON_VISIABLE) {
setMainButtonVisiable((Integer) data.obj); setMainButtonVisiable((Integer) data.obj);
}else if (data.what==Constant.MAIN_HEADER){ } else if (data.what == Constant.MAIN_HEADER) {
View view = (View) data.obj; View view = (View) data.obj;
initHeader(view); initHeader(view);
}else if (data.what==Constant.MAIN_REMOVE){ } else if (data.what == Constant.MAIN_REMOVE) {
if ((boolean)data.obj){ if ((boolean) data.obj) {
dragView.removeAllViews(); dragView.removeAllViews();
} }
}else if (data.what==Constant.GATHER_GET_RETURN){//item 点击页面的返回事件的处理 } else if (data.what == Constant.GATHER_GET_RETURN) {//item 点击页面的返回事件的处理
if ((boolean)data.obj){ if ((boolean) data.obj) {
frameLayout.setVisibility(View.GONE); frameLayout.setVisibility(View.GONE);
sliding_layout.setPanelHeight(1000); sliding_layout.setPanelHeight(1000);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
@ -237,7 +240,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
/** /**
* 控制主界面各个按钮的显示状态 * 控制主界面各个按钮的显示状态
* */ */
private void setMainButtonVisiable(int visiable) { private void setMainButtonVisiable(int visiable) {
ivZoomAdd.setVisibility(visiable); ivZoomAdd.setVisibility(visiable);
ivZoomDel.setVisibility(visiable); ivZoomDel.setVisibility(visiable);
@ -259,7 +262,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) { if (t == true) {
//移动地图 //移动地图
CameraUpdate cameraSigma = CameraUpdate cameraSigma =
@ -293,7 +296,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
Constant.markerLatitude = latLng.latitude; Constant.markerLatitude = latLng.latitude;
Constant.markerLongitude = latLng.longitude; Constant.markerLongitude = latLng.longitude;
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what =aInt; obtain.what = aInt;
obtain.obj = Constant.markerLatitude + "," + Constant.markerLongitude; obtain.obj = Constant.markerLatitude + "," + Constant.markerLongitude;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
@ -446,7 +449,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
showSlidingFragment(chargingStationFragment); showSlidingFragment(chargingStationFragment);
break; break;
case 4: case 4:
Toast.makeText(getContext(), "其他", Toast.LENGTH_SHORT).show(); OtherFragment otherFragment = OtherFragment.newInstance(new Bundle());
showSlidingFragment(otherFragment);
break; break;
} }
return false; return false;
@ -462,11 +466,21 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
/** /**
* header 头部布局 * header 头部布局
*
* @param view * @param view
*/ */
public void initHeader(View view){ public void initHeader(View view) {
dragView.removeAllViews(); dragView.removeAllViews();
dragView.addView(view); dragView.addView(view);
view.findViewById(R.id.iv_final).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.setVisibility(View.GONE);
sliding_layout.setPanelHeight(0);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
setMainButtonVisiable(View.VISIBLE);
}
});
} }
/** /**
@ -483,6 +497,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
fragmentTransaction.hide(filterFragment); fragmentTransaction.hide(filterFragment);
} }
} }
if (!(fragment instanceof PoiFragment)) {
PoiFragment poiFragment = (PoiFragment) supportFragmentManager.findFragmentByTag(PoiFragment.class.getName());
if (poiFragment != null) {
fragmentTransaction.hide(poiFragment);
}
}
fragmentTransaction.show(fragment); fragmentTransaction.show(fragment);
fragmentTransaction.addToBackStack(null); fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit(); fragmentTransaction.commit();

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View File

@ -3,15 +3,41 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/rl_chargingStation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_final"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_charging"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="道路" />
</LinearLayout>
<ImageView <ImageView
android:id="@+id/road_bg" android:id="@+id/road_bg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="150dp" android:layout_height="150dp"
android:background="@drawable/top_bg" android:background="@drawable/top_bg"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@id/rl_chargingStation"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" /> app:layout_constraintVertical_bias="1.0" />
<TextView <TextView

View File

@ -16,12 +16,11 @@
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/iv_filter" android:id="@+id/iv_final"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:visibility="gone"
android:src="@drawable/icon_arrow" /> android:src="@drawable/icon_arrow" />
<TextView <TextView

View File

@ -1,155 +1,284 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:context=".fragment.OtherFragment"> tools:context=".fragment.OtherFragment">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rl_other"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:background="#1BA5F1"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_other_final"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow" />
<TextView <TextView
android:id="@+id/tv_other" android:id="@+id/tv_select_type"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="我的等级" />
</LinearLayout>
<ImageView
android:id="@+id/iv_bg01"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@drawable/bg_01"
app:layout_constraintTop_toBottomOf="@+id/rl_other" />
<TextView
android:id="@+id/tv_select_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="01.选择情报类型"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_bg01" />
<LinearLayout
android:id="@+id/ll_text"
android:layout_width="350dp"
android:layout_height="200dp"
app:layout_constraintLeft_toLeftOf="@id/tv_select_type"
app:layout_constraintTop_toBottomOf="@id/tv_select_type">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/other_text"> android:layout_margin="20dp"
android:text="01.选择情报类型"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/rl_other"/>
<LinearLayout
android:id="@+id/ll_text"
android:layout_width="match_parent"
android:layout_height="150dp"
app:layout_constraintLeft_toLeftOf="@id/tv_select_type"
app:layout_constraintTop_toBottomOf="@id/tv_select_type">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:background="@drawable/other_text">
<TextView
android:id="@+id/tv_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="下拉选择"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/other_dawn"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="10dp"
android:background="@drawable/ic_arrow_down"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_data"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_margin="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/tv_other_picture"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_text">
<TextView <TextView
android:id="@+id/tv_down"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="10dp" android:text="02.基本资料填写"
android:text="下拉选择"
android:textStyle="bold" android:textStyle="bold" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/other_dawn" android:layout_width="match_parent"
android:layout_width="30dp" android:layout_height="wrap_content"
android:layout_height="30dp" android:layout_marginTop="20dp"
android:background="@drawable/arrow_black" android:background="@drawable/other_text">
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout <TextView
android:id="@+id/ll_data" android:id="@+id/tv_indeo"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="160dp" android:layout_height="40dp"
android:orientation="vertical" android:layout_marginLeft="10dp"
app:layout_constraintTop_toBottomOf="@+id/ll_text"> android:gravity="center_vertical"
android:text="点位*"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/et_position"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:background="@null"
android:paddingLeft="10dp"
app:layout_constraintBottom_toBottomOf="@id/tv_indeo"
app:layout_constraintLeft_toRightOf="@id/tv_indeo"
app:layout_constraintTop_toTopOf="@id/tv_indeo" />
<ImageView
android:id="@+id/iv_other_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/icon_location"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="20dp"
android:background="@drawable/other_text"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:text="名称*" />
<EditText
android:id="@+id/et_task_name"
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:background="@null"
android:hint="任务名称"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<TextView <TextView
android:id="@+id/tv_other_picture"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="02.基本资料填写" android:text="03.拍照"
android:textStyle="bold" /> android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/ll_data"
app:layout_constraintTop_toBottomOf="@id/ll_data" />
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/ll_image_picture"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_margin="20dp"
android:background="@drawable/other_text"> android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="9dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/tv_03"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_other_picture">
<TextView <LinearLayout
android:id="@+id/tv_indeo" android:layout_width="150dp"
android:layout_width="wrap_content" android:layout_height="100dp"
android:layout_height="40dp" android:layout_margin="10dp"
android:layout_marginLeft="10dp" android:background="#03A9F4"
android:gravity="center_vertical" android:gravity="center"
android:text="点位*" android:orientation="vertical">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" <ImageView
app:layout_constraintTop_toTopOf="parent" /> android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/plus" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="*照片"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="150dp"
android:layout_height="100dp"
android:layout_margin="10dp"
android:background="#03A9F4"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/plus" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="*照片"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="04概述"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_image_picture" />
<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_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_03">
<EditText <EditText
android:id="@+id/et_position" android:id="@+id/edit_other_describe"
android:layout_width="230dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:background="@null" android:layout_margin="2dp"
app:layout_constraintLeft_toRightOf="@id/tv_indeo" android:background="@color/white"
app:layout_constraintTop_toTopOf="@id/tv_indeo" /> android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="top"
android:hint="任务描述"
android:paddingLeft="10dp"
android:paddingBottom="30dp"
android:textSize="15sp"
<ImageView />
android:id="@+id/iv_other_map" </LinearLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/icon_location"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:background="@drawable/other_text" android:layout_marginLeft="10dp"
android:layout_margin="20dp" android:layout_marginTop="20dp"
android:orientation="horizontal"> android:layout_marginRight="10dp"
<TextView android:layout_marginBottom="20dp"
android:layout_width="wrap_content" 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_other_local"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="名称*" android:layout_margin="10dp"
android:layout_gravity="center_vertical" android:layout_weight="1"
android:layout_marginLeft="10dp"/> android:background="@drawable/shape_red_radius_bg"
android:text="保存本地"
android:textColor="@color/white" />
<Button
android:id="@+id/btn_other_uploading"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="@drawable/shape_transparent_pink_radius_bg"
android:text="上传" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

View File

@ -14,7 +14,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/tv_message" android:id="@+id/tv_message"

View File

@ -0,0 +1,91 @@
<?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">
<LinearLayout
android:id="@+id/rl_other"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_final"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_other"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="其他" />
</LinearLayout>
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:layout_width="match_parent"-->
<!-- app:layout_constraintTop_toBottomOf="@id/rl_other"-->
<!-- android:layout_height="wrap_content">-->
<ImageView
android:id="@+id/road_bg"
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/top_bg"
app:layout_constraintTop_toBottomOf="@id/rl_other"/>
<!-- 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>-->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,58 +1,85 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout 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_width="match_parent"
android:layout_height="wrap_content" 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 <LinearLayout
android:id="@+id/tv1" android:id="@+id/rl_poi"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="poi" android:background="#1BA5F1"
android:textColor="@color/white" android:orientation="horizontal"
android:textSize="25sp" android:paddingTop="@dimen/top_pind_sp"
android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@id/road_bg" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintLeft_toLeftOf="@id/road_bg" app:layout_constraintTop_toTopOf="parent">
app:layout_constraintRight_toRightOf="@id/road_bg"
app:layout_constraintTop_toTopOf="@id/road_bg" />
<ImageView <ImageView
android:id="@+id/iv_final"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="45dp"
android:layout_marginRight="15dp" android:layout_alignParentLeft="true"
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:layout_marginLeft="15dp"
android:background="@drawable/top_bg_line_right" android:src="@drawable/icon_arrow" />
app:layout_constraintBottom_toBottomOf="@id/tv1"
app:layout_constraintLeft_toRightOf="@id/tv1"
app:layout_constraintTop_toTopOf="@id/tv1" />
<TextView <TextView
android:id="@+id/tv_explain" android:id="@+id/tv_poi"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_toRightOf="@id/iv_find_task"
android:layout_marginTop="10dp" android:text="POI" />
android:text="任务说明" </LinearLayout>
android:textColor="@color/white"
app:layout_constraintLeft_toLeftOf="@id/tv1" <ImageView
app:layout_constraintRight_toRightOf="@id/tv1" android:id="@+id/road_bg"
app:layout_constraintTop_toBottomOf="@id/tv1" /> android:layout_width="wrap_content"
android:layout_height="150dp"
android:background="@drawable/top_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/rl_poi"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="poi"
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> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,13 +3,39 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/rl_poi_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_poiVideo_final"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_poiVideo"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="POI录像" />
</LinearLayout>
<ImageView <ImageView
android:id="@+id/road_bg" android:id="@+id/road_bg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="150dp" android:layout_height="150dp"
android:background="@drawable/top_bg" android:background="@drawable/top_bg"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toBottomOf="@id/rl_poi_video"/>
<TextView <TextView
android:id="@+id/tv1" android:id="@+id/tv1"

View File

@ -3,13 +3,39 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:id="@+id/rl_road"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_final"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_other"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="道路" />
</LinearLayout>
<ImageView <ImageView
android:id="@+id/road_bg" android:id="@+id/road_bg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="150dp" android:layout_height="150dp"
android:background="@drawable/top_bg" android:background="@drawable/top_bg"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toBottomOf="@id/rl_road" />
<TextView <TextView
android:id="@+id/tv1" android:id="@+id/tv1"