修改1级的部分bug,解决点位方向旋转问题

This commit is contained in:
wds 2021-08-02 18:28:28 +08:00
parent c87f5d5ffa
commit 8a8117875f
13 changed files with 214 additions and 145 deletions

View File

@ -431,7 +431,9 @@ public class FragmentManagement extends BaseActivity {
break;
case 31://记录-已提交-任务列表的fragment
if (poiTaskFragment == null) {
poiTaskFragment =PoiTaskFragment.newInstance(new Bundle());
Bundle bundle = new Bundle();
bundle.putInt("type",getIntent().getIntExtra("type",0));
poiTaskFragment =PoiTaskFragment.newInstance(bundle);
fragmentTransaction.add(R.id.frame_layout, poiTaskFragment);
} else {
fragmentTransaction.show(poiTaskFragment);

View File

@ -306,7 +306,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
if (timerTask!=null){
timerTask.cancel();
}else {
Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
// Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
}
}
});

View File

@ -54,7 +54,7 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
}
if (poiEntity.getPrecision()!=null){
holder.tvMoney.setText("" + poiEntity.getPrecision());
holder.tvMoney.setText("" + format2(Double.valueOf(poiEntity.getPrecision())));
}else {
holder.tvMoney.setText("" + 0);
}

View File

@ -42,10 +42,10 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
@Override
public void onBindViewHolder(@NonNull @NotNull ViewHolder holder, int position) {
HasSubmitBean.BodyBean.ListBean listBean = listBeans.get(position);
holder.tvnName.setText(listBean.getName());
holder.tvTime.setText(listBean.getCreateTime());
holder.tvMassage.setText(listBean.getAuditMsg());
holder.tvMany.setText(listBean.getAuditStatus());
holder.tvnName.setText(listBean.getName()+"");
holder.tvTime.setText(listBean.getCreateTime()+"");
holder.tvMassage.setText(listBean.getAuditMsg()+"");
holder.tvMany.setText(listBean.getAuditStatus()+"");
}
@Override

View File

@ -78,7 +78,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
private CheckBox checkBoxLife, checkBoxRight;
private Spinner spinnerType, spinnerScutcheon, spinnerStake;
String[] type = new String[]{"地上五层", "地上四层", "地上三层", "地上二层", "地上一层", "地下一层", "地下二层", "地下三层", "地下四层", "地下五层"};
String[] scutcheon = new String[]{"存在", "存在"};
String[] scutcheon = new String[]{"存在","存在"};
String[] stake = new String[]{"可以使用", "不可使用", "维修中", "建设中", "规划中"};
private ArrayAdapter<String> adapterType, adapterScutcheon, adapterStake;
private RelativeLayout rlPanorama, rlCoding, rlEquipment, rlFacility, rlUsable, rlAvailable, rlParking, rlNumber, rlScutcheon, rlDevice;

View File

@ -438,6 +438,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
private void initShowPoi() {
// 添加信息
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
if (showPoiEntity.getTaskStatus()==1||showPoiEntity.getTaskStatus()==5){
tvExamine.setVisibility(View.GONE);
}else {
tvExamine.setVisibility(View.VISIBLE);
}
String name = showPoiEntity.getName();//名称
if (name != null && !name.equals("")) {
editNameContent.setText(name + "");
@ -455,6 +460,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
latLng.setLongitude(Double.parseDouble(x));
}
initPhone();
String describe = showPoiEntity.getMemo();//任务描述
if (describe != null && !describe.equals("")) {
editDescribe.setText(describe);

View File

@ -115,9 +115,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
otherAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
if (hasSubmitBeanBody!=null){
otherAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
}
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
@ -146,9 +148,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
if (hasSubmitBeanBody!=null){
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
}
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
@ -177,9 +181,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
roadAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
if (hasSubmitBeanBody!=null){
roadAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
}
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
@ -208,9 +214,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
if (hasSubmitBeanBody!=null){
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
}
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
@ -239,10 +247,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
auditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
auditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
if (hasSubmitBeanBody!=null){
auditProcess.setText(hasSubmitBeanBody.getAuditedCount()+"");
auditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
}
@Override
@ -263,21 +274,34 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
public void onClick(View v) {
switch (v.getId()) {
case R.id.cl_poi:
Intent hasIntent = new Intent(getContext(), FragmentManagement.class);
hasIntent.putExtra("tag", 31);
startActivity(hasIntent);
Intent poiIntent = new Intent(getContext(), FragmentManagement.class);
poiIntent.putExtra("tag", 31);
poiIntent.putExtra("type", 1);
startActivity(poiIntent);
break;
case R.id.cl_road:
Intent roadIntent = new Intent(getContext(), FragmentManagement.class);
roadIntent.putExtra("tag", 31);
roadIntent.putExtra("type", 4);
startActivity(roadIntent);
break;
case R.id.cl_charging:
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
chargingIntent.putExtra("tag", 31);
chargingIntent.putExtra("type", 2);
startActivity(chargingIntent);
break;
case R.id.cl_other:
Intent otherIntent = new Intent(getContext(), FragmentManagement.class);
otherIntent.putExtra("tag", 31);
otherIntent.putExtra("type", 5);
startActivity(otherIntent);
break;
case R.id.cl_poiVideo:
Intent poiVideoIntent = new Intent(getContext(), FragmentManagement.class);
poiVideoIntent.putExtra("tag", 31);
poiVideoIntent.putExtra("type", 3);
startActivity(poiVideoIntent);
break;
}
}

View File

@ -325,6 +325,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private void initShowPoi() {
// 添加信息
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
if (showPoiEntity.getTaskStatus()==1||showPoiEntity.getTaskStatus()==5){
tvExamine.setVisibility(View.GONE);
}else {
tvExamine.setVisibility(View.VISIBLE);
}
String name = showPoiEntity.getName();//名称
if (name != null && !name.equals("")) {
editNameContent.setText(name + "");
@ -340,8 +345,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
latLng.setLatitude(Double.parseDouble(y));
latLng.setLongitude(Double.parseDouble(x));
}
//得到区号
initPhone();
String memo = showPoiEntity.getMemo();//任务描述
if (memo != null && !memo.equals("")) {
editDescribe.setText(memo + "");
@ -452,6 +457,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
dismissLoadingDialog();
if (getPhoneBean.getCode() == 200) {
String code = getPhoneBean.getBody().getCode();
// Toast.makeText(getActivity(), code+"", Toast.LENGTH_SHORT).show();
Constant.CODE = code;
}
}

View File

@ -4,6 +4,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.DividerItemDecoration;
@ -24,13 +25,17 @@ import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
import com.umeng.commonsdk.debug.D;
import java.util.List;
/**
* 记录-已提交-poi任务列表
*/
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
private ImageView ivPoiTaskFinish;
private XRecyclerView poiTaskXrv;
private int type;
private PoiTaskAdapter poiTaskAdapter;
private TextView tvTaskTitle;
public static PoiTaskFragment newInstance(Bundle bundle) {
PoiTaskFragment fragment = new PoiTaskFragment();
@ -46,6 +51,24 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
@Override
protected void initView() {
super.initView();
tvTaskTitle = findViewById(R.id.tv_poiTask_title);
switch (type){
case 1:
tvTaskTitle.setText("POI任务列表");
break;
case 2:
tvTaskTitle.setText("充电站任务列表");
break;
case 3:
tvTaskTitle.setText("POIVIDEO任务列表");
break;
case 4:
tvTaskTitle.setText("道路任务列表");
break;
case 5:
tvTaskTitle.setText("其他任务列表");
break;
}
ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
ivPoiTaskFinish.setOnClickListener(this::onClick);
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
@ -56,7 +79,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
//取消上拉加载刷新功能
poiTaskXrv.setPullRefreshEnabled(false);
poiTaskXrv.setLoadingMoreEnabled(false);
PoiTaskAdapter poiTaskAdapter = new PoiTaskAdapter(getContext());
poiTaskAdapter = new PoiTaskAdapter(getContext());
poiTaskXrv.setAdapter(poiTaskAdapter);
poiTaskXrv.getDefaultFootView().setNoMoreHint("加载完毕");
@ -76,10 +99,12 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
@Override
protected void initData() {
super.initData();
// initWork(type);
type = getArguments().getInt("type", 0);
initWork(type);
}
private void initWork(int type) {
showLoadingDialog();
HttpParams httpParams = new HttpParams();
httpParams.put("type", type);
httpParams.put("pageSize", "10");
@ -94,9 +119,11 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
@Override
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
dismissLoadingDialog();
List<HasSubmitBean.BodyBean.ListBean> list = hasSubmitBean.getBody().getList();
if (list!=null){
poiTaskAdapter.setListBeans(list);
}
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
}
@Override
@ -106,6 +133,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
}
}).build();
dismissDialog();
}
@Override

View File

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

View File

@ -896,7 +896,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
setMainButtonVisiable((Integer) data.obj);
} else if (data.what == Constant.MAIN_HEADER) {// 控制主界面各个header
View view = (View) data.obj;
initHeader(view);
if (view!=null){
initHeader(view);
}
} else if (data.what == Constant.MAIN_REMOVE) {//// 控制主界面各个header移除
if ((boolean) data.obj) {
dragView.removeAllViews();

View File

@ -6,6 +6,7 @@
android:layout_height="match_parent"
app:layout_heightPercent="100%"
android:background="@drawable/bg"
tools:context="activity.LoginActivity">
<TextView

View File

@ -1,126 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView 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"
tools:context=".fragment.StaySubmitFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_stay_type"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
style="@style/text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="类型"
app:layout_constraintBottom_toTopOf="@+id/tv_stay_type"
app:layout_constraintStart_toStartOf="@+id/tv_stay_type" />
<TextView
android:id="@+id/tv_stay_type"
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colormap"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_results"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_stay_type">
<TextView
android:id="@+id/tv_stay_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="筛选结果"
android:textSize="25sp"
android:textStyle="bold" />
android:layout_height="match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_stay_type"
android:layout_width="match_parent"
android:layout_height="280dp">
android:layout_height="70dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
style="@style/text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="类型"
app:layout_constraintBottom_toTopOf="@+id/tv_stay_type"
app:layout_constraintStart_toStartOf="@+id/tv_stay_type" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/stay_xrv"
android:layout_width="match_parent"
android:layout_height="0dp"
<TextView
android:id="@+id/tv_stay_type"
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:background="@drawable/ic_baseline_arrow_forward"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colormap"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_del"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_results">
<CheckBox
android:id="@+id/cb_select"
style="@style/CheckBoxTheme"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/ll_results"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="全选"
android:textSize="17sp" />
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_stay_type">
<TextView
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
<TextView
android:id="@+id/tv_stay_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="筛选结果"
android:textSize="25sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/stay_xrv"
android:nestedScrollingEnabled="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_del"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="删除"
android:textColor="@color/colorPrimaryBlue"
android:textSize="18sp" />
</LinearLayout>
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_results">
<Button
android:id="@+id/btn_stay_submit"
style="@style/user_data_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:text="提交"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_del" />
</androidx.constraintlayout.widget.ConstraintLayout>
<CheckBox
android:id="@+id/cb_select"
style="@style/CheckBoxTheme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="全选"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="删除"
android:textColor="@color/colorPrimaryBlue"
android:textSize="18sp" />
</LinearLayout>
<Button
android:id="@+id/btn_stay_submit"
style="@style/user_data_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="提交"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_del"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>