筛选页面逻辑处理

This commit is contained in:
wds 2021-06-18 20:55:05 +08:00
parent 5eedfa91a1
commit 7be6a463f2
20 changed files with 1137 additions and 730 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

@ -54,11 +54,20 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
} }
}); });
if (poiEntity.getTaskStatus()==0){ if (poiEntity.getTaskStatus()==0){
holder.tvGit.setVisibility(View.VISIBLE);
holder.tvSubmit.setVisibility(View.GONE);
}else if (poiEntity.getTaskStatus()==1){
holder.tvSubmit.setVisibility(View.VISIBLE);
holder.tvGit.setVisibility(View.GONE); holder.tvGit.setVisibility(View.GONE);
holder.tvSubmit.setVisibility(View.VISIBLE);
}else if (poiEntity.getTaskStatus()==1){
holder.tvSubmit.setVisibility(View.GONE);
holder.tvGit.setVisibility(View.VISIBLE);
}
if (poiEntity.getType()==0){
holder.tvForm.setText("poi");
}else if (poiEntity.getType()==1){
holder.tvForm.setText("道路");
}else if (poiEntity.getType()==2){
holder.tvForm.setText("充电站");
}else if (poiEntity.getType()==3){
holder.tvForm.setText("其他");
} }
} }

View File

@ -45,6 +45,7 @@ public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.My
PoiBean poiBean = list.get(position); PoiBean poiBean = list.get(position);
holder.tvPhone.setText(poiBean.getName()); holder.tvPhone.setText(poiBean.getName());
holder.image.setImageResource(poiBean.getImage()); holder.image.setImageResource(poiBean.getImage());
holder.editPhoneNumber.setText(poiBean.getPhone());
holder.image.setOnClickListener(new View.OnClickListener() { holder.image.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View File

@ -43,6 +43,12 @@ public class Constant {
public static final int POI_WORD_3 = 3; public static final int POI_WORD_3 = 3;
public static final int FILTER_LIST = 4; public static final int FILTER_LIST = 4;
public static final int FILTER_LIST_ITEM = 5; public static final int FILTER_LIST_ITEM = 5;
public static final int GATHER_GET = 6;
public static final int TREASURE_GATHER_GET_WORD = 7;
public static final int MAIN_BUTTON_VISIABLE = 8; // 控制主界面各个按钮显隐状态的what值
public static final int MAIN_HEADER = 9; // 控制主界面各个header
public static final int MAIN_REMOVE = 10; // 控制主界面各个header移除
public static final int GATHER_GET_WORD = 11;
/** /**
* 用户当前位置 * 用户当前位置

View File

@ -1,7 +1,13 @@
package com.navinfo.outdoor.base; package com.navinfo.outdoor.base;
import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.util.Log;
import android.view.View;
import androidx.annotation.Nullable;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.util.FragmentBackHandler; import com.navinfo.outdoor.util.FragmentBackHandler;
@ -11,14 +17,18 @@ import org.greenrobot.eventbus.EventBus;
* 管理寻宝页面的抽屉中的fragment * 管理寻宝页面的抽屉中的fragment
*/ */
public abstract class BaseDrawerFragment extends BaseFragment { public abstract class BaseDrawerFragment extends BaseFragment {
public boolean isSliding=true; // fragment被销毁时true-抽屉收回false-抽屉状态不变
@Override @Override
public void initEvent() { public void initEvent() {
super.initEvent(); super.initEvent();
// 监听到返回按钮点击事件 isSliding=true;
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what= Constant.TREASURE_FRAGMENT; obtain.what= Constant.MAIN_BUTTON_VISIABLE;
obtain.obj=true; obtain.obj= View.GONE;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
} }
@Override @Override
@ -27,13 +37,41 @@ public abstract class BaseDrawerFragment extends BaseFragment {
return true; return true;
} }
@Override @Override
public void onDestroyView() { public void onHiddenChanged(boolean hidden) {
super.onDestroyView(); super.onHiddenChanged(hidden);
// 监听到返回按钮点击事件 if (hidden) {
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what= Constant.TREASURE_FRAGMENT; obtain.what = Constant.MAIN_REMOVE;
obtain.obj=false; obtain.obj =true;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
}
}
@Override
public void onDestroy() {
super.onDestroy();
Bundle arguments = getArguments();
if (arguments!=null) {
isSliding= arguments.getBoolean("isSliding",true);
Log.d("TAG", "onCreatessss: "+isSliding);
}
if (isSliding) {
// 监听到返回按钮点击事件
Message obtain = Message.obtain();
obtain.what= Constant.TREASURE_FRAGMENT;
obtain.obj=isSliding;
EventBus.getDefault().post(obtain);
Message mainButtonVisiableMsg = Message.obtain();
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
mainButtonVisiableMsg.obj= View.VISIBLE;
EventBus.getDefault().post(mainButtonVisiableMsg);
}
}
public View getScrollerView() {
return findViewById(R.id.scroller_view);
} }
} }

View File

@ -42,6 +42,9 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
fragment.setArguments(bundle); fragment.setArguments(bundle);
return fragment; return fragment;
} }
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.event_prefecture_fragment; return R.layout.event_prefecture_fragment;

View File

@ -3,16 +3,14 @@ package com.navinfo.outdoor.fragment;
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.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;
import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import com.jcodecraeer.xrecyclerview.ProgressStyle; import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView; import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.kongzue.dialog.interfaces.OnMenuItemClickListener; import com.kongzue.dialog.interfaces.OnMenuItemClickListener;
@ -24,24 +22,19 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
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 org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener { public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
private ImageView ivFilter;
private Button btnFilter; private Button btnFilter;
private XRecyclerView recyclerFilter; private XRecyclerView recyclerFilter;
private TextView tvType, tvExclusive, tvPhotograph; private TextView tvType, tvExclusive, tvPhotograph,tvNumber;
private ConstraintLayout clPhotograph, clExclusive, clType; private ConstraintLayout clPhotograph, clExclusive, clType,clNumber;
private PoiDatabase poiDatabase; private PoiDatabase poiDatabase;
private PoiDao poiDao; private PoiDao poiDao;
private FilterAdapter filterAdapter; private FilterAdapter filterAdapter;
private ArrayList<PoiEntity> poiEntities; private ArrayList<PoiEntity> poiEntities;
private TextView tvTitle;
public static FilterFragment newInstance(Bundle bundle) { public static FilterFragment newInstance(Bundle bundle) {
@ -50,6 +43,31 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
return fragment; return fragment;
} }
@Override
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
if (!hidden) {
View header = LayoutInflater.from(getActivity()).inflate(R.layout.filter_header, null);
Message obtain = Message.obtain();
obtain.what = Constant.MAIN_HEADER;
obtain.obj = header;
EventBus.getDefault().post(obtain);
}
}
@Override
public void onResume() {
super.onResume();
View header = LayoutInflater.from(getActivity()).inflate(R.layout.filter_header, null);
Message obtain = Message.obtain();
obtain.what = Constant.MAIN_HEADER;
obtain.obj = header;
EventBus.getDefault().post(obtain);
}
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.fragment_filter; return R.layout.fragment_filter;
@ -58,6 +76,9 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override @Override
protected void initView() { protected void initView() {
super.initView(); super.initView();
clNumber = findViewById(R.id.cl_number);
clNumber.setOnClickListener(this::onClick);
tvNumber = findViewById(R.id.tv_number);
clPhotograph = findViewById(R.id.cl_photograph); clPhotograph = findViewById(R.id.cl_photograph);
clPhotograph.setOnClickListener(this::onClick); clPhotograph.setOnClickListener(this::onClick);
tvPhotograph = findViewById(R.id.tv_photograph); tvPhotograph = findViewById(R.id.tv_photograph);
@ -67,13 +88,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
clType = findViewById(R.id.cl_type); clType = findViewById(R.id.cl_type);
clType.setOnClickListener(this::onClick); clType.setOnClickListener(this::onClick);
tvType = findViewById(R.id.tv_type); tvType = findViewById(R.id.tv_type);
tvTitle = findViewById(R.id.tv_title);
tvTitle.setOnClickListener(this::onClick);
btnFilter = findViewById(R.id.btn_filter); btnFilter = findViewById(R.id.btn_filter);
btnFilter.setOnClickListener(this::onClick); btnFilter.setOnClickListener(this::onClick);
ivFilter = findViewById(R.id.iv_filter);
ivFilter.setOnClickListener(this);
recyclerFilter = findViewById(R.id.recycler_filter); recyclerFilter = findViewById(R.id.recycler_filter);
//设置下划线 //设置下划线
recyclerFilter.setLayoutManager(new LinearLayoutManager(getActivity())); recyclerFilter.setLayoutManager(new LinearLayoutManager(getActivity()));
@ -85,6 +101,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
recyclerFilter.setLoadingMoreEnabled(false); recyclerFilter.setLoadingMoreEnabled(false);
filterAdapter = new FilterAdapter(getContext()); filterAdapter = new FilterAdapter(getContext());
recyclerFilter.setAdapter(filterAdapter); recyclerFilter.setAdapter(filterAdapter);
recyclerFilter.getDefaultFootView().setNoMoreHint("成功加载完毕"); recyclerFilter.getDefaultFootView().setNoMoreHint("成功加载完毕");
recyclerFilter.setLoadingListener(new XRecyclerView.LoadingListener() { recyclerFilter.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override @Override
@ -107,6 +124,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
} }
@Override @Override
protected void initData() { protected void initData() {
super.initData(); super.initData();
@ -122,8 +140,9 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override @Override
public void run() { public void run() {
Log.d("TAG", "run: " + allPoi.toString()); Log.d("TAG", "run: " + allPoi.toString());
poiEntities.clear();
poiEntities.addAll(allPoi); poiEntities.addAll(allPoi);
filterAdapter.setAllPoi(allPoi); filterAdapter.setAllPoi(poiEntities);
} }
}); });
} }
@ -133,25 +152,22 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override @Override
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.tv_title:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500","1000"}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvTitle.setText(""+text+"");
}
});
break;
case R.id.btn_filter: case R.id.btn_filter:
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what = Constant.FILTER_LIST; obtain.what = Constant.FILTER_LIST;
obtain.obj = poiEntities; obtain.obj = poiEntities;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
break; break;
case R.id.iv_filter: case R.id.cl_number:
getActivity().finish(); BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500","1000"}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvNumber.setText(text);
}
});
break; break;
case R.id.cl_photograph: case R.id.cl_photograph:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"录像", "拍照"}, new OnMenuItemClickListener() { BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","专属任务", "普通任务"}, new OnMenuItemClickListener() {
@Override @Override
public void onClick(String text, int index) { public void onClick(String text, int index) {
tvPhotograph.setText(text); tvPhotograph.setText(text);
@ -160,7 +176,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
}); });
break; break;
case R.id.cl_exclusive: case R.id.cl_exclusive:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"poi", "道路", "充电站", "其他"}, new OnMenuItemClickListener() { BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","poi", "道路", "充电站", "其他"}, new OnMenuItemClickListener() {
@Override @Override
public void onClick(String text, int index) { public void onClick(String text, int index) {
tvExclusive.setText(text); tvExclusive.setText(text);
@ -168,7 +184,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
}); });
break; break;
case R.id.cl_type: case R.id.cl_type:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"专属", "普通"}, new OnMenuItemClickListener() { BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","已领取", "待提交","未领取"}, new OnMenuItemClickListener() {
@Override @Override
public void onClick(String text, int index) { public void onClick(String text, int index) {
tvType.setText(text); tvType.setText(text);

View File

@ -0,0 +1,106 @@
package com.navinfo.outdoor.fragment;
import android.os.Bundle;
import android.os.Message;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.room.PoiEntity;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
/**
* 领取采集的fragment
*/
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
private Button btnBank;
private TextView tvTitle, tvMoney, tvTime, tvLength, tvDistance, tvDescribe;
private PoiEntity poiEntity;
public static GatherGetFragment newInstance(Bundle bundle) {
GatherGetFragment fragment = new GatherGetFragment();
fragment.setArguments(bundle);
return fragment;
}
@Override
public void onStart() {
super.onStart();
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
EventBus.getDefault().register(this);
}
}
@Subscribe
public void onEvent(Message data) {
if (data.what == Constant.TREASURE_GATHER_GET_WORD) {
PoiEntity poiEntity = (PoiEntity) data.obj;
tvTitle.setText(poiEntity.getName());
tvMoney.setText("3.5元");
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
tvLength.setText("长度:" + poiEntity.getDetail());
tvDescribe.setText("任务描述:" + poiEntity.getDescribe());
tvDistance.setText("距离:" + poiEntity.getX());
}
}
@Override
protected int getLayout() {
return R.layout.fragment_gather_get;
}
@Override
protected void initView() {
super.initView();
tvTitle = findViewById(R.id.tv_title);
tvMoney = findViewById(R.id.tv_money);
tvTime = findViewById(R.id.tv_time);
tvLength = findViewById(R.id.tv_length);
tvDistance = findViewById(R.id.tv_distance);
tvDescribe = findViewById(R.id.tv_describe);
btnBank = findViewById(R.id.btn_bank);
btnBank.setOnClickListener(this);
Bundle arguments = getArguments();
if (arguments!=null) {
poiEntity = (PoiEntity) arguments.getSerializable("PoiEntity");
tvTitle.setText(poiEntity.getName());
tvMoney.setText("3.5元");
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
tvLength.setText("长度:" + poiEntity.getDetail());
tvDescribe.setText("任务描述:" + poiEntity.getDescribe());
tvDistance.setText("距离:" );
}
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_bank:
if (poiEntity!=null){
Message obtain = Message.obtain();
obtain.what = Constant.GATHER_GET;
obtain.obj = poiEntity;
EventBus.getDefault().post(obtain);
}else {
Toast.makeText(getContext(), "无法采集", Toast.LENGTH_SHORT).show();
}
break;
}
}
@Override
public void onDestroy() {
if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this);
super.onDestroy();
}
}

View File

@ -12,6 +12,7 @@ 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.KeyEvent;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
@ -28,6 +29,7 @@ import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.hjq.permissions.OnPermissionCallback; 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;
@ -52,7 +54,11 @@ 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.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.List; import java.util.List;
import static android.app.Activity.RESULT_OK; import static android.app.Activity.RESULT_OK;
@ -65,7 +71,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private EditText editDescribe; private EditText editDescribe;
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlCard, rlElse; private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlCard, rlElse;
private TextView tvExplain;
private ImageView ivPanorama, ivName, ivInternal, ivCard, ivElse; private ImageView ivPanorama, ivName, ivInternal, ivCard, ivElse;
private TextView tvExamine; private TextView tvExamine;
private EditText editNameContent, editSiteContent; private EditText editNameContent, editSiteContent;
@ -84,9 +89,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private boolean bBoolean = false; private boolean bBoolean = false;
private CheckBox checkBoxLife; private CheckBox checkBoxLife;
private CheckBox checkBoxRight; private CheckBox checkBoxRight;
private String phone;
private PoiEntity showPoiEntity;
public static PoiFragment newInstance(Bundle bundle) { public static PoiFragment newInstance(Bundle bundle) {
PoiFragment fragment = new PoiFragment(); PoiFragment fragment = new PoiFragment();
fragment.setArguments(bundle);
return fragment; return fragment;
} }
@ -101,6 +109,11 @@ 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);
Message obtain = Message.obtain();
obtain.what = Constant.MAIN_HEADER;
obtain.obj = header;
EventBus.getDefault().post(obtain);
} }
@ -130,13 +143,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
tvExamine = findViewById(R.id.tv_examine); tvExamine = findViewById(R.id.tv_examine);
tvExamine.setOnClickListener(this::onClick); tvExamine.setOnClickListener(this::onClick);
editDescribe = findViewById(R.id.edit_describe); editDescribe = findViewById(R.id.edit_describe);
tvExplain = findViewById(R.id.tv_explain);
ivPanorama = findViewById(R.id.iv_panorama); ivPanorama = findViewById(R.id.iv_panorama);
ivName = findViewById(R.id.iv_name); ivName = findViewById(R.id.iv_name);
ivInternal = findViewById(R.id.iv_internal); ivInternal = findViewById(R.id.iv_internal);
ivCard = findViewById(R.id.iv_card); ivCard = findViewById(R.id.iv_card);
ivElse = findViewById(R.id.iv_else); ivElse = findViewById(R.id.iv_else);
tvExplain.setOnClickListener(this::onClick);
rlPanorama = findViewById(R.id.rl_panorama); rlPanorama = findViewById(R.id.rl_panorama);
rlPanorama.setOnClickListener(this::onClick); rlPanorama.setOnClickListener(this::onClick);
rlName = findViewById(R.id.rl_name); rlName = findViewById(R.id.rl_name);
@ -148,24 +159,41 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
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");
if (showPoiEntity !=null){
editNameContent.setText(showPoiEntity.getName());
inode= showPoiEntity.getX()+","+ showPoiEntity.getY();
editSiteContent.setText(showPoiEntity.getAddress());
editDescribe.setText(showPoiEntity.getDescribe());
phoneData.add(showPoiEntity.getTelPhone());
phone= showPoiEntity.getTelPhone();
if (showPoiEntity.getPhotoInfo()!=null){
if (showPoiEntity.getPhotoInfo().get(0).getPhoto()!=null){
Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(0).getPhoto()).into(ivPanorama);
}
if (showPoiEntity.getPhotoInfo().get(1).getPhoto()!=null){
Glide.with(getActivity()).load(showPoiEntity.getPhotoInfo().get(1).getPhoto()).into(ivName);
}
}
}
recyclerPhone.setLayoutManager(new LinearLayoutManager(getContext())); recyclerPhone.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL)); recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
poiBeans.add(new PoiBean("电话*", "1000000", R.drawable.icon_add_bg)); poiBeans.add(new PoiBean("电话*", phone, R.drawable.icon_add_bg));
poiRecycleAdapter = new PoiRecycleAdapter(getContext(), poiBeans); poiRecycleAdapter = new PoiRecycleAdapter(getContext(), poiBeans);
recyclerPhone.setAdapter(poiRecycleAdapter); recyclerPhone.setAdapter(poiRecycleAdapter);
poiRecycleAdapter.setInitPoiClick(new PoiRecycleAdapter.initPoiClick() { poiRecycleAdapter.setInitPoiClick(new PoiRecycleAdapter.initPoiClick() {
@Override @Override
public void item(int aInt) { public void item(int aInt) {
if (aInt == 0) { if (aInt == 0) {
poiRecycleAdapter.addData(new PoiBean("", "100000", R.drawable.icon_del_bg)); poiRecycleAdapter.addData(new PoiBean("", null, R.drawable.icon_del_bg));
} else { } else {
poiRecycleAdapter.removeData(aInt); poiRecycleAdapter.removeData(aInt);
if (phoneData.size() > 0) { if (phoneData.size() > 0) {
phoneData.remove(aInt); phoneData.remove(aInt);
Log.d("TAG", "initView: " + phoneData.toString()); Log.d("TAG", "initView: " + phoneData.toString());
} }
} }
} }
}); });
@ -183,7 +211,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} }
}); });
//禁用所有可操作控件 //禁用所有可操作控件
// disables(); //disables();
} }
//禁用所有可操作性控件 //禁用所有可操作性控件
private void disables() { private void disables() {
@ -212,10 +241,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
photoBean = new ArrayList<>(); photoBean = new ArrayList<>();
} }
@Override
public void onResume() {
super.onResume();
}
@Subscribe @Subscribe
@ -272,7 +298,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
return; return;
} else { } else {
poiEntity.setPhoto(phoneData.get(0)); poiEntity.setTelPhone(phoneData.get(0));
} }
if (photoBean.size() < 0) { if (photoBean.size() < 0) {
Toast.makeText(getActivity(), "请拍照", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请拍照", Toast.LENGTH_SHORT).show();
@ -288,12 +314,22 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Toast.makeText(getActivity(), "请拍照 名称", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请拍照 名称", Toast.LENGTH_SHORT).show();
return; return;
} }
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.setType(0); poiEntity.setType(0);
poiEntity.setTaskStatus(0); poiEntity.setTaskStatus(0);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.insertPoiEntity(poiEntity); if (showPoiEntity!=null){
poiDao.updatePoiEntity(poiEntity);
}else {
poiDao.insertPoiEntity(poiEntity);
}
} }
}).start(); }).start();
Message obtains = Message.obtain(); Message obtains = Message.obtain();
@ -326,11 +362,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
case R.id.tv_examine: case R.id.tv_examine:
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
break; break;
case R.id.tv_explain:
Intent intentExplain = new Intent(getActivity(), FragmentManagement.class);
intentExplain.putExtra("tag", 7);
startActivity(intentExplain);
break;
case R.id.rl_panorama: case R.id.rl_panorama:
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE"); Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);

View File

@ -4,6 +4,8 @@ import android.content.Intent;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever; import android.media.MediaMetadataRetriever;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
@ -20,6 +22,7 @@ import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions; import com.hjq.permissions.XXPermissions;
import com.navinfo.outdoor.R; 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.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.base.BaseFragment; import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.bean.Info; import com.navinfo.outdoor.bean.Info;
@ -29,6 +32,8 @@ 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 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.ArrayList;
@ -65,6 +70,18 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
return R.layout.fragment_road; return R.layout.fragment_road;
} }
@Override
public void onStart() {
super.onStart();
View header = LayoutInflater.from(getActivity()).inflate(R.layout.road_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();

View File

@ -9,13 +9,18 @@ import android.os.Bundle;
import android.os.Looper; import android.os.Looper;
import android.os.Message; import android.os.Message;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.google.gson.Gson; import com.google.gson.Gson;
@ -35,6 +40,7 @@ import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.NetWorkUtils; import com.navinfo.outdoor.util.NetWorkUtils;
import com.navinfo.outdoor.util.ToastUtil; import com.navinfo.outdoor.util.ToastUtil;
import com.sothree.slidinguppanel.ScrollableViewHelper;
import com.sothree.slidinguppanel.SlidingUpPanelLayout; import com.sothree.slidinguppanel.SlidingUpPanelLayout;
import com.tencent.map.geolocation.TencentLocation; import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentLocationListener; import com.tencent.map.geolocation.TencentLocationListener;
@ -79,15 +85,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private ImageView ivRefish; private ImageView ivRefish;
private SlidingUpPanelLayout sliding_layout; private SlidingUpPanelLayout sliding_layout;
private FragmentTransaction fragmentTransaction; private FragmentTransaction fragmentTransaction;
private PoiFragment poiFragment;//poi
private RoadFragment roadFragment;//道路
private FilterFragment filterFragment;//筛选
private Marker marker; private Marker marker;
private CheckBox cbFootType; private CheckBox cbFootType;
private ImageView ivFilter; private ImageView ivFilter;
private Point screenPosition; //marker的屏幕坐标 private Point screenPosition; //marker的屏幕坐标
private BaseDrawerFragment simulateFragments; private FrameLayout frameLayout;
private GatherGetFragment gatherGetFragment;
private LinearLayout dragView;
public static TreasureFragment newInstance(Bundle bundle) { public static TreasureFragment newInstance(Bundle bundle) {
TreasureFragment fragment = new TreasureFragment(); TreasureFragment fragment = new TreasureFragment();
@ -108,6 +112,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
//fragment 管理器 //fragment 管理器
supportFragmentManager = getActivity().getSupportFragmentManager(); supportFragmentManager = getActivity().getSupportFragmentManager();
sliding_layout = findViewById(R.id.sliding_layout); sliding_layout = findViewById(R.id.sliding_layout);
dragView = findViewById(R.id.dragView);
frameLayout = findViewById(R.id.frame_layout);
ivRefish = findViewById(R.id.iv_refrish); ivRefish = findViewById(R.id.iv_refrish);
ivRefish.setOnClickListener(this::onClick); ivRefish.setOnClickListener(this::onClick);
ivFilter = findViewById(R.id.iv_filter); ivFilter = findViewById(R.id.iv_filter);
@ -118,6 +124,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
tencentMap = treasureMap.getMap(); tencentMap = treasureMap.getMap();
cbMapType = (CheckBox) findViewById(R.id.cb_map_type); cbMapType = (CheckBox) findViewById(R.id.cb_map_type);
cbFootType = (CheckBox) findViewById(R.id.cb_foot_type); cbFootType = (CheckBox) findViewById(R.id.cb_foot_type);
// sliding_layout.setScrollableViewHelper(new NestedScrollableViewHelper());
//地图转换 //地图转换
cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
@ -153,65 +160,82 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) {
if (data.what == Constant.FILTER_LIST_ITEM) { if (data.what == Constant.FILTER_LIST_ITEM) { // 点击筛选的item
PoiEntity poiEntity = (PoiEntity) data.obj; PoiEntity poiEntity = (PoiEntity) data.obj;
LatLng position = new LatLng(Double.valueOf(poiEntity.getX()), Double.valueOf(poiEntity.getY())); LatLng position = new LatLng(Double.valueOf(poiEntity.getX()), Double.valueOf(poiEntity.getY()));
tencentMap.addMarker(new MarkerOptions(position)); tencentMap.addMarker(new MarkerOptions(position));
sliding_layout.setPanelHeight(0); sliding_layout.setPanelHeight(0);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN); sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
DialogSettings.style=DialogSettings.STYLE.STYLE_MIUI; frameLayout.setVisibility(View.VISIBLE);
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "位置信息", "采集").setOnOkButtonClickListener(new OnDialogButtonClickListener() { fragmentTransaction = supportFragmentManager.beginTransaction();
@Override Bundle bundle = new Bundle();
public boolean onClick(BaseDialog baseDialog, View v) { bundle.putSerializable("PoiEntity", poiEntity);
switch (poiEntity.getType()){ gatherGetFragment = GatherGetFragment.newInstance(bundle);
case 0: fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment);
PoiFragment poiFragment = PoiFragment.newInstance(new Bundle()); fragmentTransaction.commit();
showSlidingFragment(poiFragment); } else if (data.what == Constant.GATHER_GET) { // 点击开始采集
break; PoiEntity poiEntity = (PoiEntity) data.obj;
case 1: Bundle bundle = new Bundle();
RoadFragment roadFragment = RoadFragment.newInstance(new Bundle()); bundle.putBoolean("isSliding", false); // 通知抽屉不收回
showSlidingFragment(roadFragment); bundle.putSerializable("PoiEntity",poiEntity);
break; frameLayout.setVisibility(View.GONE);
case 2: fragmentTransaction.remove(gatherGetFragment);
break; switch (poiEntity.getType()) {
case 3: case 0:
break; PoiFragment poiFragment = PoiFragment.newInstance(bundle);
} showSlidingFragment(poiFragment);
return false; break;
} case 1:
}); RoadFragment roadFragment = RoadFragment.newInstance(bundle);
} else if (data.what == Constant.FILTER_LIST) { showSlidingFragment(roadFragment);
break;
case 2:
break;
case 3:
break;
}
} 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_0) { } else if (data.what == Constant.TREASURE_WORD_0) { // POI采集-移动位置
initPoiMarker(Boolean.valueOf((Boolean) data.obj)); initPoiMarker(Boolean.valueOf((Boolean) data.obj));
} else if (data.what == Constant.TREASURE_FRAGMENT) { } else if (data.what == Constant.TREASURE_FRAGMENT) {
if ((boolean) data.obj) { if ((boolean) data.obj == true) {
ivZoomAdd.setVisibility(View.GONE); frameLayout.setVisibility(View.GONE);
ivZoomDel.setVisibility(View.GONE);
ivLocation.setVisibility(View.GONE);
ivRefish.setVisibility(View.GONE);
cbMapType.setVisibility(View.GONE);
cbFootType.setVisibility(View.GONE);
ivSubmit.setVisibility(View.GONE);
ivFilter.setVisibility(View.GONE);
} else {
ivZoomAdd.setVisibility(View.VISIBLE);
ivZoomDel.setVisibility(View.VISIBLE);
ivLocation.setVisibility(View.VISIBLE);
ivRefish.setVisibility(View.VISIBLE);
cbMapType.setVisibility(View.VISIBLE);
cbFootType.setVisibility(View.VISIBLE);
ivSubmit.setVisibility(View.VISIBLE);
ivFilter.setVisibility(View.VISIBLE);
sliding_layout.setPanelHeight(0); sliding_layout.setPanelHeight(0);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN); sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
if (marker != null) { if (marker != null) {
marker.remove(); marker.remove();
} }
} }
} else if (data.what == Constant.MAIN_BUTTON_VISIABLE) {
setMainButtonVisiable((Integer) data.obj);
}else if (data.what==Constant.MAIN_HEADER){
View view = (View) data.obj;
initHeader(view);
}else if (data.what==Constant.MAIN_REMOVE){
if ((boolean)data.obj){
dragView.removeAllViews();
}
} }
}
/**
* 控制主界面各个按钮的显示状态
* */
private void setMainButtonVisiable(int visiable) {
ivZoomAdd.setVisibility(visiable);
ivZoomDel.setVisibility(visiable);
ivLocation.setVisibility(visiable);
ivRefish.setVisibility(visiable);
cbMapType.setVisibility(visiable);
cbFootType.setVisibility(visiable);
ivSubmit.setVisibility(visiable);
ivFilter.setVisibility(visiable);
} }
private void initFilterMarker(List<PoiEntity> poiEntities) { private void initFilterMarker(List<PoiEntity> poiEntities) {
@ -410,25 +434,32 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}).setTitle(title); }).setTitle(title);
break; break;
case R.id.iv_filter: case R.id.iv_filter:
Bundle bundle = new Bundle(); FilterFragment filterFragment = FilterFragment.newInstance(new Bundle());
bundle.putString("test", "test");
FilterFragment filterFragment = FilterFragment.newInstance(bundle);
showSlidingFragment(filterFragment); showSlidingFragment(filterFragment);
break; break;
} }
} }
/**
* header 头部布局
* @param view
*/
public void initHeader(View view){
dragView.removeAllViews();
dragView.addView(view);
}
/** /**
* 将fragment显示到抽屉内 * 将fragment显示到抽屉内
*/ */
private void showSlidingFragment(BaseDrawerFragment fragment){ private void showSlidingFragment(BaseDrawerFragment fragment) {
fragmentTransaction = supportFragmentManager.beginTransaction(); fragmentTransaction = supportFragmentManager.beginTransaction();
sliding_layout.setPanelHeight(1000); sliding_layout.setPanelHeight(1000);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
fragmentTransaction.add(R.id.dragView, fragment, fragment.getClass().getName()); fragmentTransaction.add(R.id.scroll_view, fragment, fragment.getClass().getName());
if (!(fragment instanceof FilterFragment)) { if (!(fragment instanceof FilterFragment)) {
FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName()); FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName());
if (filterFragment!=null) { if (filterFragment != null) {
fragmentTransaction.hide(filterFragment); fragmentTransaction.hide(filterFragment);
} }
} }
@ -549,4 +580,5 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
getActivity().finish(); getActivity().finish();
return true; return true;
} }
} }

View File

@ -7,11 +7,12 @@ import androidx.room.TypeConverters;
import com.navinfo.outdoor.bean.Info; import com.navinfo.outdoor.bean.Info;
import com.navinfo.outdoor.util.PhotoInfoConverter; import com.navinfo.outdoor.util.PhotoInfoConverter;
import java.io.Serializable;
import java.util.List; import java.util.List;
//poi 的实体类 //poi 的实体类
@Entity(tableName = "poi") @Entity(tableName = "poi")
public class PoiEntity { public class PoiEntity implements Serializable {
@PrimaryKey(autoGenerate = true) // 设置主键并且自动生长 @PrimaryKey(autoGenerate = true) // 设置主键并且自动生长
private int id; private int id;
@ -52,7 +53,7 @@ public class PoiEntity {
private String x;//经度 private String x;//经度
private String y;//纬度 private String y;//纬度
private String detail;//深度信息 private String detail;//深度信息
private int taskStatus;//任务状态 0.待提交1.已提交 private int taskStatus;//任务状态 0.待提交1.已提交,2 已领取
private int type;//0.poi,1.道路2.充电站3.其他 private int type;//0.poi,1.道路2.充电站3.其他
public int getType() { public int getType() {

View File

@ -0,0 +1,34 @@
<?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_filter"
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_filter"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:visibility="gone"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_filter"
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>

View File

@ -1,37 +1,10 @@
<?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" <LinearLayout 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"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout
android:id="@+id/rl_filter"
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_filter"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:visibility="gone"
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_filter"
style="@style/text_style_toolbar_title"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/iv_find_task"
android:text="任务筛选" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_filter" android:id="@+id/ll_filter"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -51,27 +24,27 @@
style="@style/text_style" style="@style/text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="类型" android:text="任务状态"
app:layout_constraintBottom_toTopOf="@+id/tv_type" app:layout_constraintBottom_toTopOf="@+id/tv_type"
app:layout_constraintStart_toStartOf="@+id/tv_type" /> app:layout_constraintStart_toStartOf="@+id/tv_type"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/tv_type" android:id="@+id/tv_type"
style="@style/main_about_text_style" style="@style/main_about_text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginBottom="20dp"
android:text="专属" android:layout_marginLeft="10dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:background="@drawable/ic_baseline_arrow_forward" android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -89,32 +62,33 @@
style="@style/text_style" style="@style/text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="类型" android:text="任务类型"
app:layout_constraintBottom_toTopOf="@+id/tv_exclusive" app:layout_constraintBottom_toTopOf="@+id/tv_exclusive"
app:layout_constraintStart_toStartOf="@+id/tv_exclusive" /> app:layout_constraintStart_toStartOf="@+id/tv_exclusive"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/tv_exclusive" android:id="@+id/tv_exclusive"
style="@style/main_about_text_style" style="@style/main_about_text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:text="全部" android:text="全部"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:background="@drawable/ic_baseline_arrow_forward" android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_photograph" android:id="@+id/cl_photograph"
android:layout_width="0dp" android:layout_width="0dp"
@ -122,31 +96,70 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/road_shape"> android:background="@drawable/road_shape">
<TextView
android:id="@+id/textView2"
style="@style/text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginBottom="5dp"
android:text="权限类型"
app:layout_constraintBottom_toTopOf="@+id/tv_photograph"
app:layout_constraintStart_toStartOf="@+id/tv_photograph"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_photograph"
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_number"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/road_shape">
<TextView <TextView
style="@style/text_style" style="@style/text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="类型" android:text="任务个数"
app:layout_constraintBottom_toTopOf="@+id/tv_photograph" app:layout_constraintBottom_toTopOf="@+id/tv_number"
app:layout_constraintStart_toStartOf="@+id/tv_photograph" /> app:layout_constraintStart_toStartOf="@+id/tv_number"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/tv_photograph" android:id="@+id/tv_number"
style="@style/main_about_text_style" style="@style/main_about_text_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginBottom="20dp"
android:text="拍照" android:layout_marginLeft="10dp"
android:text="200"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:background="@drawable/ic_baseline_arrow_forward" android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -172,14 +185,6 @@
android:text="筛选结果" android:text="筛选结果"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv_result"
android:layout_centerVertical="true"
android:textStyle="italic"
android:text="共101条"/>
<Button <Button
android:id="@+id/btn_filter" android:id="@+id/btn_filter"
android:layout_width="80dp" android:layout_width="80dp"
@ -198,9 +203,9 @@
<com.jcodecraeer.xrecyclerview.XRecyclerView <com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/recycler_filter" android:id="@+id/recycler_filter"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
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/rl_filters" /> app:layout_constraintTop_toBottomOf="@+id/rl_filters" />
</androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="众包录像 测试3"
android:textColor="#333"
android:layout_margin="20dp"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3.5元"
android:textColor="#F44336"
android:textSize="20sp"
android:textStyle="bold"
android:layout_margin="15dp"
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_title" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="到期时间:"
android:textSize="15sp"
android:maxLength="10"
app:layout_constraintStart_toStartOf="@+id/tv_title"
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
<TextView
android:id="@+id/tv_length"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="长度:"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_time"
app:layout_constraintEnd_toStartOf="@+id/tv_distance"
app:layout_constraintStart_toEndOf="@+id/tv_time"
app:layout_constraintTop_toTopOf="@+id/tv_time" />
<TextView
android:id="@+id/tv_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="距离:"
android:textSize="15sp"
android:maxLength="10"
app:layout_constraintBottom_toBottomOf="@+id/tv_length"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_length" />
<TextView
android:id="@+id/tv_describe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="任务描述:"
android:textSize="15sp"
android:maxLength="10"
android:layout_marginTop="20dp"
app:layout_constraintStart_toStartOf="@+id/tv_time"
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
<Button
android:id="@+id/btn_bank"
style="@style/user_data_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="立即采集"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_describe" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,54 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".fragment.RoadFragment"> tools:context=".fragment.RoadFragment">
<ImageView
android:id="@+id/road_bg"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:background="@drawable/top_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<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: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
android:layout_width="match_parent" android:layout_width="match_parent"
@ -61,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_toBottomOf="@id/road_bg"> app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/tv_message" android:id="@+id/tv_message"

View File

@ -1,525 +1,457 @@
<?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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:id="@+id/scroller_view"
xmlns:app="http://schemas.android.com/apk/res-auto"> app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
<ScrollView app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout <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_width="match_parent"
android:layout_height="wrap_content" 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">
<androidx.constraintlayout.widget.ConstraintLayout <TextView
android:id="@+id/linear_image" android:id="@+id/tv_pot"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="150dp" android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
app:layout_constraintBottom_toTopOf="@+id/tv_01" android:layout_alignParentLeft="true"
app:layout_constraintEnd_toEndOf="parent" android:layout_centerVertical="true"
app:layout_constraintStart_toStartOf="parent" android:layout_marginLeft="18dp"
app:layout_constraintTop_toTopOf="parent"> android:text="点位*"
android:textColor="#333" />
<ImageView <CheckBox
android:id="@+id/road_bg" android:id="@+id/check_pot_life"
android:layout_width="wrap_content" android:layout_width="50dp"
android:layout_height="150dp" android:layout_height="20dp"
android:background="@drawable/top_bg" android:layout_centerVertical="true"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginLeft="20dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_toRightOf="@id/tv_pot"
app:layout_constraintLeft_toLeftOf="parent" android:background="@drawable/selector_change_bg"
app:layout_constraintTop_toTopOf="parent" android:button="@null"
app:layout_constraintVertical_bias="1.0" /> android:gravity="center"
android:text="编辑"
<TextView android:textSize="8sp" />
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>
<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 <TextView
android:id="@+id/tv_01" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="01基本资料填写" />
android:layout_margin="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/linear_image" />
<RelativeLayout <EditText
android:id="@+id/linear_pot" android:id="@+id/tv_name_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp" android:layout_centerVertical="true"
android:padding="2dp" android:layout_marginLeft="18dp"
android:background="@drawable/underline" android:layout_toRightOf="@id/tv_name"
app:layout_constraintEnd_toEndOf="parent" android:background="@color/white"
app:layout_constraintHorizontal_bias="1.0" android:hint="poi名称"
app:layout_constraintStart_toStartOf="parent" android:layout_toEndOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_01"> android:layout_toStartOf="@id/tv_examine"
android:textSize="15sp"
<TextView android:textColor="#333" />
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="poi名称"
android:layout_toEndOf="@id/tv_name"
android:layout_toStartOf="@id/tv_examine"
android:textSize="15sp"
android:textColor="#333" />
<TextView
android:id="@+id/tv_examine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看"
android:layout_margin="4dp"
android:textColor="@color/design_default_color_primary"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/linear_site"
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_name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_site"
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_site_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_centerVertical="true"
android:layout_marginLeft="18dp"
android:layout_toRightOf="@id/tv_site"
android:background="@color/white"
android:hint="poi地址"
android:textSize="15sp"
android:textColor="#333" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/linear_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/underline"
app:layout_constraintTop_toBottomOf="@id/linear_site"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_phone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
/>
</RelativeLayout>
<TextView <TextView
android:id="@+id/tv_02" android:id="@+id/tv_examine"
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="查看"
android:layout_margin="10dp" android:layout_margin="4dp"
app:layout_constraintStart_toStartOf="parent" android:textColor="@color/design_default_color_primary"
app:layout_constraintTop_toBottomOf="@id/linear_phone" /> android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/linear_site"
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_name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_site"
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_site_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_centerVertical="true"
android:layout_marginLeft="18dp"
android:layout_toRightOf="@id/tv_site"
android:background="@color/white"
android:hint="poi地址"
android:textSize="15sp"
android:textColor="#333" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/linear_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/underline"
app:layout_constraintTop_toBottomOf="@id/linear_site"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_phone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
/>
</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_phone" />
<LinearLayout
android:id="@+id/linear_photograph"
android:layout_width="match_parent"
android:layout_height="200dp"
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">
<LinearLayout <LinearLayout
android:id="@+id/linear_photograph"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="0dp"
android:layout_margin="10dp" android:layout_weight="1"
android:layout_marginStart="10dp" >
android:layout_marginEnd="10dp" <RelativeLayout
android:orientation="vertical" android:id="@+id/rl_panorama"
app:layout_constraintTop_toBottomOf="@id/tv_02" android:layout_width="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
> android:layout_height="match_parent"
<RelativeLayout android:layout_marginTop="10dp"
android:id="@+id/rl_panorama" android:background="#03A9F4"
android:layout_width="0dp" android:layout_marginRight="5dp"
android:layout_weight="1" android:layout_marginBottom="10dp">
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_panorama"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/quanjing"
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_name"
android:layout_width="0dp"
android:layout_weight="1"
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_name"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/mingcheng"
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_name"
/>
<ImageView
android:id="@+id/iv_name"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_internal_photos"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_internal"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/mingcheng"
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_internal"
/>
<ImageView
android:id="@+id/iv_internal"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<RelativeLayout
android:id="@+id/rl_card"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_card"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/mingpian"
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_card"
/>
<ImageView
android:id="@+id/iv_card"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_else"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_else"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/qita"
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_else"
/>
<ImageView
android:id="@+id/iv_else"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<ImageView <ImageView
android:layout_width="0dp" android:id="@+id/image_panorama"
android:layout_weight="1" android:layout_centerHorizontal="true"
android:layout_marginTop="10dp" android:layout_width="20dp"
android:layout_marginBottom="10dp" android:layout_marginTop="20dp"
android:layout_marginRight="5dp" android:background="@drawable/quanjing"
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" android:layout_height="match_parent"
/> />
</LinearLayout> </RelativeLayout>
</LinearLayout> <RelativeLayout
<TextView android:id="@+id/rl_name"
android:id="@+id/tv_03" android:layout_width="0dp"
android:layout_width="wrap_content" android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:text="02拍照" android:layout_marginTop="10dp"
android:layout_margin="10dp" android:background="#03A9F4"
app:layout_constraintStart_toStartOf="parent" android:layout_marginRight="5dp"
app:layout_constraintTop_toBottomOf="@id/linear_photograph" /> android:layout_marginBottom="10dp">
<LinearLayout <ImageView
android:id="@+id/linear_describe" android:id="@+id/image_name"
android:layout_width="match_parent" android:layout_centerHorizontal="true"
android:layout_height="wrap_content" android:layout_width="20dp"
android:layout_margin="10dp" android:layout_marginTop="20dp"
android:layout_marginStart="10dp" android:background="@drawable/mingcheng"
android:layout_marginEnd="10dp" android:layout_height="20dp"
android:background="@drawable/underline" />
app:layout_constraintTop_toBottomOf="@id/tv_03" <TextView
app:layout_constraintEnd_toEndOf="parent" android:layout_width="wrap_content"
app:layout_constraintStart_toStartOf="parent"> android:layout_height="wrap_content"
<EditText android:layout_centerHorizontal="true"
android:id="@+id/edit_describe" android:text="*名称"
android:layout_width="match_parent" android:textSize="8sp"
android:layout_margin="5dp"
android:textColor="@color/pickerview_wheelview_textcolor_divider"
android:layout_below="@id/image_name"
/>
<ImageView
android:id="@+id/iv_name"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_internal_photos"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_internal"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/mingcheng"
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_internal"
/>
<ImageView
android:id="@+id/iv_internal"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<RelativeLayout
android:id="@+id/rl_card"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_card"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/mingpian"
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_card"
/>
<ImageView
android:id="@+id/iv_card"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_else"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:background="#EFEDED"
android:layout_marginRight="5dp"
android:layout_marginBottom="10dp">
<ImageView
android:id="@+id/image_else"
android:layout_centerHorizontal="true"
android:layout_width="20dp"
android:layout_marginTop="20dp"
android:background="@drawable/qita"
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_else"
/>
<ImageView
android:id="@+id/iv_else"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
<ImageView
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_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>
</LinearLayout>
<LinearLayout <TextView
android:id="@+id/tv_03"
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_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_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_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_margin="10dp"
android:layout_marginTop="20dp" android:layout_weight="1"
android:layout_marginRight="10dp" android:background="@drawable/shape_red_radius_bg"
android:layout_marginBottom="20dp" android:text="保存本地"
android:orientation="horizontal" android:textColor="@color/white" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/linear_describe">
<Button <Button
android:id="@+id/btn_save_local" android:id="@+id/btn_uploading"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp" android:layout_margin="10dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_red_radius_bg" android:background="@drawable/shape_transparent_pink_radius_bg"
android:text="保存本地" android:text="上传" />
android:textColor="@color/white" /> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<Button </ScrollView>
android:id="@+id/btn_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>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View 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="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>

View File

@ -0,0 +1,54 @@
<?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_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<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: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>

View File

@ -7,6 +7,8 @@
android:id="@+id/sliding_layout" android:id="@+id/sliding_layout"
sothree:umanoPanelHeight="0dp" sothree:umanoPanelHeight="0dp"
sothree:umanoShadowHeight="0dp" sothree:umanoShadowHeight="0dp"
sothree:umanoScrollableView="@id/scroll_view"
sothree:umanoDragView="@id/dragView"
sothree:umanoOverlay="false" sothree:umanoOverlay="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -15,23 +17,33 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
> >
<com.tencent.tencentmap.mapsdk.maps.MapView <com.tencent.tencentmap.mapsdk.maps.MapView
android:id="@+id/treasure_map" android:id="@+id/treasure_map"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize" android:layout_marginTop="?attr/actionBarSize"
android:gravity="center"
android:focusable="false" android:focusable="false"
android:focusableInTouchMode="false" android:focusableInTouchMode="false"
app:layout_constraintBottom_toBottomOf="parent" android:gravity="center"
app:layout_constraintBottom_toTopOf="@+id/frame_layout"
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">
app:layout_constraintVertical_bias="1.0" >
</com.tencent.tencentmap.mapsdk.maps.MapView> </com.tencent.tencentmap.mapsdk.maps.MapView>
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="200dp"
android:visibility="gone"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<CheckBox <CheckBox
android:id="@+id/cb_map_type" android:id="@+id/cb_map_type"
android:layout_width="40dp" android:layout_width="40dp"
@ -113,8 +125,16 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true">
android:id="@+id/dragView"> <LinearLayout
android:id="@+id/dragView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/scroll_view"></LinearLayout>
</LinearLayout> </LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout> </com.sothree.slidinguppanel.SlidingUpPanelLayout>