main
huangwei 9 months ago
parent 752d8db931
commit f5be8d917c
  1. BIN
      app/libs/colorpickerview-release.aar
  2. 3
      app/src/main/java/com/project/survey/dialog/CustomLineChartDialog.java
  3. 310
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/AddCodeActivity.java
  4. 250
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/CodeLibraryActivity.java
  5. 165
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/CodeStylePointLineActivity.java
  6. 52
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/ControlRecordListActivity.java
  7. 107
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/PickerColorActivity.java
  8. 68
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/PointSurveyNewActivity.java
  9. 559
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/PointSurveySettingActivity.java
  10. 136
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/adapter/CodeLibraryAdapter.java
  11. 68
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/adapter/ControlRecordListAdapter.java
  12. 72
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/util/CodeConsUtils.java
  13. 256
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/util/SFUtils.java
  14. 111
      app/src/main/java/com/project/survey/ui/pointmeasure/measure/util/SurveyToolBarClickListenerUtils.java
  15. 161
      app/src/main/java/com/project/survey/util/CommonUtils.java
  16. 118
      app/src/main/java/com/project/survey/util/SurveyDevicePoleHrHeightUtils.java
  17. 122
      app/src/main/java/com/project/survey/util/SurveyUIUtils.java
  18. 52
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/DefaultItemCallback.java
  19. 9
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/DefaultItemTouchHelper.java
  20. 144
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/FunctionAdapter.java
  21. 133
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/FunctionBlockAdapter.java
  22. 38
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/FunctionItem.java
  23. 37
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/FunctionItemID.java
  24. 15
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/ItemTouchHelperAdapter.java
  25. 33
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/SpaceItemDecoration.java
  26. 27
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/SquareRelativeLayout.java
  27. 45
      app/src/main/java/com/project/survey/widget/bingce/dragdrop/TabItem.java
  28. 3
      app/src/main/java/com/project/survey/widget/bingce/gaode/GaoDeBottomSheetBehavior.java
  29. 3
      app/src/main/java/com/project/survey/widget/bingce/gaode/GaoDeBtnBehavior.java
  30. 20
      app/src/main/res/anim/down_anim.xml
  31. 5
      app/src/main/res/drawable/bg_block_tab.xml
  32. 13
      app/src/main/res/drawable/bg_grid_press.xml
  33. 9
      app/src/main/res/drawable/ic_block_add.xml
  34. 9
      app/src/main/res/drawable/ic_block_delete.xml
  35. 9
      app/src/main/res/drawable/ic_block_selected.xml
  36. 10
      app/src/main/res/drawable/icon_black_line_more.xml
  37. 8
      app/src/main/res/drawable/icon_code_center_circle.xml
  38. 7
      app/src/main/res/drawable/icon_code_circle_empty.xml
  39. 5
      app/src/main/res/drawable/icon_code_circle_full.xml
  40. 5
      app/src/main/res/drawable/icon_code_color_palette.xml
  41. 7
      app/src/main/res/drawable/icon_code_rhombus_empty.xml
  42. 5
      app/src/main/res/drawable/icon_code_rhombus_full.xml
  43. 5
      app/src/main/res/drawable/icon_code_rounded_five_star.xml
  44. 7
      app/src/main/res/drawable/icon_code_square_empty.xml
  45. 5
      app/src/main/res/drawable/icon_code_square_full.xml
  46. 5
      app/src/main/res/drawable/icon_code_straight_five_star.xml
  47. 7
      app/src/main/res/drawable/icon_code_triangle_down_empty.xml
  48. 5
      app/src/main/res/drawable/icon_code_triangle_down_full.xml
  49. 7
      app/src/main/res/drawable/icon_code_triangle_up_empty.xml
  50. 5
      app/src/main/res/drawable/icon_code_triangle_up_full.xml
  51. 15
      app/src/main/res/drawable/icon_location_information_earth.xml
  52. 15
      app/src/main/res/drawable/icon_location_information_earth_gray.xml
  53. 15
      app/src/main/res/drawable/icon_remark_green.xml
  54. 9
      app/src/main/res/drawable/icon_survey_paused.xml
  55. 10
      app/src/main/res/drawable/shape_line_dp1.xml
  56. 254
      app/src/main/res/layout/activity_add_code.xml
  57. 154
      app/src/main/res/layout/activity_code_library.xml
  58. 13
      app/src/main/res/layout/activity_control_record_list.xml
  59. 111
      app/src/main/res/layout/activity_picker_color.xml
  60. 463
      app/src/main/res/layout/activity_point_survey_setting.xml
  61. 222
      app/src/main/res/layout/layout_base_survey_staking_setting.xml
  62. 78
      app/src/main/res/layout/layout_code_library_item.xml
  63. 120
      app/src/main/res/layout/layout_control_record_item.xml
  64. 41
      app/src/main/res/layout/layout_dragging_button.xml
  65. 38
      app/src/main/res/layout/layout_function_text.xml
  66. 53
      app/src/main/res/layout/layout_grid_item.xml
  67. 81
      app/src/main/res/layout/layout_linechart_dialog.xml
  68. 26
      app/src/main/res/layout/layout_pole_hr_height.xml
  69. BIN
      app/src/main/res/mipmap-xxhdpi/ic_block_tab_checked.png
  70. BIN
      app/src/main/res/mipmap-xxhdpi/ic_block_tab_unchecked.png
  71. BIN
      app/src/main/res/mipmap-xxhdpi/icon_checkbox_select_ovel.png
  72. BIN
      app/src/main/res/mipmap-xxhdpi/icon_checkbox_unselect_ovel.png
  73. BIN
      app/src/main/res/mipmap-xxhdpi/icon_import_green.png
  74. 9
      app/src/main/res/values/attr.xml
  75. 73
      app/src/main/res/values/strings.xml
  76. 8
      app/src/main/res/values/styles.xml

@ -9,7 +9,10 @@ import android.widget.TextView;
import com.bingce.coordlib.model.Blh;
import com.bingce.coordlib.model.Coordinate;
import com.project.survey.R;
import com.project.survey.model.ControlRecord;
import com.project.survey.ui.pointmeasure.measure.ControlRecordListActivity;
import com.project.survey.util.CommonUtils;
import java.util.ArrayList;

@ -0,0 +1,310 @@
package com.project.survey.ui.pointmeasure.measure;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_LINE;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_POINT;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_SURFACE;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import com.bingce.data.database.CodeDb;
import com.bingce.data.surveyor.surveydata.code.CodeRecord;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.surveyor.util.PreferencesUtil;
import com.bingce.surveyor.util.dialog.CustomRecycleDialog;
import com.bingce.utils.IdUtils;
import com.bingce.utils.IntentUtil;
import com.bingce.utils.ThreadPoolUtil;
import com.google.gson.Gson;
import com.project.survey.R;
import com.project.survey.databinding.ActivityAddCodeBinding;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import com.project.survey.ui.instrument.setupstation.LauncherEvent;
import com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils;
import com.project.survey.util.CommonUtils;
import com.project.survey.util.DrawableUtils;
import java.util.ArrayList;
import java.util.List;
import blankj.utilcode.util.ToastUtils;
public class AddCodeActivity extends BaseSurveyNewActivity {
private ActivityAddCodeBinding binding;
private List<String> codeTypeList = new ArrayList<>();
private int codeShapeTypeIndex = 0;//0:点,1:线,2:面
private int codeShapeColor;//点和线的颜色,面的填充色。
private int codeShapeSizeIndex = 0;//点、线和面的轮廓线的尺寸大小。
private int codeStyleIndexPoint = 0;//点的默认选中的下坐标。
private int codeStyleIndexLine = 0;//线的默认选中的下坐标。
private int contourColor;//面的轮廓颜色。
private String codeId;
@Override
public View getContentView() {
binding = ActivityAddCodeBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
setTitle(getString(R.string.add) + getString(R.string.point_code));
}
@Override
protected void initData() {
String json = IntentUtil.stringExtra(this, CODE_RECORD);
if (!TextUtils.isEmpty(json)){
CodeRecord codeRecord = new Gson().fromJson(json, CodeRecord.class);
codeId = codeRecord.id;
codeShapeTypeIndex = codeRecord.codeGroupType;
binding.etCodeName.setText(codeRecord.codeName);
binding.etCode.setText(codeRecord.code);
codeShapeSizeIndex = codeRecord.codeSizeShape;
switch (codeRecord.codeGroupType){
case SHAPE_TYPE_POINT:
codeStyleIndexPoint = codeRecord.codeFeatureShape;
codeShapeColor = codeRecord.colorShape;
contourColor = codeRecord.colorShape;
break;
case SHAPE_TYPE_LINE:
codeStyleIndexLine = codeRecord.codeFeatureShape;
codeShapeColor = codeRecord.colorShape;
contourColor = codeRecord.colorShape;
break;
case SHAPE_TYPE_SURFACE:
codeStyleIndexLine = codeRecord.codeFeatureShape;
codeShapeColor = codeRecord.colorShape;
contourColor = codeRecord.codeColorContour;
break;
}
}else {
codeId = IdUtils.getUUID();
codeShapeTypeIndex = PreferencesUtil.getAddCodeTypeIndex();
codeShapeColor = getResources().getColor(R.color.theme_green);
contourColor = codeShapeColor;
}
codeTypeList.add(getString(R.string.point));
codeTypeList.add(getString(R.string.line));
codeTypeList.add(getString(R.string.surface));
setCodeStyle(codeShapeTypeIndex, codeShapeColor);
binding.ivCodeColorPalette.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(R.drawable.icon_code_color_palette),codeShapeColor));
binding.rlCodeType.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
CustomRecycleDialog.showDialog(AddCodeActivity.this, R.string.type, codeTypeList, codeShapeTypeIndex, false, new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
codeShapeTypeIndex = index;
setCodeStyle(index, codeShapeColor);
PreferencesUtil.putPreference(ConstUtils.preferConst.addCodeTypeIndex, index);
}
});
}
});
binding.rlCodeColor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
PickerColorActivity.start(launcher, AddCodeActivity.this, codeShapeColor);
}
});
binding.rlCodeStyle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (codeShapeTypeIndex == SHAPE_TYPE_POINT || codeShapeTypeIndex == SHAPE_TYPE_LINE){
CodeStylePointLineActivity.start(launcher, AddCodeActivity.this, codeShapeTypeIndex, codeShapeColor, codeShapeSizeIndex, codeStyleIndexPoint,codeStyleIndexLine);
}else if (codeShapeTypeIndex == SHAPE_TYPE_SURFACE){
CodeStyleSurfaceActivity.start(launcher,AddCodeActivity.this,codeShapeColor,contourColor,codeShapeSizeIndex,codeStyleIndexLine);
}
}
});
binding.addCodeBtnConfirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String codeName = binding.etCodeName.getText().toString();
String code = binding.etCode.getText().toString();
if (TextUtils.isEmpty(codeName)){
ToastUtils.showShort(getString(R.string.enter_code_name));
return;
}
if (TextUtils.isEmpty(code)){
ToastUtils.showShort(getString(R.string.enter_code));
return;
}
ThreadPoolUtil.execute(new Runnable() {
@Override
public void run() {
CodeRecord codeRecord = new CodeRecord();
codeRecord.id = codeId;
codeRecord.codeGroupType = codeShapeTypeIndex;
codeRecord.codeName = codeName;
codeRecord.code = code;
codeRecord.colorShape = codeShapeColor;
codeRecord.codeSizeShape = codeShapeSizeIndex;
switch (codeShapeTypeIndex){
case SHAPE_TYPE_POINT:
codeRecord.codeFeatureShape = codeStyleIndexPoint;
codeRecord.codeColorContour = codeShapeColor;//点线时候轮廓线默认为colorShape
break;
case SHAPE_TYPE_LINE:
codeRecord.codeFeatureShape = codeStyleIndexLine;
codeRecord.codeColorContour = codeShapeColor;//点线时候轮廓线默认为colorShape
break;
case SHAPE_TYPE_SURFACE:
codeRecord.codeFeatureShape = codeStyleIndexLine;
codeRecord.codeColorContour = contourColor;//面的时候使用
break;
}
CodeDb.getInstance().save(codeRecord);
ToastUtils.showShort(getString(R.string.add_success));
Intent intent = new Intent();
intent.putExtra(ConstUtils.intentConst.keyUpdateCodeRecord, new Gson().toJson(codeRecord));
setResult(LauncherEvent.launcher_code_library_update,intent);
finish();
}
});
}
});
}
/**
* 样式
* @param index
*/
private void setCodeStyle(int index,int color) {
binding.tvCodeType.setText(codeTypeList.get(index));
switch (index){
case SHAPE_TYPE_POINT://点
binding.poinView.setVisibility(View.VISIBLE);
binding.lineView.setVisibility(View.GONE);
binding.faceView.setVisibility(View.GONE);
binding.rlCodeColor.setVisibility(View.VISIBLE);
ViewGroup.LayoutParams params = binding.poinView.getLayoutParams();
switch (codeShapeSizeIndex){
case 0://小尺寸
params.width = CommonUtils.dip2px(5);
params.height = CommonUtils.dip2px(5);
break;
case 1://中尺寸
params.width = CommonUtils.dip2px(10);
params.height = CommonUtils.dip2px(10);
break;
case 2://大尺寸
params.width = CommonUtils.dip2px(15);
params.height = CommonUtils.dip2px(15);
break;
}
binding.poinView.setLayoutParams(params);
binding.poinView.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(CodeConsUtils.showPointIcon(codeStyleIndexPoint)),color));
break;
case SHAPE_TYPE_LINE://线
binding.poinView.setVisibility(View.GONE);
binding.lineView.setVisibility(View.VISIBLE);
binding.faceView.setVisibility(View.GONE);
binding.rlCodeColor.setVisibility(View.VISIBLE);
GradientDrawable gdLine = (GradientDrawable)binding.lineView.getBackground();
int lineWidth = 0;
switch (codeShapeSizeIndex){
case 0:
lineWidth = CommonUtils.dip2px(0.8f);
break;
case 1:
lineWidth = CommonUtils.dip2px(1.3f);
break;
case 2:
lineWidth = CommonUtils.dip2px(1.8f);
break;
}
gdLine.setStroke(lineWidth,color,CommonUtils.dip2px(codeStyleIndexLine + codeStyleIndexLine * 2),CommonUtils.dip2px(codeStyleIndexLine + codeStyleIndexLine * 2));
break;
case SHAPE_TYPE_SURFACE://面
binding.poinView.setVisibility(View.GONE);
binding.lineView.setVisibility(View.GONE);
binding.faceView.setVisibility(View.VISIBLE);
binding.rlCodeColor.setVisibility(View.GONE);
GradientDrawable gradientDrawable = (GradientDrawable)binding.faceView.getBackground();
int conturLineWidth = 0;
switch (codeShapeSizeIndex){
case 0:
conturLineWidth = CommonUtils.dip2px(0.8f);
break;
case 1:
conturLineWidth = CommonUtils.dip2px(1.3f);
break;
case 2:
conturLineWidth = CommonUtils.dip2px(1.8f);
break;
}
gradientDrawable.setStroke(conturLineWidth, contourColor,CommonUtils.dip2px(codeStyleIndexLine + codeStyleIndexLine * 2),CommonUtils.dip2px(codeStyleIndexLine + codeStyleIndexLine * 2));
gradientDrawable.setColor(color);
break;
}
}
private static String CODE_RECORD = "codeRecord";
public static void start(ActivityResultLauncher<Intent> launcher,Context context,String codeRecordJson){
Intent intent = new Intent(context, AddCodeActivity.class);
intent.putExtra(CODE_RECORD,codeRecordJson);
launcher.launch(intent);
}
public final ActivityResultLauncher<Intent> launcher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
if (result != null) {
switch (result.getResultCode()){
case LauncherEvent.launcher_add_code_color:
int color = result.getData().getIntExtra(ConstUtils.intentConst.keyAddCodeColor, -1);
codeShapeColor = color;
setCodeStyle(codeShapeTypeIndex,color);
binding.ivCodeColorPalette.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(R.drawable.icon_code_color_palette),color));
break;
case LauncherEvent.launcher_code_style:
codeStyleIndexPoint = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeStyleIndexPoint,0);
codeStyleIndexLine = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeStyleIndexLine,0);
codeShapeSizeIndex = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeShapeSize,0);
setCodeStyle(codeShapeTypeIndex, codeShapeColor);
break;
case LauncherEvent.launcher_code_shape_surface:
codeStyleIndexLine = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeStyleIndexLine,0);
codeShapeSizeIndex = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeShapeSize,0);
contourColor = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeShapeContourColor, -1);
int fillColor = result.getData().getIntExtra(ConstUtils.intentConst.keyCodeShapeFillColor, -1);
codeShapeColor = fillColor;
setCodeStyle(codeShapeTypeIndex, codeShapeColor);
binding.ivCodeColorPalette.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(R.drawable.icon_code_color_palette),codeShapeColor));
break;
}
}
});
}

@ -0,0 +1,250 @@
package com.project.survey.ui.pointmeasure.measure;
import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL;
import static com.bingce.data.database.DBQueryConstant.AND;
import static com.bingce.data.database.DBQueryConstant.FROM_BIG_2_SMALL;
import static com.bingce.data.database.DBQueryConstant.NOT_DELETED;
import static com.bingce.data.database.DBQueryConstant.OR;
import static com.bingce.data.database.DBQueryConstant.ORDER_BY;
import static com.bingce.data.database.DBQueryConstant.SELECT_FROM;
import static com.bingce.data.database.DBQueryConstant.WHERE;
import android.content.Context;
import android.content.Intent;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.sqlite.db.SimpleSQLiteQuery;
import com.bingce.data.BingCeDbConstant;
import com.bingce.data.database.CodeDb;
import com.bingce.data.database.DBQueryConstant;
import com.bingce.data.surveyor.surveydata.code.CodeConstants;
import com.bingce.data.surveyor.surveydata.code.CodeRecord;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.surveyor.util.dialog.CustomDialog;
import com.bingce.utils.ThreadPoolUtil;
import com.project.survey.App;
import com.project.survey.R;
import com.project.survey.databinding.ActivityCodeLibraryBinding;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import com.project.survey.ui.pointmeasure.measure.adapter.CodeLibraryAdapter;
import java.util.List;
import blankj.utilcode.util.ToastUtils;
import blankj.utilcode.util.Utils;
public class CodeLibraryActivity extends BaseSurveyNewActivity {
private ActivityCodeLibraryBinding binding;
private CodeLibraryAdapter adapter;
private int selectPosition;
private List<CodeRecord> codeRecordList;
@Override
public View getContentView() {
binding = ActivityCodeLibraryBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
setTitle(getString(R.string.code_library), getString(R.string.clear));
if (((App) Utils.getApp()).isThemeDark) {
binding.topLayout.setBackgroundColor(getColor(R.color.theme_dark_black));
binding.tvNumber.setTextColor(getColor(R.color.white));
binding.tvImport.setTextColor(getColor(R.color.white));
}
selectPosition = getIntent().getIntExtra(CODE_INDEX, -1);
binding.codeLibraryBtnNew.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AddCodeActivity.start(launcher, CodeLibraryActivity.this, "");
}
});
binding.codeLibraryBtnEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (codeRecordList == null || selectPosition == -1) {
ToastUtils.showShort(getString(R.string.select_code_edit));
return;
}
AddCodeActivity.start(launcher, CodeLibraryActivity.this, new Gson().toJson(codeRecordList.get(selectPosition)));
}
});
binding.codeLibraryBtnDelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (codeRecordList == null || selectPosition == -1) {
ToastUtils.showShort(getString(R.string.select_code_delete));
return;
}
new CustomDialog.Builder(CodeLibraryActivity.this).setContent("是否要删除编码" + "“" + codeRecordList.get(selectPosition).codeName + "[" + codeRecordList.get(selectPosition).code + "]”?").setButtonConfirm(new View.OnClickListener() {
@Override
public void onClick(View v) {
ThreadPoolUtil.execute(new Runnable() {
@Override
public void run() {
CodeDb.getInstance().delete(codeRecordList.get(selectPosition));
runOnUiThread(new Runnable() {
@Override
public void run() {
codeRecordList.remove(selectPosition);
adapter.notifyItemRemoved(selectPosition);
selectPosition = -1;
}
});
ToastUtils.showShort(getString(R.string.delete_success));
}
});
}
}).create().show();
}
});
binding.codeLibraryBtnApply.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (codeRecordList == null || selectPosition == -1) {
ToastUtils.showShort(getString(R.string.select_code_apply));
return;
}
Intent intent = new Intent();
intent.putExtra(ConstUtils.intentConst.keyApplyIndexCodeRecord, codeRecordList.get(selectPosition).id);
setResult(LauncherEvent.launcher_code_apply_id, intent);
finish();
}
});
binding.llImport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CodeModelLibraryActivity.start(launcher, CodeLibraryActivity.this);
}
});
binding.etEnterNameCode.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
selectPosition = -1;
String s1 = SELECT_FROM + CodeConstants.DB_NAME + WHERE + NOT_DELETED + AND + "(code like '%" + s.toString() + "%'" + OR + "codeName like '%" + s.toString() + "%')" + ORDER_BY + BingCeDbConstant.DB_KEY_CREATED_DATE + FROM_BIG_2_SMALL;
ThreadPoolUtil.execute(new Runnable() {
@Override
public void run() {
codeRecordList = CodeDb.getInstance()
.rawQueryListData(new SimpleSQLiteQuery(s1));
runOnUiThread(new Runnable() {
@Override
public void run() {
updateUI();
}
});
}
});
}
});
}
@Override
protected void initData() {
CodeDb.getInstance()
.rawQueryListLiveData(DBQueryConstant.findListByJob(CodeConstants.DB_NAME, ""))
.observe(this, new Observer<List<CodeRecord>>() {
@Override
public void onChanged(List<CodeRecord> codeList) {
codeRecordList = codeList;
updateUI();
}
});
}
private void updateUI() {
binding.tvCodeNumber.setText(String.valueOf(codeRecordList.size()));
adapter = new CodeLibraryAdapter(CodeLibraryActivity.this, codeRecordList, selectPosition);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(CodeLibraryActivity.this);
linearLayoutManager.setOrientation(VERTICAL);
binding.recyclerView.setLayoutManager(linearLayoutManager);
binding.recyclerView.setAdapter(adapter);
adapter.setOnItemClickListener(new CodeLibraryAdapter.OnItemClickListener() {
@Override
public void onItemClickListener(int position) {
if (codeRecordList != null) {
selectPosition = position;
adapter.setSelectedPosition(position);
}
}
});
}
@Override
protected void onCommonRightClicked(View view) {
if (codeRecordList != null && codeRecordList.size() > 0) {
new CustomDialog.Builder(this).setContent(getString(R.string.want_to_empty_code_library)).setButtonConfirm(new View.OnClickListener() {
@Override
public void onClick(View v) {
ThreadPoolUtil.execute(new Runnable() {
@Override
public void run() {
CodeDb.getInstance().delete(codeRecordList);
runOnUiThread(new Runnable() {
@Override
public void run() {
codeRecordList.clear();
adapter.setData(codeRecordList);
setResult(LauncherEvent.launcher_delete_point_lib);
}
});
}
});
}
}).create().show();
} else {
ToastUtils.showShort(getString(R.string.no_data_clear));
}
}
private static String CODE_INDEX = "codeIndex";
public static void start(ActivityResultLauncher<Intent> launcher, Context context, int codeIndex) {
Intent intent = new Intent(context, CodeLibraryActivity.class);
intent.putExtra(CODE_INDEX, codeIndex);
launcher.launch(intent);
}
public static void start(Context context) {
Intent intent = new Intent(context, CodeLibraryActivity.class);
context.startActivity(intent);
}
public final ActivityResultLauncher<Intent> launcher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
if (result != null) {
switch (result.getResultCode()) {
case LauncherEvent.launcher_code_library_update:
CodeRecord codeRecord = new Gson().fromJson(result.getData().getStringExtra(ConstUtils.intentConst.keyUpdateCodeRecord), CodeRecord.class);
if (codeRecordList != null && selectPosition != -1) {
codeRecordList.set(selectPosition, codeRecord);
adapter.setSelectedPosition(selectPosition);
}
break;
}
}
});
}

@ -0,0 +1,165 @@
package com.project.survey.ui.pointmeasure.measure;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.activity.result.ActivityResultLauncher;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.surveyor.util.dialog.CustomRecycleDialog;
import com.bingce.utils.IntentUtil;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import java.util.ArrayList;
import java.util.List;
public class CodeStylePointLineActivity extends BaseSurveyNewActivity {
private ActivityCodeStylePointLineBinding binding;
private CodeStyleAdapter adapter;
private int codeShapeType = 0;//点、线、面形状类型
private int codeShapeSizeIndex = 0;//尺寸大小index
private int codeShapeColor = 0;//颜色
private int codeStyleIndex = 0;//临时的点线面index
private int codeStyleIndexPoint = 0;//点列表index
private int codeStyleIndexLine = 0;//线列表index
@Override
public View getContentView() {
binding = ActivityCodeStylePointLineBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
setTitle(getString(R.string.style));
}
@Override
protected void initData() {
codeShapeType = IntentUtil.intExtra(getIntent(), CODE_SHAPE_TYPE);
codeShapeColor = IntentUtil.intExtra(getIntent(), CODE_SHAPE_COLOR);
codeShapeSizeIndex = IntentUtil.intExtra(getIntent(), CODE_SHAPE_SIZE);
codeStyleIndexPoint = IntentUtil.intExtra(getIntent(), CODE_STYLE_INDEX_POINT);
codeStyleIndexLine = IntentUtil.intExtra(getIntent(), CODE_STYLE_INDEX_LINE);
List<Integer> list = new ArrayList<>();
List<String> sizeList = new ArrayList<>();
switch (codeShapeType){
case SHAPE_TYPE_POINT:
sizeList.add(getString(R.string.small_size));
sizeList.add(getString(R.string.medium_size));
sizeList.add(getString(R.string.big_size));
list.add(SHAPE_CIRCLE_FULL);
list.add(SHAPE_CIRCLE_EMPTY);
list.add(SHAPE_SQUARE_FULL);
list.add(SHAPE_SQUARE_EMPTY);
list.add(SHAPE_TRIANGLE_UP_FULL);
list.add(SHAPE_TRIANGLE_UP_EMPTY);
list.add(SHAPE_TRIANGLE_DOWN_FULL);
list.add(SHAPE_TRIANGLE_DOWN_EMPTY);
list.add(SHAPE_RHOMBUS_FULL);
list.add(SHAPE_RHOMBUS_EMPTY);
list.add(SHAPE_ROUNDED_FIVE_STAR);
list.add(SHAPE_STRAIGHT_FIVE_STAR);
list.add(SHAPE_CENTER_CIRCLE);
codeStyleIndex = codeStyleIndexPoint;
break;
case SHAPE_TYPE_LINE:
sizeList.add(getString(R.string.thin_size));
sizeList.add(getString(R.string.medium_size));
sizeList.add(getString(R.string.coarse_size));
list.add(0);
list.add(1);
list.add(2);
list.add(3);
codeStyleIndex = codeStyleIndexLine;
break;
}
adapter = new CodeStyleAdapter(CodeStylePointLineActivity.this, codeStyleIndex, list, codeShapeType,codeShapeColor, codeShapeSizeIndex);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(CodeStylePointLineActivity.this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
binding.recyclerView.setLayoutManager(linearLayoutManager);
binding.recyclerView.setAdapter(adapter);
adapter.setOnItemClickListener(new CodeStyleAdapter.OnItemClickListener() {
@Override
public void onItemClickListener(int position) {
switch (codeShapeType){
case SHAPE_TYPE_POINT:
codeStyleIndexPoint = position;
break;
case SHAPE_TYPE_LINE:
codeStyleIndexLine = position;
break;
}
adapter.setSelectedPosition(position);
}
});
binding.tvSize.setText(sizeList.get(codeShapeSizeIndex));
binding.rlSize.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CustomRecycleDialog.showDialog(CodeStylePointLineActivity.this, R.string.choose_instrument_type, sizeList, codeShapeSizeIndex, false, new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
codeShapeSizeIndex = index;
binding.tvSize.setText(sizeList.get(index));
adapter.setShapeSize(list,index);
}
});
}
});
binding.styleCodeBtnConfirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra(ConstUtils.intentConst.keyCodeStyleIndexPoint, codeStyleIndexPoint);
intent.putExtra(ConstUtils.intentConst.keyCodeStyleIndexLine, codeStyleIndexLine);
intent.putExtra(ConstUtils.intentConst.keyCodeShapeSize, codeShapeSizeIndex);
setResult(LauncherEvent.launcher_code_style,intent);
finish();
}
});
}
private static String CODE_SHAPE_TYPE = "codeShapeType";
private static String CODE_SHAPE_COLOR = "codeShapeColor";
private static String CODE_SHAPE_SIZE = "codeShapeSize";
private static String CODE_STYLE_INDEX_POINT = "codeStyleIndexPoint";
private static String CODE_STYLE_INDEX_LINE = "codeStyleIndexLine";
public static void start(ActivityResultLauncher<Intent> launcher, Context context,int codeShapeType, int codeShapeColor,int codeShapeSize,int codeStyleIndexPoint,int codeStyleIndexLine){
Intent intent = new Intent(context, CodeStylePointLineActivity.class);
intent.putExtra(CODE_SHAPE_TYPE,codeShapeType);
intent.putExtra(CODE_SHAPE_COLOR,codeShapeColor);
intent.putExtra(CODE_SHAPE_SIZE,codeShapeSize);
intent.putExtra(CODE_STYLE_INDEX_POINT,codeStyleIndexPoint);
intent.putExtra(CODE_STYLE_INDEX_LINE,codeStyleIndexLine);
launcher.launch(intent);
}
}

@ -0,0 +1,52 @@
package com.project.survey.ui.pointmeasure.measure;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.project.survey.R;
import com.project.survey.databinding.ActivityControlRecordListBinding;
import com.project.survey.model.ControlRecord;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import com.project.survey.ui.pointmeasure.measure.adapter.ControlRecordListAdapter;
import java.io.Serializable;
import java.util.List;
public class ControlRecordListActivity extends BaseSurveyNewActivity {
private ActivityControlRecordListBinding binding;
@Override
public View getContentView() {
binding = ActivityControlRecordListBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
setTitle(getString(R.string.record_list));
}
@Override
protected void initData() {
ControlRecordListAdapter adapter = new ControlRecordListAdapter(ControlRecordListActivity.this, (List<ControlRecord>) getIntent().getSerializableExtra(POINT_INFO));
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ControlRecordListActivity.this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
binding.recyclerView.setLayoutManager(linearLayoutManager);
binding.recyclerView.setAdapter(adapter);
binding.recyclerView.setItemAnimator(new DefaultItemAnimator());
}
private static String POINT_INFO = "control_point_list_info";
public static void start(Context context, List<ControlRecord> pointList){
Intent intent = new Intent(context, ControlRecordListActivity.class);
intent.putExtra(POINT_INFO, (Serializable) pointList);
context.startActivity(intent);
}
}

@ -0,0 +1,107 @@
package com.project.survey.ui.pointmeasure.measure;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.view.View;
import androidx.activity.result.ActivityResultLauncher;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.utils.IntentUtil;
import com.project.survey.R;
import com.project.survey.databinding.ActivityPickerColorBinding;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import com.project.survey.ui.instrument.setupstation.LauncherEvent;
import com.project.survey.util.DrawableUtils;
import com.shixia.colorpickerview.OnColorChangeListener;
public class PickerColorActivity extends BaseSurveyNewActivity {
private ActivityPickerColorBinding binding;
private int selectColor;
@Override
public View getContentView() {
binding = ActivityPickerColorBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
setTitle(getString(R.string.picker_color));
binding.pickerCodeBtnConfirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra(ConstUtils.intentConst.keyAddCodeColor, selectColor);
setResult(LauncherEvent.launcher_add_code_color,intent);
finish();
}
});
int defultColor = IntentUtil.intExtra(getIntent(), DEFULT_COLOR);
selectColor = defultColor;
binding.ivCodeColorPalette.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(R.drawable.icon_code_color_palette),defultColor));
binding.cpvColor.setOnColorChangeListener(new OnColorChangeListener() {
@Override
public void colorChanged(int color) {
selectColor = color;
binding.ivCodeColorPalette.setImageDrawable(DrawableUtils.tintModifyColorDrawable(getDrawable(R.drawable.icon_code_color_palette),color));
binding.tvColorRgb.setText("R:" + Color.red(color) + " G:" + Color.green(color) + " B:" + Color.blue(color));
binding.tvColorXml.setText(toHexEncoding(color,false));
binding.tvColorXml16.setText(toHexEncoding(color,true));
binding.tvColorRgb.setTextColor(color);
binding.tvColorXml.setTextColor(color);
binding.tvColorXml16.setTextColor(color);
}
});
}
/**
* 获取十进制和十六进制色值
* @param color
* @param isXml16 是否获取16进制
* @return
*/
public static String toHexEncoding(int color,boolean isXml16) {
String A, R, G, B;
StringBuilder sb = new StringBuilder();
A = Integer.toHexString(Color.alpha(color));
R = Integer.toHexString(Color.red(color));
G = Integer.toHexString(Color.green(color));
B = Integer.toHexString(Color.blue(color));
//判断获取到的A,R,G,B值的长度 如果长度等于1 给A,R,G,B值的前边添0
A = A.length() == 1 ? "0" + A : A;
R = R.length() == 1 ? "0" + R : R;
G = G.length() == 1 ? "0" + G : G;
B = B.length() == 1 ? "0" + B : B;
sb.append("#");
if (isXml16){
sb.append(A);
}
sb.append(R);
sb.append(G);
sb.append(B);
return sb.toString();
}
@Override
protected void initData() {
}
private static String DEFULT_COLOR = "defultColor";
public static void start(ActivityResultLauncher<Intent> launcher,Context context,int defultColor){
Intent intent = new Intent(context, PickerColorActivity.class);
intent.putExtra(DEFULT_COLOR,defultColor);
launcher.launch(intent);
}
}

@ -7,6 +7,7 @@ import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_DX;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_KS;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_KZ;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_LX;
import static com.project.survey.util.DrawableUtils.RADIUS_TOP;
import android.annotation.SuppressLint;
import android.app.Activity;
@ -57,32 +58,41 @@ import com.bingce.device.util.DeviceUtils;
import com.bingce.error.BingCeErrorCode;
import com.bingce.rtk.gnss.Gnss;
import com.bingce.rtk.model.GnssPosition;
import com.bingce.surveyor.agentweb.HelpWebActivity;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.surveyor.util.DeviceConnectUtil;
import com.bingce.surveyor.util.PreferencesUtil;
import com.bingce.surveyor.util.SurveyRemarksUtils;
import com.bingce.surveyor.util.SurveyToolBarClickListenerUtils;
import com.bingce.surveyor.util.SurveyUIUtils;
import com.bingce.surveyor.util.dialog.CustomDialog;
import com.bingce.surveyor.util.dialog.CustomRecycleDialog;
import com.bingce.totalstation.TsConfig;
import com.bingce.utils.ColorUtil;
import com.bingce.utils.IntentUtil;
import com.bingce.utils.PointUtils;
import com.bingce.utils.SoundPoolUtil;
import com.bingce.utils.ThreadPoolUtil;
import com.bingce.utils.Util;
import com.project.survey.App;
import com.project.survey.R;
import com.project.survey.databinding.ActivityPointSurveyNewBinding;
import com.project.survey.dialog.CustomLineChartDialog;
import com.project.survey.model.ControlRecord;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import com.project.survey.ui.instrument.setupstation.CoordinatePointsLibraryActivity;
import com.project.survey.ui.instrument.setupstation.LauncherEvent;
import com.project.survey.ui.pointmeasure.measure.util.SFUtils;
import com.project.survey.ui.pointmeasure.measure.util.SurveyToolBarClickListenerUtils;
import com.project.survey.util.CommonUtils;
import com.project.survey.util.DrawableUtils;
import com.project.survey.util.SurveyUIUtils;
import com.project.survey.widget.bingce.dragdrop.DefaultItemCallback;
import com.project.survey.widget.bingce.dragdrop.DefaultItemTouchHelper;
import com.project.survey.widget.bingce.dragdrop.FunctionAdapter;
import com.project.survey.widget.bingce.dragdrop.FunctionBlockAdapter;
import com.project.survey.widget.bingce.dragdrop.FunctionItem;
import com.project.survey.widget.bingce.dragdrop.FunctionItemID;
import com.project.survey.widget.bingce.dragdrop.SpaceItemDecoration;
import com.project.survey.widget.bingce.gaode.GaoDeBottomSheetBehavior;
import java.util.ArrayList;
import java.util.List;
@ -90,9 +100,11 @@ import java.util.Objects;
import blankj.utilcode.util.ToastUtils;
import blankj.utilcode.util.Utils;
import cn.liuyanbing.surveyor.model.base.BasePoint;
import lecho.hellocharts.model.Line;
import lecho.hellocharts.model.LineChartData;
import lecho.hellocharts.model.PointValue;
import lecho.hellocharts.renderer.LineChartRenderer;
public class PointSurveyNewActivity extends BaseSurveyNewActivity implements View.OnClickListener {
@ -136,7 +148,6 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
@SuppressLint("SetTextI18n")
@Override
protected void initView() {
if (((App) Utils.getApp()).isThemeDark) {
binding.topLayout.setBackgroundColor(getResources().getColor(R.color.theme_dark_black));
binding.layoutPoleHrHeight.tvPoleHrHeight.setTextColor(getColor(R.color.white));
@ -521,17 +532,17 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
}
//formatDouble2Double防止四舍五入误差
if (Util.formatDouble2Double(gnssPosition.getHrms(), ((App) Utils.getApp()).notNumber()) > rtkHrmsLimitValue) {
if (Util.formatDouble2Double(gnssPosition.getHrms(), 6) > rtkHrmsLimitValue) {
indexNum = indexNum + 1;
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("HRMS ≤ ").append(rtkHrmsLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getHrms(), ((App) Utils.getApp()).notNumber()));
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("HRMS ≤ ").append(rtkHrmsLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getHrms(), 6));
}
if (Util.formatDouble2Double(gnssPosition.getVrms(), ((App) Utils.getApp()).notNumber()) > rtkVrmsLimitValue) {
if (Util.formatDouble2Double(gnssPosition.getVrms(), 6) > rtkVrmsLimitValue) {
indexNum = indexNum + 1;
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("VRMS ≤ ").append(rtkVrmsLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getVrms(), ((App) Utils.getApp()).notNumber()));
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("VRMS ≤ ").append(rtkVrmsLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getVrms(), 6));
}
if (Util.formatDouble2Double(gnssPosition.getPdop(), ((App) Utils.getApp()).notNumber()) > rtkPdopLimitValue) {
if (Util.formatDouble2Double(gnssPosition.getPdop(), 6) > rtkPdopLimitValue) {
indexNum = indexNum + 1;
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("PDOP ≤ ").append(rtkPdopLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getPdop(), ((App) Utils.getApp()).notNumber()));
stringBuilder.append("\n").append(indexNum).append(".").append(getString(R.string.limiting_conditions)).append(getString(R.string.colon)).append("PDOP ≤ ").append(rtkPdopLimitValue).append(",").append(getString(R.string.current)).append(getString(R.string.colon)).append(Util.formatDouble2Double(gnssPosition.getPdop(), 6));
}
if (gnssPosition.getDiffAge() > rtkDiffAgeLimitValue) {
indexNum = indexNum + 1;
@ -877,17 +888,17 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
switch (Integer.parseInt(id)) {
case FunctionItemID.POINT_SURVEY_ID.SURVEY_X_ID:
if (coordinate != null) {
info = Util.formatDouble2String(coordinate.getX(), ((App) Utils.getApp()).notNumber());
info = Util.formatDouble2String(coordinate.getX(), 6);
}
break;
case FunctionItemID.POINT_SURVEY_ID.SURVEY_Y_ID:
if (coordinate != null) {
info = Util.formatDouble2String(coordinate.getY(), ((App) Utils.getApp()).notNumber());
info = Util.formatDouble2String(coordinate.getY(), 6);
}
break;
case FunctionItemID.POINT_SURVEY_ID.SURVEY_Z_ID:
if (coordinate != null) {
info = Util.formatDouble2String(coordinate.getZ(), ((App) Utils.getApp()).notNumber());
info = Util.formatDouble2String(coordinate.getZ(), 6);
}
break;
case FunctionItemID.POINT_SURVEY_ID.SURVEY_LAT_ID:
@ -906,7 +917,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
break;
case FunctionItemID.POINT_SURVEY_ID.SURVEY_ALT_ID:
if (blh != null) {
info = Util.formatDouble2String(blh.getAltitude(), ((App) Utils.getApp()).notNumber()) + "m";
info = Util.formatDouble2String(blh.getAltitude(), 6) + "m";
} else {
info = "*";
}
@ -920,7 +931,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
break;
case FunctionItemID.POINT_SURVEY_ID.SURVEY_SIT_DISTANCE_ID:
if (GnssPosition.getInstance().getBaseInfo().isReceivedBase()) {
info = CoordUtil.formatDouble2String(GnssPosition.getInstance().baseInfo.getDistanceToBase(), ((App) Utils.getApp()).notNumber()) + "m";
info = CoordUtil.formatDouble2String(GnssPosition.getInstance().baseInfo.getDistanceToBase(), 6) + "m";
} else {
info = getString(R.string.base_info_not_received);
}
@ -933,7 +944,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
double distance = PointUtils.getDistance2D(new BasePoint(coordinate.getX(), coordinate.getY()), new BasePoint(lastRTKBackSurveyPoint.getX(), lastRTKBackSurveyPoint.getY()));
double currdTime = System.currentTimeMillis();
double time = (currdTime - lastTimeStamp) / 1000;
info = Util.formatDouble2String(distance / time, ((App) Utils.getApp()).notNumber());
info = Util.formatDouble2String(distance / time, 6);
}
}
break;
@ -943,7 +954,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
} else {
if (coordinate != null) {
float mTargetAzimuth = (float) Math.toDegrees(PointUtils.getDirectionDegrees(new BasePoint(coordinate.getX(), coordinate.getY()), new BasePoint(lastRTKBackSurveyPoint.getX(), lastRTKBackSurveyPoint.getY())));
info = Util.radianToDmsString(Math.toRadians(mTargetAzimuth), ((App) Utils.getApp()).notNumber(), true);
info = Util.radianToDmsString(Math.toRadians(mTargetAzimuth), 6, true);
}
}
break;
@ -952,7 +963,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
if (coordinate != null) {
PointRecord pointSurveyData = surveyBaseRecordPointList.get(surveyBaseRecordPointList.size() - 1);
double distance2D = PointUtils.getDistance2D(new BasePoint(pointSurveyData.x, pointSurveyData.y), new BasePoint(coordinate.getX(), coordinate.getY()));
info = Util.formatDouble2String(distance2D, ((App) Utils.getApp()).notNumber()) + "m";
info = Util.formatDouble2String(distance2D, 6) + "m";
}
} else {
info = "*";
@ -963,7 +974,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
if (coordinate != null) {
PointRecord pointSurveyData = surveyBaseRecordPointList.get(surveyBaseRecordPointList.size() - 1);
double distance3D = PointUtils.getDistance3D(new BasePoint(pointSurveyData.x, pointSurveyData.y, pointSurveyData.h), new BasePoint(coordinate.getX(), coordinate.getY(), coordinate.getZ()));
info = Util.formatDouble2String(distance3D, ((App) Utils.getApp()).notNumber()) + "m";
info = Util.formatDouble2String(distance3D, 6) + "m";
}
} else {
info = "*";
@ -989,7 +1000,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
}
}
}
return Util.formatDouble2Double(total_distance_2d, ((App) Utils.getApp()).notNumber());
return Util.formatDouble2Double(total_distance_2d, 6);
}
private double getAccumulat3D() {
@ -1002,7 +1013,7 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
}
}
}
return Util.formatDouble2Double(total_distance_3d, ((App) Utils.getApp()).notNumber());
return Util.formatDouble2Double(total_distance_3d, 6);
}
/**
@ -1027,7 +1038,6 @@ public class PointSurveyNewActivity extends BaseSurveyNewActivity implements Vie
if (result.getData() == null) {
return;
}
;
String applyCodeId = result.getData().getStringExtra(ConstUtils.intentConst.keyApplyIndexCodeRecord);
getCodeDb(applyCodeId);
break;

@ -0,0 +1,559 @@
package com.project.survey.ui.pointmeasure.measure;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_DX;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_KS;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_KZ;
import static com.bingce.surveyor.util.ConstUtils.pointConst.POINT_TYPE_LX;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.CompoundButton;
import com.bingce.device.Device;
import com.bingce.device.enums.DeviceTypeEnum;
import com.bingce.surveyor.util.ConstUtils;
import com.bingce.surveyor.util.PreferencesUtil;
import com.bingce.surveyor.util.dialog.CustomRecycleDialog;
import com.bingce.utils.IntentUtil;
import com.bingce.utils.Util;
import com.project.survey.R;
import com.project.survey.databinding.ActivityPointSurveySettingBinding;
import com.project.survey.ui.base.BaseSurveyNewActivity;
import java.util.ArrayList;
import java.util.List;
public class PointSurveySettingActivity extends BaseSurveyNewActivity {
private ActivityPointSurveySettingBinding binding;
private int limitHrmsIndex = -1;
private int limitVrmsIndex = -1;
private int limitPdopIndex = -1;
private int limitAgeIndex = -1;
private int limitAddStepNameIndex = -1;
private int limitSmoothPointNumberIndex = -1;
private int limitSmoothPointNumberIndexDx = -1;
private int limitContinueTimeIntervalIndex = -1;
private int limitContinueDistanceIntervalIndex = -1;
private int pointType;
private String pointTypeName;
private int limitStatusIndex;
private float limitHrmsValue,limitVrmsValue,pdopLimitValue,ageLimitValue;
@Override
public View getContentView() {
binding = ActivityPointSurveySettingBinding.inflate(getLayoutInflater());
return binding.getRoot();
}
@Override
protected void initView() {
pointType = IntentUtil.intExtra(getIntent(),POINT_TYPE);
}
@Override
protected void initData() {
boolean isOnlyCommLimit = IntentUtil.boolExtra(getIntent(), IS_ONLY_COMM_LIMIT);
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
setTitle(getString(R.string.ts_survey_setting));
if (isOnlyCommLimit) {
binding.llLayoutSetting.setVisibility(View.GONE);
} else {
binding.rlStatusLimit.setVisibility(View.GONE);
binding.llHvpd.setVisibility(View.GONE);
binding.rlSmoothPointNumberLimit.setVisibility(View.GONE);
binding.rlContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.rlContinueSurveyDistanceInterval.setVisibility(View.GONE);
binding.lineSmoothPointNumber.setVisibility(View.GONE);
binding.lineContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.lineContinueSurveyDistanceInterval.setVisibility(View.GONE);
}
} else {
if (pointType == POINT_TYPE_DX){
pointTypeName = getString(R.string.topographic_point);
binding.rlSmoothPointNumberLimit.setVisibility(View.VISIBLE);
binding.rlContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.rlContinueSurveyDistanceInterval.setVisibility(View.GONE);
binding.lineSmoothPointNumber.setVisibility(View.VISIBLE);
binding.lineContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.lineContinueSurveyDistanceInterval.setVisibility(View.GONE);
} else if (pointType == POINT_TYPE_KS) {
pointTypeName = getString(R.string.quick_point);
if (isOnlyCommLimit) {
binding.llSpecialtySetting.setVisibility(View.GONE);
} else {
binding.rlSmoothPointNumberLimit.setVisibility(View.GONE);
binding.rlContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.rlContinueSurveyDistanceInterval.setVisibility(View.GONE);
binding.lineSmoothPointNumber.setVisibility(View.GONE);
binding.lineContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.lineContinueSurveyDistanceInterval.setVisibility(View.GONE);
}
}else if (pointType == POINT_TYPE_KZ){
if (isOnlyCommLimit) {
binding.llSpecialtySetting.setVisibility(View.GONE);
} else {
pointTypeName = getString(R.string.control_point);
binding.rlSmoothPointNumberLimit.setVisibility(View.VISIBLE);
binding.rlContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.rlContinueSurveyDistanceInterval.setVisibility(View.GONE);
binding.lineSmoothPointNumber.setVisibility(View.VISIBLE);
binding.lineContinueSurveyTimeInterval.setVisibility(View.GONE);
binding.lineContinueSurveyDistanceInterval.setVisibility(View.GONE);
}
}else if (pointType == POINT_TYPE_LX){
if (isOnlyCommLimit) {
binding.llSpecialtySetting.setVisibility(View.GONE);
} else {
pointTypeName = getString(R.string.continuity_point);
binding.rlSmoothPointNumberLimit.setVisibility(View.GONE);
binding.rlContinueSurveyTimeInterval.setVisibility(View.VISIBLE);
binding.rlContinueSurveyDistanceInterval.setVisibility(View.VISIBLE);
binding.lineSmoothPointNumber.setVisibility(View.GONE);
binding.lineContinueSurveyTimeInterval.setVisibility(View.VISIBLE);
binding.lineContinueSurveyDistanceInterval.setVisibility(View.VISIBLE);
}
}
setTitle(getString(R.string.rtk_survey) + " - " + pointTypeName + getString(R.string.settings));
}
limitStatus();
limitHrms();
limitVrms();
limitPdop();
limitAge();
allowRepeatName();
limitAddStepName();
if (pointType == POINT_TYPE_KZ){
limitSmoothPointNumberKZ();
}else if (pointType == POINT_TYPE_DX){
limitSmoothPointNumberDX();
}
limitContinueTimeInterval();
limitContinueDistanceInterval();
}
/**
* 状态解
*/
private void limitStatus() {
List<String> limitStatusList = new ArrayList<>();
limitStatusList.add(getString(R.string.rtk_state_fixed));
limitStatusList.add(getString(R.string.rtk_state_diff_3D));
limitStatusList.add(getString(R.string.rtk_state_float));
limitStatusList.add(getString(R.string.rtk_state_single));
if (pointType == POINT_TYPE_DX){
limitStatusIndex = PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkStatusLimitTopographicPointIndex,0);
} else if (pointType == POINT_TYPE_KS) {
limitStatusIndex = PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkStatusLimitQuickPointIndex,0);
}else if (pointType == POINT_TYPE_KZ){
limitStatusIndex = PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkStatusLimitControlPointIndex,0);
}else if (pointType == POINT_TYPE_LX){
limitStatusIndex = PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkStatusLimitContinuityPointIndex,0);
}
binding.tvStatusLimit.setText(limitStatusList.get(limitStatusIndex));
binding.rlStatusLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.solution_status_limit, limitStatusList, limitStatusIndex, false, (index, itemString) -> {
limitStatusIndex = index;
binding.tvStatusLimit.setText(limitStatusList.get(index));
if (pointType == POINT_TYPE_DX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkStatusLimitTopographicPointIndex, index);
} else if (pointType == POINT_TYPE_KS) {
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkStatusLimitQuickPointIndex, index);
}else if (pointType == POINT_TYPE_KZ){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkStatusLimitControlPointIndex, index);
}else if (pointType == POINT_TYPE_LX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkStatusLimitContinuityPointIndex, index);
}
}));
}
/**
* Hrms
*/
@SuppressLint("SetTextI18n")
private void limitHrms() {
List<String> limitHrmsList = new ArrayList<>();
limitHrmsList.add("0.05");
limitHrmsList.add("0.10");
limitHrmsList.add("0.20");
limitHrmsList.add("0.30");
if (pointType == POINT_TYPE_DX){
limitHrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkHrmsLimitTopographicPointValue,0.05f);
} else if (pointType == POINT_TYPE_KS) {
limitHrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkHrmsLimitQuickPointValue,0.20f);
}else if (pointType == POINT_TYPE_KZ){
limitHrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkHrmsLimitControlPointValue,0.05f);
}else if (pointType == POINT_TYPE_LX){
limitHrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkHrmsLimitContinuityPointIValue,0.05f);
}
for (int i = 0; i < limitHrmsList.size(); i++) {
if (limitHrmsValue == Float.parseFloat(limitHrmsList.get(i))){
limitHrmsIndex = i;
}
}
binding.tvHrmsLimit.setText(limitHrmsValue + getString(R.string.meter));
binding.rlHrmsLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.hrms_limit, limitHrmsList, limitHrmsIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL,true, Util.formatDouble2StringDotAuto(limitHrmsValue), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
limitHrmsIndex = index;
if (index != -1){
binding.tvHrmsLimit.setText(limitHrmsList.get(index) + getString(R.string.meter));
limitHrmsValue = Float.parseFloat(limitHrmsList.get(index));
}else {
binding.tvHrmsLimit.setText(itemString + getString(R.string.meter));
limitHrmsValue = Float.parseFloat(itemString);
}
if (pointType == POINT_TYPE_DX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkHrmsLimitTopographicPointValue, limitHrmsValue);
} else if (pointType == POINT_TYPE_KS) {
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkHrmsLimitQuickPointValue, limitHrmsValue);
}else if (pointType == POINT_TYPE_KZ){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkHrmsLimitControlPointValue, limitHrmsValue);
}else if (pointType == POINT_TYPE_LX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkHrmsLimitContinuityPointIValue, limitHrmsValue);
}
}
}));
}
/**
* Vrms
*/
@SuppressLint("SetTextI18n")
private void limitVrms() {
List<String> limitVrmsList = new ArrayList<>();
limitVrmsList.add("0.05");
limitVrmsList.add("0.10");
limitVrmsList.add("0.20");
limitVrmsList.add("0.30");
if (pointType == POINT_TYPE_DX){
limitVrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkVrmsLimitTopographicPointValue,0.10f);
} else if (pointType == POINT_TYPE_KS) {
limitVrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkVrmsLimitQuickPointValue,0.30f);
}else if (pointType == POINT_TYPE_KZ){
limitVrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkVrmsLimitControlPointValue,0.10f);
}else if (pointType == POINT_TYPE_LX){
limitVrmsValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkVrmsLimitContinuityPointIValue,0.10f);
}
for (int i = 0; i < limitVrmsList.size(); i++) {
if (limitVrmsValue == Float.parseFloat(limitVrmsList.get(i))){
limitVrmsIndex = i;
}
}
binding.tvVrmsLimit.setText(limitVrmsValue + getString(R.string.meter));
binding.rlVrmsLimit.setOnClickListener(new View.OnClickListener() {
@SuppressLint("SetTextI18n")
@Override
public void onClick(View view) {
CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.vrms_limit, limitVrmsList, limitVrmsIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL,true,Util.formatDouble2StringDotAuto(limitVrmsValue), (index, itemString) -> {
limitVrmsIndex = index;
if (index != -1){
binding.tvVrmsLimit.setText(limitVrmsList.get(index) + getString(R.string.meter));
limitVrmsValue = Float.parseFloat(limitVrmsList.get(index));
}else {
binding.tvVrmsLimit.setText(itemString + getString(R.string.meter));
limitVrmsValue = Float.parseFloat(itemString);
}
if (pointType == POINT_TYPE_DX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkVrmsLimitTopographicPointValue, limitVrmsValue);
} else if (pointType == POINT_TYPE_KS) {
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkVrmsLimitQuickPointValue, limitVrmsValue);
}else if (pointType == POINT_TYPE_KZ){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkVrmsLimitControlPointValue, limitVrmsValue);
}else if (pointType == POINT_TYPE_LX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkVrmsLimitContinuityPointIValue, limitVrmsValue);
}
});
}
});
}
/**
* Pdop
*/
private void limitPdop() {
List<String> limitPdopList = new ArrayList<>();
limitPdopList.add("5.00");
limitPdopList.add("20.00");
limitPdopList.add("50.00");
limitPdopList.add("100.00");
if (pointType == POINT_TYPE_DX){
pdopLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkPdopLimitTopographicPointValue,5f);
} else if (pointType == POINT_TYPE_KS) {
pdopLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkPdopLimitQuickPointValue,5f);
}else if (pointType == POINT_TYPE_KZ){
pdopLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkPdopLimitControlPointValue,5f);
}else if (pointType == POINT_TYPE_LX){
pdopLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkPdopLimitContinuityPointIValue,5f);
}
for (int i = 0; i < limitPdopList.size(); i++) {
if (pdopLimitValue == Float.parseFloat(limitPdopList.get(i))){
limitPdopIndex = i;
}
}
binding.tvPdopLimit.setText(Util.formatDouble2StringDotAuto(pdopLimitValue));
binding.rlPdopLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.pdop_limit, limitPdopList, limitPdopIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL,true, Util.formatDouble2StringDotAuto(pdopLimitValue), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
limitPdopIndex = index;
if (index != -1){
binding.tvPdopLimit.setText(limitPdopList.get(index));
pdopLimitValue = Float.parseFloat(limitPdopList.get(index));
}else {
binding.tvPdopLimit.setText(itemString);
pdopLimitValue = Float.parseFloat(itemString);
}
if (pointType == POINT_TYPE_DX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkPdopLimitTopographicPointValue, pdopLimitValue);
} else if (pointType == POINT_TYPE_KS) {
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkPdopLimitQuickPointValue, pdopLimitValue);
}else if (pointType == POINT_TYPE_KZ){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkPdopLimitControlPointValue, pdopLimitValue);
}else if (pointType == POINT_TYPE_LX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkPdopLimitContinuityPointIValue, pdopLimitValue);
}
}
}));
}
@SuppressLint("SetTextI18n")
private void limitAge() {
List<String> limitAgeList = new ArrayList<>();
limitAgeList.add("5");
limitAgeList.add("10");
limitAgeList.add("15");
limitAgeList.add("25");
if (pointType == POINT_TYPE_DX){
ageLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkDiffAgeLimitTopographicPointValue,5f);
} else if (pointType == POINT_TYPE_KS) {
ageLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkDiffAgeLimitQuickPointValue,10f);
}else if (pointType == POINT_TYPE_KZ){
ageLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkDiffAgeLimitControlPointValue,5f);
}else if (pointType == POINT_TYPE_LX){
ageLimitValue = PreferencesUtil.getPreferenceFloat(ConstUtils.preferConst.rtkDiffAgeLimitContinuityPointIValue,5f);
}
for (int i = 0; i < limitAgeList.size(); i++) {
if (ageLimitValue == Integer.parseInt(limitAgeList.get(i))){
limitAgeIndex = i;
}
}
binding.tvAgeLimit.setText(Util.formatDouble2StringDotAuto(ageLimitValue) + getString(R.string.sec));
binding.rlAgeLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.diff_age_limit, limitAgeList, limitAgeIndex, CustomRecycleDialog.Builder.INPUT_TYPE_INTEGER,true,Util.formatDouble2StringDotAuto(ageLimitValue), new CustomRecycleDialog.IClickCallback() {
@SuppressLint("SetTextI18n")
@Override
public void onItemSelected(int index, String itemString) {
limitAgeIndex = index;
if (index != -1){
binding.tvAgeLimit.setText(limitAgeList.get(index) + getString(R.string.sec));
ageLimitValue = Integer.parseInt(limitAgeList.get(index));
}else {
binding.tvAgeLimit.setText(itemString + getString(R.string.sec));
ageLimitValue = Integer.parseInt(itemString);
}
if (pointType == POINT_TYPE_DX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkDiffAgeLimitTopographicPointValue, ageLimitValue);
} else if (pointType == POINT_TYPE_KS) {
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkDiffAgeLimitQuickPointValue, ageLimitValue);
}else if (pointType == POINT_TYPE_KZ){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkDiffAgeLimitControlPointValue, ageLimitValue);
}else if (pointType == POINT_TYPE_LX){
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkDiffAgeLimitContinuityPointIValue, ageLimitValue);
}
}
}));
}
private void allowRepeatName() {
binding.switchAllowRepeatName.setChecked(Device.getInstance().rtkAllowRepeatName);
binding.switchAllowRepeatName.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {
Device.getInstance().rtkAllowRepeatName = isChecked;
Util.putPreference(ConstUtils.preferConst.rtkAllowRepeatName, Device.getInstance().rtkAllowRepeatName);
}
});
}
public void limitAddStepName(){
List<String> limitAddStepNameList = new ArrayList<>();
limitAddStepNameList.add("1");
limitAddStepNameList.add("2");
limitAddStepNameList.add("5");
limitAddStepNameList.add("10");
for (int i = 0; i < limitAddStepNameList.size(); i++) {
if (Device.getInstance().rtkPointNameAddStep == Integer.parseInt(limitAddStepNameList.get(i))){
limitAddStepNameIndex = i;
}
}
binding.tvAddStepNameLimit.setText(String.valueOf(Device.getInstance().rtkPointNameAddStep));
binding.rlAddStepNameLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.point_name_add_step, limitAddStepNameList, limitAddStepNameIndex, CustomRecycleDialog.Builder.INPUT_TYPE_INTEGER,true,Util.formatDouble2StringDotAuto(Device.getInstance().rtkPointNameAddStep), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
Device.getInstance().rtkPointNameAddStep = Integer.parseInt(itemString);
limitAddStepNameIndex = index;
if (index != -1){
binding.tvAddStepNameLimit.setText(limitAddStepNameList.get(index));
}else {
binding.tvAddStepNameLimit.setText(itemString);
}
Util.putPreference(ConstUtils.preferConst.rtkPointNameAddStep, Device.getInstance().rtkPointNameAddStep);
}
}));
}
private void limitSmoothPointNumberKZ() {
List<String> limitSmoothPointNumberList = new ArrayList<>();
limitSmoothPointNumberList.add("1");
limitSmoothPointNumberList.add("2");
limitSmoothPointNumberList.add("5");
limitSmoothPointNumberList.add("10");
for (int i = 0; i < limitSmoothPointNumberList.size(); i++) {
if (Device.getInstance().rtkSmoothPointsNumber == Integer.parseInt(limitSmoothPointNumberList.get(i))){
limitSmoothPointNumberIndex = i;
}
}
binding.tvSmoothPointNumberLimit.setText(String.valueOf(Device.getInstance().rtkSmoothPointsNumber));
binding.rlSmoothPointNumberLimit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.smooth_points_number, limitSmoothPointNumberList, limitSmoothPointNumberIndex, CustomRecycleDialog.Builder.INPUT_TYPE_INTEGER,true,Util.formatDouble2StringDotAuto(Device.getInstance().rtkSmoothPointsNumber), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
Device.getInstance().rtkSmoothPointsNumber = Integer.parseInt(itemString);
limitSmoothPointNumberIndex = index;
if (index != -1){
binding.tvSmoothPointNumberLimit.setText(limitSmoothPointNumberList.get(index));
}else {
binding.tvSmoothPointNumberLimit.setText(itemString);
}
Util.putPreference(ConstUtils.preferConst.rtkSmoothPointsNumber, Device.getInstance().rtkSmoothPointsNumber);
}
});
}
});
}
private void limitSmoothPointNumberDX(){
List<String> limitSmoothPointNumberList = new ArrayList<>();
limitSmoothPointNumberList.add("1");
limitSmoothPointNumberList.add("2");
limitSmoothPointNumberList.add("5");
limitSmoothPointNumberList.add("10");
for (int i = 0; i < limitSmoothPointNumberList.size(); i++) {
if (PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkSmoothPointsNumberTopographicPoint,5) == Integer.parseInt(limitSmoothPointNumberList.get(i))){
limitSmoothPointNumberIndexDx = i;
}
}
binding.tvSmoothPointNumberLimit.setText(String.valueOf(PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkSmoothPointsNumberTopographicPoint,5)));
binding.rlSmoothPointNumberLimit.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.smooth_points_number, limitSmoothPointNumberList, limitSmoothPointNumberIndexDx, CustomRecycleDialog.Builder.INPUT_TYPE_INTEGER,true,Util.formatDouble2StringDotAuto(PreferencesUtil.getPreferenceInt(ConstUtils.preferConst.rtkSmoothPointsNumberTopographicPoint,5)), new CustomRecycleDialog.IClickCallback() {
@Override
public void onItemSelected(int index, String itemString) {
limitSmoothPointNumberIndexDx = index;
if (index != -1){
binding.tvSmoothPointNumberLimit.setText(limitSmoothPointNumberList.get(index));
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkSmoothPointsNumberTopographicPoint, Integer.parseInt(limitSmoothPointNumberList.get(index)));
}else {
binding.tvSmoothPointNumberLimit.setText(itemString);
PreferencesUtil.putPreference(ConstUtils.preferConst.rtkSmoothPointsNumberTopographicPoint, Integer.parseInt(itemString));
}
}
}));
}
@SuppressLint("SetTextI18n")
private void limitContinueTimeInterval() {
List<String> limitContinueTimeList = new ArrayList<>();
limitContinueTimeList.add("1");
limitContinueTimeList.add("2");
limitContinueTimeList.add("5");
limitContinueTimeList.add("10");
for (int i = 0; i < limitContinueTimeList.size(); i++) {
if (Device.getInstance().rtkContinueTimeInterval == Integer.parseInt(limitContinueTimeList.get(i))){
limitContinueTimeIntervalIndex = i;
}
}
binding.tvContinueSurveyTimeInterval.setText(Device.getInstance().rtkContinueTimeInterval + getString(R.string.sec));
binding.rlContinueSurveyTimeInterval.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.continuous_survey_time_interval, limitContinueTimeList, limitContinueTimeIntervalIndex, CustomRecycleDialog.Builder.INPUT_TYPE_INTEGER,true,Util.formatDouble2StringDotAuto(Device.getInstance().rtkContinueTimeInterval), new CustomRecycleDialog.IClickCallback() {
@SuppressLint("SetTextI18n")
@Override
public void onItemSelected(int index, String itemString) {
Device.getInstance().rtkContinueTimeInterval = Integer.parseInt(itemString);
limitContinueTimeIntervalIndex = index;
if (index != -1){
binding.tvContinueSurveyTimeInterval.setText(limitContinueTimeList.get(index) + getString(R.string.sec));
}else {
binding.tvContinueSurveyTimeInterval.setText(itemString + getString(R.string.sec));
}
Util.putPreference(ConstUtils.preferConst.rtkContinueTimeInterval, Device.getInstance().rtkContinueTimeInterval);
}
}));
}
@SuppressLint("SetTextI18n")
private void limitContinueDistanceInterval() {
List<String> limitContinueDistanceList = new ArrayList<>();
limitContinueDistanceList.add("1.00");
limitContinueDistanceList.add("2.00");
limitContinueDistanceList.add("10.00");
limitContinueDistanceList.add("50.00");
for (int i = 0; i < limitContinueDistanceList.size(); i++) {
if (Device.getInstance().rtkContinueDistanceInterval == Double.parseDouble(limitContinueDistanceList.get(i))){
limitContinueDistanceIntervalIndex = i;
}
}
binding.tvContinueSurveyDistanceInterval.setText(Device.getInstance().rtkContinueDistanceInterval + getString(R.string.meter));
binding.rlContinueSurveyDistanceInterval.setOnClickListener(view -> CustomRecycleDialog.showDialog(PointSurveySettingActivity.this, R.string.continuous_survey_distance_interval, limitContinueDistanceList, limitContinueDistanceIntervalIndex, CustomRecycleDialog.Builder.INPUT_TYPE_DECIMAL,true,Util.formatDouble2StringDotAuto(Device.getInstance().rtkContinueDistanceInterval), new CustomRecycleDialog.IClickCallback() {
@SuppressLint("SetTextI18n")
@Override
public void onItemSelected(int index, String itemString) {
Device.getInstance().rtkContinueDistanceInterval = Float.parseFloat(itemString);
limitContinueDistanceIntervalIndex = index;
if (index != -1){
binding.tvContinueSurveyDistanceInterval.setText(limitContinueDistanceList.get(index) + getString(R.string.meter));
}else {
binding.tvContinueSurveyDistanceInterval.setText(itemString + getString(R.string.meter));
}
Util.putPreference(ConstUtils.preferConst.rtkContinueDistanceInterval, Device.getInstance().rtkContinueDistanceInterval);
}
}));
}
private static final String POINT_TYPE = "pointType";
private static final String IS_ONLY_COMM_LIMIT = "isOnlyCommLimit";
public static void start(Context context) {
start(context, POINT_TYPE_KS, false);
}
public static void start(Context context, int pointType) {
start(context, pointType, false);
}
/**
* @param isOnlyCommLimit 是否只显示常规限制状态限制hrms限制vrms限制pdop限制延迟限制 默认为false
*/
public static void start(Context context, boolean isOnlyCommLimit){
start(context, POINT_TYPE_KS, isOnlyCommLimit);
}
public static void start(Context context, int pointType, boolean isOnlyCommLimit){
Intent intent = new Intent(context,PointSurveySettingActivity.class);
intent.putExtra(POINT_TYPE,pointType);
intent.putExtra(IS_ONLY_COMM_LIMIT,isOnlyCommLimit);
context.startActivity(intent);
}
}

@ -0,0 +1,136 @@
package com.project.survey.ui.pointmeasure.measure.adapter;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_LINE;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_POINT;
import static com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils.SHAPE_TYPE_SURFACE;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bingce.data.surveyor.surveydata.code.CodeRecord;
import com.project.survey.R;
import com.project.survey.ui.pointmeasure.measure.util.CodeConsUtils;
import com.project.survey.util.CommonUtils;
import com.project.survey.util.DrawableUtils;
import java.util.List;
public class CodeLibraryAdapter extends RecyclerView.Adapter<CodeLibraryAdapter.ViewHolder> {
private Context context;
private List<CodeRecord> codeRecordList;
private int selectPosition;
private OnItemClickListener mOnItemClickListener;
public CodeLibraryAdapter(Context context, List<CodeRecord> codeRecordList, int defaultPosition) {
this.context = context;
this.codeRecordList = codeRecordList;
this.selectPosition = defaultPosition;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ViewHolder holder = new ViewHolder(LayoutInflater.from(
context).inflate(R.layout.layout_code_library_item, parent,
false));
return holder;
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.tv_code_name.setText(codeRecordList.get(position).codeName);
holder.tv_code.setText("[" + codeRecordList.get(position).code + "]");
switch (codeRecordList.get(position).codeGroupType) {
case SHAPE_TYPE_POINT:
holder.poinView.setVisibility(View.VISIBLE);
holder.lineView.setVisibility(View.GONE);
holder.faceView.setVisibility(View.GONE);
holder.poinView.setImageDrawable(DrawableUtils.tintModifyColorDrawable(context.getDrawable(CodeConsUtils.showPointIcon(codeRecordList.get(position).codeFeatureShape)), codeRecordList.get(position).colorShape));
break;
case SHAPE_TYPE_LINE:
holder.poinView.setVisibility(View.GONE);
holder.lineView.setVisibility(View.VISIBLE);
holder.faceView.setVisibility(View.GONE);
GradientDrawable gdLine = (GradientDrawable) holder.lineView.getBackground();
gdLine.setStroke(CommonUtils.dip2px(1f), codeRecordList.get(position).colorShape, CommonUtils.dip2px(codeRecordList.get(position).codeFeatureShape + codeRecordList.get(position).codeFeatureShape * 2), CommonUtils.dip2px(codeRecordList.get(position).codeFeatureShape + codeRecordList.get(position).codeFeatureShape * 2));
break;
case SHAPE_TYPE_SURFACE:
holder.poinView.setVisibility(View.GONE);
holder.lineView.setVisibility(View.GONE);
holder.faceView.setVisibility(View.VISIBLE);
GradientDrawable gdFace = (GradientDrawable) holder.faceView.getBackground();
gdFace.setStroke(CommonUtils.dip2px(1f), codeRecordList.get(position).codeColorContour);
gdFace.setColor(codeRecordList.get(position).colorShape);
break;
}
if (selectPosition == position) {
holder.iv_checkbox.setImageResource(R.mipmap.icon_checkbox_select_ovel);
holder.tv_code_name.setTextColor(context.getColor(R.color.theme_green));
holder.tv_code.setTextColor(context.getColor(R.color.theme_green));
} else {
holder.tv_code_name.setTextColor(context.getColor(R.color.color_575757));
holder.tv_code.setTextColor(context.getColor(R.color.color_999999));
holder.iv_checkbox.setImageResource(R.mipmap.icon_checkbox_unselect_ovel);
}
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOnItemClickListener.onItemClickListener(holder.getAdapterPosition());
}
});
}
public void setData(List<CodeRecord> data) {
this.codeRecordList = data;
notifyDataSetChanged();
}
public void setSelectedPosition(int defaultPosition) {
this.selectPosition = defaultPosition;
notifyDataSetChanged();
}
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
this.mOnItemClickListener = onItemClickListener;
}
public interface OnItemClickListener {
void onItemClickListener(int position);
}
@Override
public int getItemCount() {
return codeRecordList == null ? 0 : codeRecordList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
ImageView poinView, iv_checkbox;
View lineView;
TextView faceView, tv_code_name, tv_code;
RelativeLayout rl_item_view;
public ViewHolder(@NonNull View itemView) {
super(itemView);
rl_item_view = itemView.findViewById(R.id.rl_item_view);
poinView = itemView.findViewById(R.id.poinView);
lineView = itemView.findViewById(R.id.lineView);
faceView = itemView.findViewById(R.id.faceView);
tv_code_name = itemView.findViewById(R.id.tv_code_name);
tv_code = itemView.findViewById(R.id.tv_code);
iv_checkbox = itemView.findViewById(R.id.iv_checkbox);
}
}
}

@ -0,0 +1,68 @@
package com.project.survey.ui.pointmeasure.measure.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bingce.utils.Util;
import com.project.survey.R;
import com.project.survey.model.ControlRecord;
import java.util.List;
public class ControlRecordListAdapter extends RecyclerView.Adapter<ControlRecordListAdapter.ViewHolder> {
private Context mContext;
private List<ControlRecord> list;
public ControlRecordListAdapter(Context context, List<ControlRecord> list) {
this.mContext = context;
this.list = list;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.layout_control_record_item, parent, false));
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.tv_point_name.setText(list.get(position).getPointName());
if (position == 0) {
holder.tv_prompt.setText(mContext.getString(R.string.average_coordinates_calculation_way));
}
holder.tv_x.setText("X:" + Util.formatDouble2String(list.get(position).getX(), 6));
holder.tv_y.setText("Y:" + Util.formatDouble2String(list.get(position).getY(), 6));
holder.tv_z.setText("Z:" + Util.formatDouble2String(list.get(position).getZ(), 6));
holder.tv_latitude.setText(mContext.getString(R.string.latitude) + ":" + Util.formatDouble2String(list.get(position).getLatitude(), 6));
holder.tv_longitude.setText(mContext.getString(R.string.longitude) + ":" + Util.formatDouble2String(list.get(position).getLongitude(), 6));
holder.tv_altitude.setText(mContext.getString(R.string.altitude) + ":" + Util.formatDouble2String(list.get(position).getAltitude(), 6));
}
@Override
public int getItemCount() {
return list == null ? 0 : list.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView tv_x, tv_y, tv_z, tv_latitude, tv_longitude, tv_altitude, tv_point_name, tv_prompt;
public ViewHolder(@NonNull View itemView) {
super(itemView);
tv_x = itemView.findViewById(R.id.tv_x);
tv_y = itemView.findViewById(R.id.tv_y);
tv_z = itemView.findViewById(R.id.tv_z);
tv_latitude = itemView.findViewById(R.id.tv_latitude);
tv_longitude = itemView.findViewById(R.id.tv_longitude);
tv_altitude = itemView.findViewById(R.id.tv_altitude);
tv_point_name = itemView.findViewById(R.id.tv_point_name);
tv_prompt = itemView.findViewById(R.id.tv_prompt);
}
}
}

@ -0,0 +1,72 @@
package com.project.survey.ui.pointmeasure.measure.util;
import com.project.survey.R;
public class CodeConsUtils {
public final static int SHAPE_CIRCLE_FULL = 0;
public final static int SHAPE_CIRCLE_EMPTY = SHAPE_CIRCLE_FULL + 1;
public final static int SHAPE_SQUARE_FULL = SHAPE_CIRCLE_EMPTY + 1;
public final static int SHAPE_SQUARE_EMPTY = SHAPE_SQUARE_FULL + 1;
public final static int SHAPE_TRIANGLE_UP_FULL = SHAPE_SQUARE_EMPTY + 1;
public final static int SHAPE_TRIANGLE_UP_EMPTY = SHAPE_TRIANGLE_UP_FULL + 1;
public final static int SHAPE_TRIANGLE_DOWN_FULL = SHAPE_TRIANGLE_UP_EMPTY + 1;
public final static int SHAPE_TRIANGLE_DOWN_EMPTY = SHAPE_TRIANGLE_DOWN_FULL + 1;
public final static int SHAPE_RHOMBUS_FULL = SHAPE_TRIANGLE_DOWN_EMPTY + 1;
public final static int SHAPE_RHOMBUS_EMPTY = SHAPE_RHOMBUS_FULL + 1;
public final static int SHAPE_ROUNDED_FIVE_STAR = SHAPE_RHOMBUS_EMPTY + 1;
public final static int SHAPE_STRAIGHT_FIVE_STAR = SHAPE_ROUNDED_FIVE_STAR + 1;
public final static int SHAPE_CENTER_CIRCLE = SHAPE_STRAIGHT_FIVE_STAR + 1;
public static int showPointIcon(int index){
int showIcon = SHAPE_CIRCLE_FULL;
switch (index){
case SHAPE_CIRCLE_FULL:
showIcon = R.drawable.icon_code_circle_full;
break;
case SHAPE_CIRCLE_EMPTY:
showIcon = R.drawable.icon_code_circle_empty;
break;
case SHAPE_SQUARE_FULL:
showIcon = R.drawable.icon_code_square_full;
break;
case SHAPE_SQUARE_EMPTY:
showIcon = R.drawable.icon_code_square_empty;
break;
case SHAPE_TRIANGLE_UP_FULL:
showIcon = R.drawable.icon_code_triangle_up_full;
break;
case SHAPE_TRIANGLE_UP_EMPTY:
showIcon = R.drawable.icon_code_triangle_up_empty;
break;
case SHAPE_TRIANGLE_DOWN_FULL:
showIcon = R.drawable.icon_code_triangle_down_full;
break;
case SHAPE_TRIANGLE_DOWN_EMPTY:
showIcon = R.drawable.icon_code_triangle_down_empty;
break;
case SHAPE_RHOMBUS_FULL:
showIcon = R.drawable.icon_code_rhombus_full;
break;
case SHAPE_RHOMBUS_EMPTY:
showIcon = R.drawable.icon_code_rhombus_empty;
break;
case SHAPE_ROUNDED_FIVE_STAR:
showIcon = R.drawable.icon_code_rounded_five_star;
break;
case SHAPE_STRAIGHT_FIVE_STAR:
showIcon = R.drawable.icon_code_straight_five_star;
break;
case SHAPE_CENTER_CIRCLE:
showIcon = R.drawable.icon_code_center_circle;
break;
}
return showIcon;
}
public final static int SHAPE_TYPE_POINT = 0;
public final static int SHAPE_TYPE_LINE = SHAPE_TYPE_POINT + 1;
public final static int SHAPE_TYPE_SURFACE = SHAPE_TYPE_LINE + 1;
}

@ -0,0 +1,256 @@
package com.project.survey.ui.pointmeasure.measure.util;
import android.content.Context;
import android.content.SharedPreferences;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.project.survey.R;
import com.project.survey.widget.bingce.dragdrop.FunctionItem;
import com.project.survey.widget.bingce.dragdrop.TabItem;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* Created by xulc on 2018/6/29.
*/
public class SFUtils {
private Context context;
private String xmlFileName;
private String preferAllDataKey;
private String preferSelDataKey;
private String str;
private SharedPreferences sp = null;
public SFUtils(Context context, String xmlFileName, String preferAllDataKey, String preferSelDataKey, String strDefultDataValue) {
this.context = context;
this.xmlFileName = xmlFileName;
this.preferAllDataKey = preferAllDataKey;
this.preferSelDataKey = preferSelDataKey;
this.str = strDefultDataValue;
sp = context.getSharedPreferences("survey_bottom_all_information", Context.MODE_PRIVATE);
}
public List<FunctionItem> getAllFunctionWithState() {
String allData = sp.getString(preferAllDataKey, "");
List<FunctionItem> functionItems = new ArrayList<>();
List<TabItem> tabItems = null;
if ("".equals(allData)) {
try {
InputStream is = context.getAssets().open(xmlFileName + ".xml");
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String str = null;
StringBuffer sbuffer = new StringBuffer();
while ((str = br.readLine()) != null) {
sbuffer.append(str);
}
br.close();
isr.close();
is.close();
allData = sbuffer.toString();
Gson gson = new Gson();
tabItems = gson.fromJson(allData, new TypeToken<List<TabItem>>() {
}.getType());
if (tabItems != null) {
for (int i = 0; i < tabItems.size(); i++) {
FunctionItem functionItem = new FunctionItem(tabItems.get(i).getTabName(), tabItems.get(i).getTabTip(), true);
functionItems.add(functionItem);
functionItems.addAll(tabItems.get(i).getFunctionItems());
}
}
} catch (IOException e) {
e.printStackTrace();
}
} else {
Gson gson = new Gson();
functionItems = gson.fromJson(allData, new TypeToken<List<FunctionItem>>() {
}.getType());
}
return functionItems;
}
public List<FunctionItem> getSelectFunctionItem() {
String selData = sp.getString(preferSelDataKey, str);
List<FunctionItem> functionItems = null;
if ("".equals(selData)) {
functionItems = new ArrayList<>();
} else {
Gson gson = new Gson();
functionItems = gson.fromJson(selData, new TypeToken<List<FunctionItem>>() {
}.getType());
}
return functionItems;
}
public List<FunctionItem> getTabNames() {
String allData = sp.getString(preferAllDataKey, "");
List<FunctionItem> functionItems = new ArrayList<>();
List<TabItem> tabItems = null;
if ("".equals(allData)) {
try {
InputStream is = context.getAssets().open(xmlFileName + ".txt");
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String str = null;
StringBuffer sbuffer = new StringBuffer();
while ((str = br.readLine()) != null) {
sbuffer.append(str);
}
br.close();
isr.close();
is.close();
allData = sbuffer.toString();
Gson gson = new Gson();
tabItems = gson.fromJson(allData, new TypeToken<List<TabItem>>() {
}.getType());
if (tabItems != null) {
int tabItemsCount = 0; //用于标记之后滑动的位置
for (int i = 0; i < tabItems.size(); i++) {
FunctionItem functionItem = new FunctionItem(tabItems.get(i).getTabName(), tabItems.get(i).getTabTip(), true, tabItemsCount);
tabItemsCount = tabItemsCount + tabItems.get(i).getFunctionItems().size() + 1;
functionItems.add(functionItem);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
return functionItems;
}
public void saveSelectFunctionItem(List<FunctionItem> selData) {
Gson gson = new Gson();
sp.edit().putString(preferSelDataKey, gson.toJson(selData)).apply();
}
public void saveAllFunctionWithState(List<FunctionItem> allData) {
Gson gson = new Gson();
sp.edit().putString(preferAllDataKey, gson.toJson(allData)).apply();
}
public static String getFunctionJsonNameLanguage(Context context, String jsonName) {
String showText = "";
switch (jsonName) {
case "坐标信息":
showText = context.getString(R.string.coordinate_information);
break;
case "基站信息":
showText = context.getString(R.string.base_information);
break;
case "测量信息":
showText = context.getString(R.string.survey_information);
break;
case "投影距离:与上一个点的投影距离。(空间距离同理)":
showText = context.getString(R.string.projection_space_distance_comment);
break;
case "X":
showText = "X";
break;
case "Y":
showText = "Y";
break;
case "Z":
showText = "Z";
break;
case "纬度":
showText = context.getString(R.string.latitude);
break;
case "经度":
showText = context.getString(R.string.longitude);
break;
case "海拔":
showText = context.getString(R.string.altitude);
break;
case "基站ID":
showText = context.getString(R.string.base_id);
break;
case "基站距离":
showText = context.getString(R.string.base_distance);
break;
case "速度":
showText = context.getString(R.string.speed);
break;
case "前进方位":
showText = context.getString(R.string.forward_angle);
break;
case "投影距离":
showText = context.getString(R.string.projection_distance);
break;
case "空间距离":
showText = context.getString(R.string.space_distance);
break;
case "计算信息":
showText = context.getString(R.string.computational_information);
break;
case "累计平距":
showText = context.getString(R.string.add_up_plane_distance);
break;
case "累计斜距":
showText = context.getString(R.string.add_up_space_distance);
break;
case "目标信息":
showText = context.getString(R.string.target_information);
break;
case "实测信息":
showText = context.getString(R.string.measured_information);
break;
case "距离信息":
showText = context.getString(R.string.distance_information);
break;
case "(请注意仅用于选线放样功能)":
showText = context.getString(R.string.please_note_select_line_function);
break;
case "目标 X":
showText = context.getString(R.string.target_x);
break;
case "目标 Y":
showText = context.getString(R.string.target_y);
break;
case "目标 Z":
showText = context.getString(R.string.target_z);
break;
case "目标里程":
showText = context.getString(R.string.target_mileage);
break;
case "目标偏距":
showText = context.getString(R.string.target_offset);
break;
case "设计标高":
showText = context.getString(R.string.design_height);
break;
case "实测 X":
showText = context.getString(R.string.survey_x);
break;
case "实测 Y":
showText = context.getString(R.string.survey_y);
break;
case "实测 Z":
showText = context.getString(R.string.survey_z);
break;
case "实测里程":
showText = context.getString(R.string.survey_mileage);
break;
case "实测偏距":
showText = context.getString(R.string.survey_offset);
break;
case "起点距":
showText = context.getString(R.string.start_distance);
break;
case "终点距":
showText = context.getString(R.string.end_distance);
break;
case "垂距":
showText = context.getString(R.string.vertical_distance);
break;
}
return showText;
}
}

@ -0,0 +1,111 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.project.survey.ui.pointmeasure.measure.util;
import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;
import com.bingce.coordlib.util.CoordUtil;
import com.bingce.device.Device;
import com.bingce.device.enums.DeviceTypeEnum;
import com.bingce.rtk.command.RTK;
import com.bingce.rtk.gnss.Gnss;
import com.bingce.surveyor.util.DeviceConnectUtil;
import com.bingce.surveyor.util.dialog.CustomDialog;
import com.bingce.surveyorBase.R.string;
import com.bingce.surveyorBase.databinding.ActivityBaseSurveyNewBinding;
import com.bingce.utils.Util;
import com.project.survey.databinding.LayoutBaseSurveyStakingSettingBinding;
import blankj.utilcode.util.ToastUtils;
import lecho.hellocharts.view.LineChartView;
public class SurveyToolBarClickListenerUtils {
public SurveyToolBarClickListenerUtils() {
}
public static void setOnClickListener(Context context, boolean isShowSettingConnectTipsDialog,
boolean isStakingPager, ActivityBaseSurveyNewBinding activityBaseSurveyBinding,
LayoutBaseSurveyStakingSettingBinding stakingSettingBinding,
IToolBarClickListener callBack) {
stakingSettingBinding.llSet.setOnClickListener((v) -> {
if (isShowSettingConnectTipsDialog) {
if (DeviceConnectUtil.isDeviceConnectSelectDialog(context, activityBaseSurveyBinding)) {
callBack.onSettingClickListener();
}
} else {
callBack.onSettingClickListener();
}
});
stakingSettingBinding.rlPositionCenter.setOnClickListener((v) -> {
if (isStakingPager) {
callBack.onPositionCenterClickListener();
} else if (DeviceConnectUtil.isDeviceConnectSelectDialog(context, activityBaseSurveyBinding)) {
callBack.onPositionCenterClickListener();
}
});
stakingSettingBinding.rlFullScreen.setOnClickListener((v) -> {
callBack.onFullScreenClickListener();
});
stakingSettingBinding.rlTiltPrimAuto.setOnClickListener((v) -> {
if (DeviceConnectUtil.isDeviceConnectSelectDialog(context, activityBaseSurveyBinding)) {
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
callBack.onAutoPrimsClickListener();
} else {
if (!Gnss.getInstance().getDevice().isSupportTilt()) {
ToastUtils.showShort(string.current_device_not_support_tilt);
return;
}
if (Gnss.getInstance().getDevice().isTiltOpen()) {
RTK.getInstance().sendCloseTiltCmd();
} else if (Device.getInstance().remindAntBeforeTilt) {
(new CustomDialog.Builder(context)).setTitle(context.getString(string.prompt)).setContent(context.getString(string.current_ploe_high_lever) + context.getString(string.colon) + CoordUtil.formatDouble2String(Gnss.getInstance().getDevice().getPoleHeight(), 3) + "m\n" + context.getString(string.check_whether_pole_height_correct)).setButtonConfirm((v1) -> {
RTK.getInstance().sendOpenTiltCmd();
}).create().show();
} else {
RTK.getInstance().sendOpenTiltCmd();
}
}
}
});
}
public static void setScaleViewOnClickListener(LineChartView lineChartView, TextView tvScale, ImageView ivScale) {
lineChartView.setViewportChangeListener((viewport) -> {
if (!Double.isNaN(viewport.left) && !Double.isNaN(viewport.right) && !Double.isNaN(viewport.top) && !Double.isNaN(viewport.bottom)) {
double width = Math.abs(viewport.left - viewport.right);
int chartViewWidth = lineChartView.getWidth();
int scaleViewWith = ivScale.getWidth();
double value = width / (double) chartViewWidth * (double) scaleViewWith;
String string;
if (value > 1.0) {
string = Util.formatDouble2String(value, 1) + "m";
} else {
string = Util.formatDouble2String(value, 3) + "m";
}
tvScale.setText(string);
} else {
tvScale.setText("*");
}
});
}
public interface IToolBarClickListener {
void onSettingClickListener();
void onPositionCenterClickListener();
void onFullScreenClickListener();
void onAutoPrimsClickListener();
}
}

@ -4,9 +4,12 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.DashPathEffect;
import android.graphics.Rect;
import android.text.TextUtils;
import android.view.View;
import com.bingce.chart.ChartViewUtils;
import com.bingce.coordlib.model.Coordinate;
import com.bingce.data.surveyor.surveydata.pointsurvey.PointConstants;
import com.bingce.data.surveyor.surveydata.pointsurvey.PointRecord;
@ -43,6 +46,11 @@ import cn.liuyanbing.surveyor.model.horizontalcurve.JDElement;
import cn.liuyanbing.surveyor.model.horizontalcurve.JDFiveCurveElement;
import cn.liuyanbing.surveyor.model.horizontalcurve.XJDCurveElement;
import cn.liuyanbing.surveyor.model.horizontalcurve.XYCurveElement;
import lecho.hellocharts.model.Axis;
import lecho.hellocharts.model.Line;
import lecho.hellocharts.model.LineChartData;
import lecho.hellocharts.model.PointValue;
import lecho.hellocharts.view.LineChartView;
public class CommonUtils {
@ -164,6 +172,127 @@ public class CommonUtils {
return result;
}
/**
* 设置chartview数据
*
* @param chart view
* @param datas 线
* @param hasAxis 是否设置边框
* @param isMirror 是否镜像
* @param referLineOffset 参考线的x坐标例如设计线隧道中线
*/
public static void mChartViewSetLineChartDatas(LineChartView chart, List<LineChartData> datas, boolean hasAxis, boolean isMirror, double... referLineOffset) {
ChartViewUtils.mChartViewSetLineChartDatas(chart, datas, hasAxis, isMirror, referLineOffset);
}
/**
* 设置chartview数据
*
* @param chart view
* @param datas 线
* @param hasAxis 是否设置边框
* @param isMirror 是否镜像
* @param referLineOffset 参考线的x坐标例如设计线隧道中线
*/
public static void mChartViewSetAndLableLineChartDatas(LineChartView chart, List<LineChartData> datas, boolean hasAxis, boolean isMirror, double... referLineOffset) {
if (datas != null) {
double left = Double.POSITIVE_INFINITY, top = Double.NEGATIVE_INFINITY, right = Double.NEGATIVE_INFINITY, bottom = Double.POSITIVE_INFINITY;
Rect contentRectMinusAll = chart.getChartComputator().getContentRectMinusAllMargins();
//总的线路集合
ArrayList<Line> lines = new ArrayList<>();
//判断数据是否为空
boolean hasLine = false;
//计算边界值和设计线
for (int i = 0; i < datas.size(); i++) {
for (Line line : datas.get(i).getLines()) {
// Calculate max and min for viewport.
for (PointValue pointValue : line.getValues()) {
if (pointValue.getX() < left) {
left = pointValue.getX();
}
if (pointValue.getX() > right) {
right = pointValue.getX();
}
if (pointValue.getY() < bottom) {
bottom = pointValue.getY();
}
if (pointValue.getY() > top) {
top = pointValue.getY();
}
}
hasLine = true;
}
}
if (hasLine && referLineOffset.length != 0) {
//计算边界时参考线也要考虑在内
for (int i = 0; i < referLineOffset.length; i++) {
if (referLineOffset[i] < left) {
left = referLineOffset[i];
}
if (referLineOffset[i] > right) {
right = referLineOffset[i];
}
}
double width = right - left, height = top - bottom;
if (contentRectMinusAll.height() / height >= contentRectMinusAll.width() / width) {
// Y轴增量
double deltaY = width / contentRectMinusAll.width() * contentRectMinusAll.height() - height;
//Log.i(TAG, "Y增量:" + deltaY);
//后面/30是在编辑加入缓存区,以免图形显示不全
for (int i = 0; i < referLineOffset.length; i++) {
List<PointValue> lineValues = new ArrayList<>();
lineValues.add(new PointValue(referLineOffset[i], top + deltaY / 2));
lineValues.add(new PointValue(referLineOffset[i], bottom - deltaY / 2));
Line line = new Line(lineValues).setPointColor(Color.MAGENTA).setHasLabels(true).setStrokeWidth(1).setPointRadius(2);
line.setPathEffect(new DashPathEffect(new float[]{2, 4, 8, 16}, 1));
lines.add(line);
}
} else {
for (int i = 0; i < referLineOffset.length; i++) {
List<PointValue> lineValues = new ArrayList<>();
lineValues.add(new PointValue(referLineOffset[i], top));
lineValues.add(new PointValue(referLineOffset[i], bottom));
Line line = new Line(lineValues).setPointColor(Color.MAGENTA).setHasLabels(true).setStrokeWidth(1).setPointRadius(2);
line.setPathEffect(new DashPathEffect(new float[]{2, 4, 8, 16}, 1));
lines.add(line);
}
}
}
//把参数datas集成
for (int i = 0; i < datas.size(); i++) {
lines.addAll(datas.get(i).getLines());
}
//镜像
if (isMirror) {
for (Line line : lines) {
for (PointValue pointValue : line.getValues()) {
pointValue.set(-1 * pointValue.getX(), pointValue.getY());
}
}
}
LineChartData resultData = new LineChartData(lines);
if (hasAxis) {
resultData.setAxisYLeft(new Axis().setHasLines(false).setHasSeparationLine(true));
resultData.setAxisYRight(new Axis().setHasLines(false).setHasSeparationLine(true));
resultData.setAxisXBottom(new Axis().setHasLines(false).setHasSeparationLine(true));
resultData.setAxisXTop(new Axis().setHasLines(false).setHasSeparationLine(true));
} else {
resultData.setAxisYLeft(null);
resultData.setAxisYRight(null);
resultData.setAxisXBottom(null);
resultData.setAxisXTop(null);
}
resultData.setValueLabelBackgroundEnabled(true);//隐藏label背景,放到这里设置是因为这是最后一关,不会被其他data的背景色覆盖
resultData.setValueLabelsTextColor(Color.WHITE);
chart.setLineChartData(resultData);
chart.setValueSelectionEnabled(true);
} else {
chart.setLineChartData(null);
}
}
/**
* 导入exl文件
@ -301,6 +430,36 @@ public class CommonUtils {
}
}
public static LineChartData mCircleChartDatas(int color, double centerX, double centerY, double radius, double anglePlus) {
Line circleLine = new Line(CalCirclePathPoints(centerX, centerY, radius, anglePlus));
circleLine.setStrokeWidth(1);
circleLine.setHasPoints(false);
circleLine.setCubic(true);
circleLine.setColor(color);
circleLine.setHasLines(true);
circleLine.setHasLabels(false);
LineChartData data = new LineChartData();
data.getLines().add(circleLine);
return data;
}
private static ArrayList<PointValue> CalCirclePathPoints(double centerX, double centerY, double radius, double anglePlus) {
ArrayList<PointValue> result = new ArrayList();
result.add(new PointValue(centerY, centerX + radius));
double center2BeginAngle = 0.0D;
double angle = Math.toRadians(Math.abs(anglePlus));
for (int i = 1; angle * (double) i < 6.283185307179586D; ++i) {
double x = centerX + radius * Math.cos(center2BeginAngle + angle * (double) i);
double y = centerY + radius * Math.sin(center2BeginAngle + angle * (double) i);
PointValue pv = new PointValue(((float) y), ((float) x));
result.add(pv);
}
result.add(new PointValue(centerY, centerX + radius));
return result;
}
/**
* huo
*
@ -425,7 +584,7 @@ public class CommonUtils {
* @return
*/
public static int dip2px(float dpValue) {
final float scale = Utils.getApp().getResources().getDisplayMetrics().density;
final float scale = (Utils.getApp()).getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}

@ -0,0 +1,118 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.project.survey.util;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import com.bingce.BaseApp;
import com.bingce.device.Device;
import com.bingce.device.enums.DeviceTypeEnum;
import com.bingce.device.ui.widget.BingCeTextView;
import com.bingce.rtk.command.RTK;
import com.bingce.rtk.gnss.Gnss;
import com.bingce.surveyor.util.dialog.CustomInputDialog;
import com.bingce.surveyor.util.dialog.CustomInputDialog.Builder;
import com.bingce.surveyorBase.R.drawable;
import com.bingce.surveyorBase.R.string;
import com.bingce.totalstation.TotalStation;
import com.bingce.totalstation.TsConfig;
import com.bingce.totalstation.TsListener;
import com.bingce.utils.Util;
import com.project.survey.databinding.LayoutPoleHrHeightBinding;
import blankj.utilcode.util.ToastUtils;
import blankj.utilcode.util.Utils;
public class SurveyDevicePoleHrHeightUtils {
public SurveyDevicePoleHrHeightUtils() {
}
public static void initDevicePoleHrHigh(FragmentActivity activity,
final LayoutPoleHrHeightBinding layoutPoleHrHeightBinding) {
activity.getLifecycle().addObserver(new LifecycleEventObserver() {
public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Event event) {
TsListener.ChangeHrListener changeHrListener = new TsListener.ChangeHrListener() {
public void onChangeHrSuccess(double hr) {
ToastUtils.showShort(string.edit_hr_successful);
layoutPoleHrHeightBinding.tvPoleHrHeight.setText(Util.formatDouble2String(hr, 3) + "m");
}
public void onChangeHrFailed(String errorMsg) {
ToastUtils.showShort(errorMsg);
}
};
switch (event) {
case ON_CREATE:
TsListener.getInstance().addChangeHrRespListener(changeHrListener);
break;
case ON_DESTROY:
TsListener.getInstance().removeChangeHrRespListener(changeHrListener);
}
}
});
setDevicePoleHrHigh(activity, layoutPoleHrHeightBinding.llPoleHrHeight, layoutPoleHrHeightBinding.ivPoleHrHeight, layoutPoleHrHeightBinding.tvPoleHrHeight, false);
}
public static void setDevicePoleHrHigh(FragmentActivity activity, LinearLayout llPoleHrHeight,
ImageView ivPoleHrHeight, BingCeTextView tvPoleHrHeight,
boolean isTitleBar) {
int notNumber = 3;
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? drawable.icon_hr_high_white : (((BaseApp) Utils.getApp()).isThemeDark() ? drawable.icon_hr_high_white : drawable.icon_hr_high)));
tvPoleHrHeight.setText(Util.formatDouble2String(TsConfig.getInstance().getHr(), notNumber) + "m");
} else {
ivPoleHrHeight.setImageDrawable(Utils.getApp().getDrawable(isTitleBar ? drawable.icon_pole_high_white : (((BaseApp) Utils.getApp()).isThemeDark() ? drawable.icon_pole_high_white : drawable.icon_pole_high)));
tvPoleHrHeight.setText(Util.formatDouble2String(Gnss.getInstance().getDevice().getPoleHeight(), notNumber) + "m");
}
llPoleHrHeight.setOnClickListener((v) -> {
double inputPH;
String title;
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
title = Utils.getApp().getString(string.edit_ts_hr);
inputPH = TsConfig.getInstance().getHr();
} else {
title = Utils.getApp().getString(string.edit_antenna_height);
inputPH = Gnss.getInstance().getDevice().getPoleHeight();
}
(new CustomInputDialog.Builder(activity)).setTitle(title).setInputText(Utils.getApp().getString(string.enter_pole_height)).setInputText(Util.formatDouble2String(inputPH, notNumber)).setInputFormat(Builder.INPUT_TYPE_PM_DECIMAL).setButtonConfirm(new CustomInputDialog.setOnConfirmClickListener() {
public void OnConfirmClick(String editText) {
if (TextUtils.isEmpty(editText)) {
editText = "0";
}
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
this.saveHrHigh(editText);
} else {
this.saveRTKHigh(editText);
}
tvPoleHrHeight.setText(Util.formatDouble2String(Double.parseDouble(editText), notNumber) + "m");
}
private void saveHrHigh(String editText) {
TotalStation.getInstance().requestChangeHr(Double.parseDouble(editText));
}
private void saveRTKHigh(String editText) {
Gnss.getInstance().getDevice().setPoleHeight(Double.parseDouble(editText));
Gnss.getInstance().save();
RTK.getInstance().sendSetPoleHeightCmd();
}
}).create().show();
});
}
}

@ -0,0 +1,122 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.project.survey.util;
import android.view.View;
import com.bingce.device.Device;
import com.bingce.device.enums.DeviceTypeEnum;
import com.bingce.rtk.gnss.Gnss;
import com.bingce.surveyorBase.R.color;
import com.bingce.surveyorBase.R.drawable;
import com.bingce.surveyorBase.R.mipmap;
import com.bingce.surveyorBase.R.string;
import com.bingce.totalstation.TotalStation;
import com.bingce.utils.SoundPoolUtil;
import com.project.survey.databinding.LayoutBaseSurveyStakingSettingBinding;
import com.project.survey.databinding.LayoutDraggingButtonBinding;
import com.project.survey.databinding.LayoutPoleHrHeightBinding;
import com.project.survey.ui.pointmeasure.measure.PointSurveyNewActivity;
import blankj.utilcode.util.StringUtils;
import blankj.utilcode.util.Utils;
public class SurveyUIUtils {
public SurveyUIUtils() {
}
public static void stopSoundPool() {
SoundPoolUtil.getInstance().stop();
}
private static int dip2px(float dpValue) {
float scale = Utils.getApp().getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5F);
}
public static void updatePoleHrHeightDraggingToolBarLayout(PointSurveyNewActivity activity, boolean isExpand, LayoutPoleHrHeightBinding layoutPoleHrHeightBinding,
LayoutDraggingButtonBinding layoutDraggingButtonBinding,
LayoutBaseSurveyStakingSettingBinding layoutBaseSurveyStakingSettingBinding,
boolean isJudgeIvSettingStatus, boolean isStakingPager, Object currentCoordinate) {
SurveyDevicePoleHrHeightUtils.initDevicePoleHrHigh(activity, layoutPoleHrHeightBinding);
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
layoutDraggingButtonBinding.drWatchSurvey.setVisibility(View.VISIBLE);
if (isStakingPager) {
layoutDraggingButtonBinding.drWatchSurveyRecord.setText(StringUtils.getString(string.record));
} else {
layoutDraggingButtonBinding.drWatchSurveyRecord.setText(StringUtils.getString(string.measure_and_record));
}
} else {
layoutDraggingButtonBinding.drWatchSurvey.setVisibility(View.GONE);
layoutDraggingButtonBinding.drWatchSurveyRecord.setText(StringUtils.getString(string.record));
}
layoutBaseSurveyStakingSettingBinding.expandLayout.setRetractHeight((float) dip2px(25.0F));
layoutBaseSurveyStakingSettingBinding.expandLayout.initExpand(isExpand);
layoutBaseSurveyStakingSettingBinding.llTopTool.setOnClickListener((v) -> {
if (layoutBaseSurveyStakingSettingBinding.expandLayout.isExpand()) {
layoutBaseSurveyStakingSettingBinding.ivTool.setImageResource(mipmap.icon_new_up_gray_arrow);
} else {
layoutBaseSurveyStakingSettingBinding.ivTool.setImageResource(mipmap.icon_new_down_gray_arrow);
}
layoutBaseSurveyStakingSettingBinding.expandLayout.toggleExpand();
});
if (isJudgeIvSettingStatus) {
if (!Device.getInstance().isDeviceConnected()) {
layoutBaseSurveyStakingSettingBinding.ivSurveySetting.setImageResource(drawable.icon_survey_setting_gray);
} else {
layoutBaseSurveyStakingSettingBinding.ivSurveySetting.setImageResource(drawable.icon_survey_setting_black);
}
} else {
layoutBaseSurveyStakingSettingBinding.ivSurveySetting.setImageResource(drawable.icon_survey_setting_black);
}
if (!Device.getInstance().isDeviceConnected() && currentCoordinate == null) {
layoutBaseSurveyStakingSettingBinding.ivPositionCenter.setImageResource(drawable.icon_survey_position_center_gray);
layoutBaseSurveyStakingSettingBinding.tvPositionCenter.setTextColor(activity.getColor(color.color_BCBCBC));
} else {
layoutBaseSurveyStakingSettingBinding.ivPositionCenter.setImageResource(drawable.icon_survey_position_center_black);
layoutBaseSurveyStakingSettingBinding.tvPositionCenter.setTextColor(activity.getColor(color.black));
}
if (isStakingPager) {
layoutBaseSurveyStakingSettingBinding.rlInputCurrentPoint.setVisibility(View.VISIBLE);
} else {
layoutBaseSurveyStakingSettingBinding.rlInputCurrentPoint.setVisibility(View.GONE);
}
if (Device.getInstance().deviceType == DeviceTypeEnum.DEVICE_TYPE_TS) {
if (isStakingPager) {
layoutBaseSurveyStakingSettingBinding.rlTiltPrimAuto.setVisibility(View.VISIBLE);
} else {
layoutBaseSurveyStakingSettingBinding.rlTiltPrimAuto.setVisibility(View.GONE);
}
if (Device.getInstance().isDeviceConnected() && TotalStation.getInstance().isSupportMotor()) {
layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(drawable.icon_auto_look_prim_black);
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(color.black));
} else {
layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(drawable.icon_auto_look_prim_gray);
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(color.color_BCBCBC));
}
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setText(activity.getString(string.auto_trun));
} else {
if (Gnss.getInstance().getDevice().isTiltOpen() && Gnss.getInstance().getDevice().isSupportTilt()) {
layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(drawable.icon_survey_tilt_black);
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(color.black));
} else {
layoutBaseSurveyStakingSettingBinding.ivTiltPrimAuto.setImageResource(drawable.icon_survey_tilt_gray);
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setTextColor(activity.getColor(color.color_BCBCBC));
}
layoutBaseSurveyStakingSettingBinding.tvTiltPrimAuto.setText(activity.getString(string.tilt));
layoutBaseSurveyStakingSettingBinding.rlTiltPrimAuto.setVisibility(View.VISIBLE);
}
}
}

@ -0,0 +1,52 @@
package com.project.survey.widget.bingce.dragdrop;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;
public class DefaultItemCallback extends ItemTouchHelper.Callback {
private ItemTouchHelperAdapter touchHelperAdapter;
public DefaultItemCallback(ItemTouchHelperAdapter touchHelperAdapter) {
this.touchHelperAdapter = touchHelperAdapter;
}
@Override
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; //允许上下左右的拖动
return makeMovementFlags(dragFlags, 0);
}
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
touchHelperAdapter.onItemMove(viewHolder, viewHolder.getAdapterPosition(), target.getAdapterPosition());
return true;
}
@Override
public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
if (actionState != ItemTouchHelper.ACTION_STATE_IDLE)
touchHelperAdapter.onItemSelect(viewHolder);
}
@Override
public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
if (!recyclerView.isComputingLayout())
touchHelperAdapter.onItemClear(viewHolder);
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
}
@Override
public boolean isLongPressDragEnabled() {
return true;
}
@Override
public boolean isItemViewSwipeEnabled() {
return false;
}
}

@ -0,0 +1,9 @@
package com.project.survey.widget.bingce.dragdrop;
import androidx.recyclerview.widget.ItemTouchHelper;
public class DefaultItemTouchHelper extends ItemTouchHelper {
public DefaultItemTouchHelper(Callback callback) {
super(callback);
}
}

@ -0,0 +1,144 @@
package com.project.survey.widget.bingce.dragdrop;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.project.survey.App;
import com.project.survey.R;
import com.project.survey.ui.pointmeasure.measure.util.SFUtils;
import java.util.ArrayList;
import java.util.List;
import blankj.utilcode.util.Utils;
public class FunctionAdapter extends RecyclerView.Adapter {
private List<FunctionItem> data = new ArrayList<>();
private LayoutInflater inflater;
private Context context;
public FunctionAdapter(Context context, @NonNull List<FunctionItem> data) {
this.context = context;
if (data != null) {
this.data = data;
}
inflater = LayoutInflater.from(context);
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
RecyclerView.ViewHolder holder;
if (0 == viewType) {
holder = new TitleViewHolder(inflater.inflate(R.layout.layout_function_text, parent, false));
} else {
holder = new FunctionViewHolder(inflater.inflate(R.layout.layout_grid_item, parent, false));
}
return holder;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
if (0 == getItemViewType(position)) {
TitleViewHolder holder = (TitleViewHolder) viewHolder;
holder.title.setText(SFUtils.getFunctionJsonNameLanguage(context, data.get(position).name));
holder.tip.setText(SFUtils.getFunctionJsonNameLanguage(context, data.get(position).tip));
if (((App) Utils.getApp()).isThemeDark) {
holder.title.setTextColor(context.getColor(R.color.white));
holder.tip.setTextColor(context.getColor(R.color.white));
}
} else {
final int index = position;
FunctionViewHolder holder = (FunctionViewHolder) viewHolder;
FunctionItem fi = data.get(position);
// setImage(fi.imageUrl,holder.iv);
if (((App) Utils.getApp()).isThemeDark) {
holder.squareRelativeLayout.setBackgroundColor(context.getColor(R.color.dark));
holder.text.setTextColor(context.getColor(R.color.white));
}
holder.text.setText(SFUtils.getFunctionJsonNameLanguage(context, fi.name));
holder.iv.setImageResource(fi.isSelect ? R.drawable.icon_location_information_earth_gray : R.drawable.icon_location_information_earth);
holder.btn.setImageResource(fi.isSelect ? R.drawable.ic_block_selected : R.drawable.ic_block_add);
holder.btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FunctionItem f = data.get(index);
if (!f.isSelect) {
if (listener != null) {
if (listener.add(f)) {
f.isSelect = true;
notifyDataSetChanged();
}
}
}
}
});
}
}
public void setImage(String url, ImageView iv) {
try {
int rid = context.getResources().getIdentifier(url, "drawable", context.getPackageName());
iv.setImageResource(rid);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public int getItemViewType(int position) {
return data.get(position).isTitle ? 0 : 1;
}
@Override
public int getItemCount() {
return data.size();
}
private class TitleViewHolder extends RecyclerView.ViewHolder {
private TextView title, tip;
public TitleViewHolder(View itemView) {
super(itemView);
title = itemView.findViewById(R.id.title);
tip = itemView.findViewById(R.id.tip);
}
}
private class FunctionViewHolder extends RecyclerView.ViewHolder {
private ImageView iv, btn;
private TextView text;
private SquareRelativeLayout squareRelativeLayout;
public FunctionViewHolder(View itemView) {
super(itemView);
iv = itemView.findViewById(R.id.iv);
text = itemView.findViewById(R.id.text);
btn = itemView.findViewById(R.id.btn);
squareRelativeLayout = itemView.findViewById(R.id.squareRelativeLayout);
}
}
public interface OnItemAddListener {
boolean add(FunctionItem item);
}
private OnItemAddListener listener;
public void setOnItemAddListener(OnItemAddListener listener) {
this.listener = listener;
}
}

@ -0,0 +1,133 @@
package com.project.survey.widget.bingce.dragdrop;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.project.survey.App;
import com.project.survey.R;
import com.project.survey.ui.pointmeasure.measure.util.SFUtils;
import java.util.ArrayList;
import java.util.List;
import blankj.utilcode.util.Utils;
public class FunctionBlockAdapter extends RecyclerView.Adapter<FunctionBlockAdapter.ViewHolder> implements ItemTouchHelperAdapter {
private List<FunctionItem> data = new ArrayList<>();
private LayoutInflater inflater;
private Context context;
private DragICallback mDragCallback;
public FunctionBlockAdapter(Context context, @NonNull List<FunctionItem> data) {
this.context = context;
inflater = LayoutInflater.from(context);
if (data != null) {
this.data = data;
}
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ViewHolder(inflater.inflate(R.layout.layout_grid_item, parent, false));
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
final int index = position;
FunctionItem fi = data.get(position);
setImage(fi.imageUrl, holder.iv);
holder.text.setText(SFUtils.getFunctionJsonNameLanguage(context,fi.name));
holder.btn.setImageResource(R.drawable.ic_block_delete);
if (((App) Utils.getApp()).isThemeDark) {
holder.squareRelativeLayout.setBackgroundColor(context.getColor(R.color.dark));
holder.text.setTextColor(context.getColor(R.color.white));
}
holder.btn.setOnClickListener(v -> {
FunctionItem fi1 = data.remove(index);
if (listener != null) {
listener.remove(fi1);
}
notifyDataSetChanged();
});
}
public void updateDataSetChanged(List<FunctionItem> data) {
this.data = data;
notifyDataSetChanged();
}
public void setImage(String url, ImageView iv) {
try {
int rid = context.getResources().getIdentifier(url,"drawable",context.getPackageName());
iv.setImageResource(rid);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public int getItemCount() {
return data.size();
}
@Override
public void onItemMove(RecyclerView.ViewHolder holder, int fromPosition, int targetPosition) {
if (fromPosition < data.size() && targetPosition < data.size()) {
FunctionItem moveItem = data.get(fromPosition);
data.remove(fromPosition);
data.add(targetPosition, moveItem);
notifyItemMoved(fromPosition, targetPosition);
}
}
@Override
public void onItemSelect(RecyclerView.ViewHolder holder) {
holder.itemView.setScaleX(0.8f);
holder.itemView.setScaleY(0.8f);
}
@Override
public void onItemClear(RecyclerView.ViewHolder holder) {
holder.itemView.setScaleX(1.0f);
holder.itemView.setScaleY(1.0f);
mDragCallback.dragChanged(data);
}
@Override
public void onItemDismiss(RecyclerView.ViewHolder holder) {
}
public class ViewHolder extends RecyclerView.ViewHolder {
private ImageView iv, btn;
private TextView text;
private SquareRelativeLayout squareRelativeLayout;
public ViewHolder(View itemView) {
super(itemView);
iv = itemView.findViewById(R.id.iv);
text = itemView.findViewById(R.id.text);
btn = itemView.findViewById(R.id.btn);
squareRelativeLayout = itemView.findViewById(R.id.squareRelativeLayout);
}
}
public interface OnItemRemoveListener {
void remove(FunctionItem item);
}
private OnItemRemoveListener listener;
public void setOnItemRemoveListener(OnItemRemoveListener listener) {
this.listener = listener;
}
public interface DragICallback {
void dragChanged(List<FunctionItem> data);
}
public void addDragChangedListener(DragICallback callback) {
mDragCallback = callback;
}
}

@ -0,0 +1,38 @@
package com.project.survey.widget.bingce.dragdrop;
import androidx.annotation.Keep;
@Keep
public class FunctionItem {
public String id;
public String name;
public String tip;
public boolean isSelect = false;
public String imageUrl = "";
public String background ="";
public boolean isTitle = false;
public int subItemCount = 0;
public FunctionItem(String name, boolean isSelect, String imageUrl, String background) {
this.name = name;
this.tip = tip;
this.isSelect = isSelect;
this.imageUrl = imageUrl;
this.background = background;
}
public FunctionItem(String name,String tip,boolean isTitle,int subItemCount){
this.name = name;
this.tip = tip;
this.isTitle = isTitle;
this.subItemCount = subItemCount;
}
public FunctionItem(String name,String tip,boolean isTitle){
this.name = name;
this.tip = tip;
this.isTitle = isTitle;
}
}

@ -0,0 +1,37 @@
package com.project.survey.widget.bingce.dragdrop;
public class FunctionItemID {
public static class POINT_SURVEY_ID {
public static final int SURVEY_X_ID = 0;
public static final int SURVEY_Y_ID = SURVEY_X_ID + 1;
public static final int SURVEY_Z_ID = SURVEY_Y_ID + 1;
public static final int SURVEY_LAT_ID = SURVEY_Z_ID + 1;
public static final int SURVEY_LON_ID = SURVEY_LAT_ID + 1;
public static final int SURVEY_ALT_ID = SURVEY_LON_ID + 1;
public static final int SURVEY_SIT_ID_ID = SURVEY_ALT_ID + 1;
public static final int SURVEY_SIT_DISTANCE_ID = SURVEY_SIT_ID_ID + 1;
public static final int SURVEY_SPEED_ID = SURVEY_SIT_DISTANCE_ID + 1;
public static final int SURVEY_ANGLE_ID = SURVEY_SPEED_ID + 1;
public static final int SURVEY_LAST_PROJECTION_ID = SURVEY_ANGLE_ID + 1;
public static final int SURVEY_LAST_SPACE_ID = SURVEY_LAST_PROJECTION_ID + 1;
public static final int SURVEY_ACCUMULAT_DISTANCE_2D = SURVEY_LAST_SPACE_ID + 1;
public static final int SURVEY_ACCUMULAT_DISTANCE_3D = SURVEY_ACCUMULAT_DISTANCE_2D + 1;
}
public static class CAD_ID {
public static final int TARGET_X_ID = 0;
public static final int TARGET_Y_ID = TARGET_X_ID + 1;
public static final int TARGET_Z_ID = TARGET_Y_ID + 1;
public static final int TARGET_MILEAGE_ID = TARGET_Z_ID + 1;
public static final int TARGET_OFFSET_ID = TARGET_MILEAGE_ID + 1;
public static final int TARGET_DESIGN_HEIGHT_ID = TARGET_OFFSET_ID + 1;
public static final int SURVEY_X_ID = TARGET_DESIGN_HEIGHT_ID + 1;
public static final int SURVEY_Y_ID = SURVEY_X_ID + 1;
public static final int SURVEY_Z_ID = SURVEY_Y_ID + 1;
public static final int SURVEY_MILEAGE_ID = SURVEY_Z_ID + 1;
public static final int SURVEY_OFFSET_ID = SURVEY_MILEAGE_ID + 1;
public static final int SURVEY_START_DISTANCE_ID = SURVEY_OFFSET_ID + 1;
public static final int SURVEY_END_DISTANCE_ID = SURVEY_START_DISTANCE_ID + 1;
public static final int SURVEY_PEDAL_ID = SURVEY_END_DISTANCE_ID + 1;
}
}

@ -0,0 +1,15 @@
package com.project.survey.widget.bingce.dragdrop;
import androidx.recyclerview.widget.RecyclerView;
public interface ItemTouchHelperAdapter {
void onItemMove(RecyclerView.ViewHolder holder, int fromPosition, int targetPosition);
void onItemSelect(RecyclerView.ViewHolder holder);
void onItemClear(RecyclerView.ViewHolder holder);
void onItemDismiss(RecyclerView.ViewHolder holder);
}

@ -0,0 +1,33 @@
package com.project.survey.widget.bingce.dragdrop;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
private int row = 1;
private int space = 1;
public SpaceItemDecoration(int row, int space) {
this.row = row;
this.space = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
outRect.left = space;
outRect.bottom = space;
// if (parent.getChildAdapterPosition(view) % row == 0)
// outRect.left = 0;
}
@Override
public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) {
super.onDrawOver(c, parent, state);
}
}

@ -0,0 +1,27 @@
package com.project.survey.widget.bingce.dragdrop;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
public class SquareRelativeLayout extends RelativeLayout {
public SquareRelativeLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public SquareRelativeLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SquareRelativeLayout(Context context) {
super(context);
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(getDefaultSize(0, widthMeasureSpec),getDefaultSize(0, heightMeasureSpec));
int childWidthSize = getMeasuredWidth();
widthMeasureSpec = MeasureSpec.makeMeasureSpec(childWidthSize, MeasureSpec.EXACTLY);
heightMeasureSpec = widthMeasureSpec;
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}

@ -0,0 +1,45 @@
package com.project.survey.widget.bingce.dragdrop;
import androidx.annotation.Keep;
import java.util.ArrayList;
/**
* Created by xulc on 2018/6/29.
*/
@Keep
public class TabItem {
private String tabName = "";
private String tabTip = "";
private ArrayList<FunctionItem> functionItems;
public TabItem(String tabName, String tabTip, ArrayList<FunctionItem> functionItems) {
this.tabName = tabName;
this.tabTip = tabTip;
this.functionItems = functionItems;
}
public String getTabName() {
return tabName;
}
public void setTabName(String tabName) {
this.tabName = tabName;
}
public String getTabTip() {
return tabTip;
}
public void setTabTip(String tabTip) {
this.tabTip = tabTip;
}
public ArrayList<FunctionItem> getFunctionItems() {
return functionItems;
}
public void setFunctionItems(ArrayList<FunctionItem> functionItems) {
this.functionItems = functionItems;
}
}

@ -33,13 +33,14 @@ import androidx.customview.view.AbsSavedState;
import androidx.customview.widget.ViewDragHelper;
import androidx.customview.widget.ViewDragHelper.Callback;
import com.project.survey.R;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import cn.liuyanbing.surveyor.R;
/**
* 高德首页滑动效果

@ -9,7 +9,8 @@ import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import cn.liuyanbing.surveyor.R;
import com.project.survey.R;
/**
* 高德首页按钮处理

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:shareInterpolator="true"
android:duration="1000">
<alpha
android:fromAlpha="1"
android:toAlpha="0.5"
android:repeatCount="infinite"
android:repeatMode="reverse" />
<translate
android:fromXDelta="0%"
android:toXDelta="0%"
android:fromYDelta="7%"
android:toYDelta="-7%"
android:repeatCount="infinite"
android:repeatMode="reverse" />
</set>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/ic_block_tab_checked" android:state_checked="true" />
<item android:drawable="@mipmap/ic_block_tab_unchecked" android:state_checked="false" />
</selector>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="#f5f5f5" />
</shape>
</item>
<item android:state_pressed="false">
<shape>
<solid android:color="#f4f4f4" />
</shape>
</item>
</selector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,128a384,384 0,1 0,0 768A384,384 0,0 0,512 128zM640,544L544,544L544,640a32,32 0,0 1,-64 0L480,544L384,544a32,32 0,0 1,0 -64h96L480,384a32,32 0,0 1,64 0v96L640,480a32,32 0,0 1,0 64z"
android:fillColor="#1990DF"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,128a384,384 0,1 0,0 768A384,384 0,0 0,512 128zM640,544L384,544a32,32 0,0 1,0 -64h256a32,32 0,0 1,0 64z"
android:fillColor="#F15A49"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,128a384,384 0,1 0,0 768A384,384 0,0 0,512 128zM640,544L544,544L544,640a32,32 0,0 1,-64 0L480,544L384,544a32,32 0,0 1,0 -64h96L480,384a32,32 0,0 1,64 0v96L640,480a32,32 0,0 1,0 64z"
android:fillColor="#E2E1DD"/>
</vector>

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:alpha="0.9"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="#FF000000"
android:pathData="M245,895.2l383.1,-383.1L240,124.1l0.1,-0c-12.7,-13.1 -20.5,-31 -20.5,-50.7 0,-40.4 32.7,-73.1 73.1,-73.1 19.7,0 37.6,7.8 50.7,20.5l0,-0 438.7,438.7 -0,0c13.8,13.3 22.4,31.9 22.4,52.6 0,0.1 0,0.1 0,0.2 0,0.1 0,0.1 0,0.1 0,20.7 -8.6,39.3 -22.4,52.6l0,0L343.4,1003.7l-0.2,-0.2c-13.1,12.6 -31,20.3 -50.6,20.3 -40.4,0 -73.1,-32.7 -73.1,-73.1C219.5,928.5 229.4,908.7 245,895.2z" />
</vector>

@ -0,0 +1,8 @@
<vector android:alpha="0.9" android:height="63dp"
android:viewportHeight="63" android:viewportWidth="61"
android:width="61dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M57,31.5C57,46.81 45.015,59 30.5,59C15.985,59 4,46.81 4,31.5C4,16.19 15.985,4 30.5,4C45.015,4 57,16.19 57,31.5Z"
android:strokeColor="#000000" android:strokeWidth="8"/>
<path android:fillColor="#000000" android:pathData="M31,31m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
</vector>

@ -0,0 +1,7 @@
<vector android:alpha="0.9" android:height="63dp"
android:viewportHeight="63" android:viewportWidth="61"
android:width="61dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M57,31.5C57,46.81 45.015,59 30.5,59C15.985,59 4,46.81 4,31.5C4,16.19 15.985,4 30.5,4C45.015,4 57,16.19 57,31.5Z"
android:strokeColor="#000000" android:strokeWidth="8"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="60dp"
android:viewportHeight="60" android:viewportWidth="60"
android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M30,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="128dp"
android:viewportHeight="1024" android:viewportWidth="1024"
android:width="128dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff" android:pathData="M512,0a512,512 0,0 0,0 1024c180.2,0 -110.6,-204.8 204.8,-204.8a302.1,302.1 0,0 0,307.2 -307.2A512,512 0,0 0,512 0zM179.2,486.4A76.8,76.8 0,1 1,256 409.6a76.8,76.8 0,0 1,-76.8 76.8zM358.4,307.2a76.8,76.8 0,1 1,76.8 -76.8A76.8,76.8 0,0 1,358.4 307.2zM665.6,307.2a76.8,76.8 0,1 1,76.8 -76.8A76.8,76.8 0,0 1,665.6 307.2zM844.8,486.4A76.8,76.8 0,1 1,921.6 409.6a76.8,76.8 0,0 1,-76.8 76.8z"/>
</vector>

@ -0,0 +1,7 @@
<vector android:alpha="0.9" android:height="78dp"
android:viewportHeight="78" android:viewportWidth="78"
android:width="78dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M6.56,34.55L34.844,6.266A6,6 83.168,0 1,43.329 6.266L71.613,34.55A6,6 59.997,0 1,71.613 43.036L43.329,71.32A6,6 128.156,0 1,34.844 71.32L6.56,43.036A6,6 102.15,0 1,6.56 34.55z"
android:strokeColor="#000000" android:strokeWidth="8"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="78dp"
android:viewportHeight="78" android:viewportWidth="78"
android:width="78dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M3.645,31.929L31.93,3.645A10,10 0,0 1,46.072 3.645L74.356,31.929A10,10 60.756,0 1,74.356 46.071L46.072,74.355A10,10 46.187,0 1,31.93 74.355L3.645,46.071A10,10 115.762,0 1,3.645 31.929z"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="59dp"
android:viewportHeight="59" android:viewportWidth="62"
android:width="62dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M29.163,1.265C29.857,-0.346 32.143,-0.346 32.837,1.265L39.994,17.884C40.283,18.556 40.917,19.017 41.646,19.084L59.663,20.756C61.41,20.918 62.116,23.091 60.798,24.25L47.204,36.191C46.654,36.674 46.412,37.419 46.573,38.134L50.551,55.785C50.937,57.497 49.088,58.84 47.579,57.944L32.021,48.706C31.392,48.333 30.608,48.333 29.979,48.706L14.421,57.944C12.912,58.84 11.063,57.497 11.449,55.785L15.427,38.134C15.588,37.419 15.346,36.674 14.796,36.191L1.202,24.25C-0.116,23.091 0.59,20.918 2.337,20.756L20.354,19.084C21.083,19.017 21.717,18.556 22.006,17.884L29.163,1.265Z"/>
</vector>

@ -0,0 +1,7 @@
<vector android:alpha="0.9" android:height="63dp"
android:viewportHeight="63" android:viewportWidth="61"
android:width="61dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M10,4L51,4A6,6 0,0 1,57 10L57,53A6,6 0,0 1,51 59L10,59A6,6 0,0 1,4 53L4,10A6,6 0,0 1,10 4z"
android:strokeColor="#000000" android:strokeWidth="8"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="60dp"
android:viewportHeight="60" android:viewportWidth="60"
android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M10,0L50,0A10,10 0,0 1,60 10L60,50A10,10 0,0 1,50 60L10,60A10,10 0,0 1,0 50L0,10A10,10 0,0 1,10 0z"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="64dp"
android:viewportHeight="64" android:viewportWidth="68"
android:width="68dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M34,0L43.463,21.975L67.287,24.184L49.312,39.975L54.572,63.316L34,51.1L13.427,63.316L18.688,39.975L0.713,24.184L24.537,21.975L34,0Z"/>
</vector>

@ -0,0 +1,7 @@
<vector android:alpha="0.9" android:height="54dp"
android:viewportHeight="54" android:viewportWidth="62"
android:width="62dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M29.268,49L5.019,7C4.249,5.667 5.212,4 6.751,4L55.249,4C56.788,4 57.751,5.667 56.981,7L32.732,49C31.962,50.333 30.038,50.333 29.268,49Z"
android:strokeColor="#000000" android:strokeWidth="8"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="54dp"
android:viewportHeight="54" android:viewportWidth="62"
android:width="62dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M36.196,51C33.887,55 28.113,55 25.804,51L1.555,9C-0.754,5 2.132,0 6.751,0L55.249,0C59.868,0 62.754,5 60.445,9L36.196,51Z"/>
</vector>

@ -0,0 +1,7 @@
<vector android:alpha="0.9" android:height="54dp"
android:viewportHeight="54" android:viewportWidth="62"
android:width="62dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000"
android:pathData="M32.732,5L56.981,47C57.751,48.333 56.788,50 55.249,50H6.751C5.212,50 4.249,48.333 5.019,47L29.268,5C30.038,3.667 31.962,3.667 32.732,5Z"
android:strokeColor="#000000" android:strokeWidth="8"/>
</vector>

@ -0,0 +1,5 @@
<vector android:alpha="0.9" android:height="54dp"
android:viewportHeight="54" android:viewportWidth="62"
android:width="62dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M25.804,3C28.113,-1 33.887,-1 36.196,3L60.445,45C62.754,49 59.868,54 55.249,54H6.751C2.132,54 -0.754,49 1.555,45L25.804,3Z"/>
</vector>

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M601,99.6a32,32 0,0 0,-8.1 63.5,380.4 380.4,0 0,1 175.7,70c-115.7,26.3 -150.9,106 -158.3,175 -10.7,99.7 60.2,152 107.2,186.6 16.5,12.2 41.4,30.5 42.5,39.1 0.2,1.2 -1,5.4 -6.6,12.4 -61.1,77 -83.8,140.8 -67.6,190 5,14.9 15.3,32.9 36.3,47.8A381.9,381.9 0,0 1,544 928c-3,0 -6,-0.4 -9,-0.4 40.1,-67.4 25.7,-118.3 3.4,-151.1 -54.1,-79.5 -134.9,-104.1 -211,-64.2 -5.3,2.8 -9.6,1.7 -34.4,-21.6 -24.4,-23 -63.2,-58.9 -120,-48.3 -5,-19.2 -9,-38.9 -11,-59.2a32.1,32.1 0,0 0,-35.1 -28.6c-17.6,1.8 -30.4,17.5 -28.6,35.1A446.5,446.5 0,0 0,544 992c247,0 448,-201 448,-448 0,-225 -168.1,-416.1 -391,-444.4zM195.1,704.3c18.4,0.7 33.1,13.2 54.1,32.9 24,22.6 60.4,56.7 108,31.7 63.3,-33.3 107.6,13 128.4,43.5 8.1,11.9 28.9,42.6 -22.4,106.8a381.9,381.9 0,0 1,-268 -214.9zM784.4,843c-21,-6 -33.8,-15.1 -37.8,-27.1 -8.5,-25.8 12.7,-74.4 56.9,-130 15.9,-20 22.6,-40.4 19.9,-60.7 -4.7,-35.5 -35.5,-58.2 -68,-82.1 -43.4,-32 -88.3,-65.1 -81.5,-128.2 5.5,-51.3 28.3,-118.3 156.7,-126.1A383.2,383.2 0,0 1,928 544c0,120.8 -56.2,228.5 -143.6,299z"
android:fillColor="#1781FF"/>
<path
android:pathData="M266.5,599.7a32,32 0,0 0,43.1 0C456.5,466 528,358.8 528,272 528,139.6 420.4,32 288,32S48,139.6 48,272c0,86.8 71.5,194 218.5,327.7zM288,96c97.1,0 176,78.9 176,176 0,43.9 -31.2,124.1 -176,260.4C143.2,396.1 112,315.9 112,272 112,174.9 190.9,96 288,96z"
android:fillColor="#1781FF"/>
<path
android:pathData="M288,272m-80,0a80,80 0,1 0,160 0,80 80,0 1,0 -160,0Z"
android:fillColor="#1781FF"/>
</vector>

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M601,99.6a32,32 0,0 0,-8.1 63.5,380.4 380.4,0 0,1 175.7,70c-115.7,26.3 -150.9,106 -158.3,175 -10.7,99.7 60.2,152 107.2,186.6 16.5,12.2 41.4,30.5 42.5,39.1 0.2,1.2 -1,5.4 -6.6,12.4 -61.1,77 -83.8,140.8 -67.6,190 5,14.9 15.3,32.9 36.3,47.8A381.9,381.9 0,0 1,544 928c-3,0 -6,-0.4 -9,-0.4 40.1,-67.4 25.7,-118.3 3.4,-151.1 -54.1,-79.5 -134.9,-104.1 -211,-64.2 -5.3,2.8 -9.6,1.7 -34.4,-21.6 -24.4,-23 -63.2,-58.9 -120,-48.3 -5,-19.2 -9,-38.9 -11,-59.2a32.1,32.1 0,0 0,-35.1 -28.6c-17.6,1.8 -30.4,17.5 -28.6,35.1A446.5,446.5 0,0 0,544 992c247,0 448,-201 448,-448 0,-225 -168.1,-416.1 -391,-444.4zM195.1,704.3c18.4,0.7 33.1,13.2 54.1,32.9 24,22.6 60.4,56.7 108,31.7 63.3,-33.3 107.6,13 128.4,43.5 8.1,11.9 28.9,42.6 -22.4,106.8a381.9,381.9 0,0 1,-268 -214.9zM784.4,843c-21,-6 -33.8,-15.1 -37.8,-27.1 -8.5,-25.8 12.7,-74.4 56.9,-130 15.9,-20 22.6,-40.4 19.9,-60.7 -4.7,-35.5 -35.5,-58.2 -68,-82.1 -43.4,-32 -88.3,-65.1 -81.5,-128.2 5.5,-51.3 28.3,-118.3 156.7,-126.1A383.2,383.2 0,0 1,928 544c0,120.8 -56.2,228.5 -143.6,299z"
android:fillColor="#E2E1DD"/>
<path
android:pathData="M266.5,599.7a32,32 0,0 0,43.1 0C456.5,466 528,358.8 528,272 528,139.6 420.4,32 288,32S48,139.6 48,272c0,86.8 71.5,194 218.5,327.7zM288,96c97.1,0 176,78.9 176,176 0,43.9 -31.2,124.1 -176,260.4C143.2,396.1 112,315.9 112,272 112,174.9 190.9,96 288,96z"
android:fillColor="#E2E1DD"/>
<path
android:pathData="M288,272m-80,0a80,80 0,1 0,160 0,80 80,0 1,0 -160,0Z"
android:fillColor="#E2E1DD"/>
</vector>

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M754.9,36.6H150.7c-66.7,0 -120.8,54.1 -120.8,120.8v725c0,66.7 54.1,120.8 120.8,120.8h323.7v-38H150.7c-41.8,1.5 -85,-49.5 -85,-82.8V157.4c0,-44.8 35.8,-85 85,-85h604.1c53.7,0 85.8,41 85.8,85v345.3l35.1,-60.4V157.4c0,-66.7 -54.1,-120.8 -120.8,-120.8z"
android:fillColor="#388E3C"/>
<path
android:pathData="M211.2,236.5v41.8h483.3v-41.8L211.2,236.5zM211.2,399.1h483.3v-41L211.2,358v41zM211.2,519.9h483.3v-42.5L211.2,477.4v42.5zM211.2,640.7h241.7v-40.3L211.2,600.4v40.3z"
android:fillColor="#388E3C"/>
<path
android:pathData="M978.8,580.3l-42.7,-42.7c-11.8,-11.8 -27.3,-17.7 -42.7,-17.7s-30.9,5.9 -42.7,17.7L591.3,796.9c-11.8,11.8 -47.9,57.5 -47.9,72.9l-30.2,133.4 133.3,-30.2s61.1,-36.1 72.9,-47.9L978.8,665.7c23.6,-23.6 23.6,-61.9 -0,-85.4zM698.2,903.7c-3.4,3.2 -15.2,11.2 -29.7,20.4l-78.3,-78.2c8,-11 17,-22.1 22.5,-27.6L808,623l85.4,85.4 -195.2,195.2z"
android:fillColor="#388E3C"/>
</vector>

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M358.4,960V64C358.4,28.7 329.8,0 294.4,0c-35.3,0 -64,28.7 -64,64v896c0,35.3 28.7,64 64,64 35.3,0 64,-28.7 64,-64zM793.6,960V64C793.6,28.7 764.9,0 729.6,0c-35.3,0 -64,28.7 -64,64v896c0,35.3 28.7,64 64,64 35.3,0 64,-28.7 64,-64z"
android:fillColor="#707070"/>
</vector>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<size android:height="1dp" />
<stroke
android:dashGap="4dp"
android:dashWidth="4dp"
android:width="1dp"
android:color="@color/black" />
</shape>

@ -0,0 +1,254 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:background="@drawable/rectangle_radius_5_white_full"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/name"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<com.bingce.ui.CleanableEditText
android:id="@+id/et_code_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:drawableRight="@mipmap/icon_clear"
android:gravity="end|center_vertical"
android:hint="@string/enter_code_name"
android:imeOptions="actionNext"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/black"
android:textColorHint="@color/color_999999"
android:textSize="14sp" />
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/point_code"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<com.bingce.ui.CleanableEditText
android:id="@+id/et_code"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:drawableRight="@mipmap/icon_clear"
android:gravity="end|center_vertical"
android:hint="@string/enter_code"
android:imeOptions="actionNext"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/black"
android:textColorHint="@color/color_999999"
android:textSize="14sp" />
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:background="@drawable/rectangle_radius_5_white_full"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_code_type"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/type"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_code_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="点"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more" />
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray" />
<RelativeLayout
android:id="@+id/rl_code_style"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/style"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center_vertical">
<ImageView
android:id="@+id/poinView"
android:layout_width="5dp"
android:layout_height="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/icon_code_circle_full" />
<View
android:id="@+id/lineView"
android:layout_width="45dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="@drawable/shape_line_dp1"
android:visibility="gone" />
<TextView
android:id="@+id/faceView"
android:layout_width="45dp"
android:layout_height="22dp"
android:layout_marginRight="5dp"
android:background="@drawable/rectangle_radius_3_theme_green_full"
android:visibility="gone" />
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more" />
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray" />
<RelativeLayout
android:id="@+id/rl_code_color"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/color"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_code_color_palette"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="5dp"
android:background="@drawable/icon_code_color_palette" />
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/add_code_btn_confirm"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:text="@string/confirm" />
</LinearLayout>

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/top_layout"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="@color/white"
android:elevation="3dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/ll_number"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="@string/number"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_code_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="0"
android:textColor="@color/nliveo_green_colorPrimaryDark"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="46dp"
android:layout_marginBottom="6dp"
android:layout_toEndOf="@+id/ll_number"
android:background="@drawable/rectangle_radius_5_gray_full">
<com.bingce.ui.CleanableEditText
android:id="@+id/etEnterNameCode"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:background="@null"
android:drawableEnd="@mipmap/icon_clear"
android:gravity="center_vertical"
android:imeOptions="actionDone"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/color_999999"
android:textSize="@dimen/NormalTextSize" />
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_import"
android:layout_width="46dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:gravity="center"
android:orientation="vertical"
android:layout_alignParentRight="true">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/icon_import_green" />
<TextView
android:id="@+id/tv_import"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/import1"
android:textColor="@color/black"
android:textSize="10sp"
android:textStyle="bold"/>
</LinearLayout>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_marginTop="@dimen/divider_height"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1"/>
<LinearLayout
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/code_library_btn_new"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_weight="1"
android:text="@string/create" />
<Button
android:id="@+id/code_library_btn_edit"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_weight="1"
android:text="@string/edit" />
<Button
android:id="@+id/code_library_btn_delete"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_weight="1"
android:text="@string/delete" />
<Button
android:id="@+id/code_library_btn_apply"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_weight="1"
android:text="@string/apply" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,13 @@
<?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">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_weight="1"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_code_color"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/rectangle_radius_5_white_full">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="@string/color"
android:textColor="@color/color_575757"
android:textSize="15sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/iv_code_color_palette"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:src="@drawable/icon_code_color_palette" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/rectangle_radius_5_white_full">
<com.shixia.colorpickerview.ColorPickerView
android:id="@+id/cpv_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/rectangle_radius_5_white_full"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<TextView
android:id="@+id/tv_color_rgb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="R:255 G:0 B:0"
android:textColor="#ff0000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_color_xml"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="#ff0000"
android:textColor="#ff0000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_color_xml_16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="#ffff0000"
android:textColor="#ff0000"
android:textSize="15dp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/picker_code_btn_confirm"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="@dimen/bt_height"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:text="@string/confirm" />
</LinearLayout>

@ -0,0 +1,463 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/ll_layout_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_status_limit"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/rectangle_radius_all_7_white_full">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/solution_status_limit"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_status_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="固定解"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/ll_hvpd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/rectangle_radius_all_7_white_full">
<RelativeLayout
android:id="@+id/rl_hrms_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/hrms_limit"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_hrms_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="0m"
android:textColor="@color/color_8a8a8a"
android:textSize="13.5sp" />
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray"/>
<RelativeLayout
android:id="@+id/rl_vrms_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/vrms_limit"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_vrms_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0m"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray"/>
<RelativeLayout
android:id="@+id/rl_pdop_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/pdop_limit"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_pdop_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_dividing_line_theme_gray"/>
<RelativeLayout
android:id="@+id/rl_age_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/diff_age_limit"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_age_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0s"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_specialty_setting"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/rectangle_radius_all_7_white_full">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/allow_repeat_point_name"/>
<Switch
android:id="@+id/switch_allow_repeat_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp" />
</RelativeLayout>
<View
android:id="@+id/line_add_step_name"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/theme_gray"/>
<RelativeLayout
android:id="@+id/rl_add_step_name_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/point_name_add_step"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_add_step_name_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<View
android:id="@+id/line_smooth_point_number"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/theme_gray"/>
<RelativeLayout
android:id="@+id/rl_smooth_point_number_limit"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/smooth_points_number"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_smooth_point_number_limit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0m"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<View
android:id="@+id/line_continue_survey_time_interval"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/theme_gray"/>
<RelativeLayout
android:id="@+id/rl_continue_survey_time_interval"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/continuous_survey_time_interval"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_continue_survey_time_interval"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0s"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
<View
android:id="@+id/line_continue_survey_distance_interval"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/theme_gray"/>
<RelativeLayout
android:id="@+id/rl_continue_survey_distance_interval"
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:textSize="15sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/continuous_survey_distance_interval"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginRight="15dp"
android:layout_alignParentRight="true">
<TextView
android:id="@+id/tv_continue_survey_distance_interval"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="13.5sp"
android:textColor="@color/color_8a8a8a"
android:text="0m"/>
<ImageView
android:layout_width="13sp"
android:layout_height="wrap_content"
android:src="@drawable/icon_black_line_more"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_set"
android:layout_width="42dp"
android:layout_height="42dp"
android:background="@drawable/rectangle_radius_all_5_white_full"
android:gravity="center">
<ImageView
android:id="@+id/iv_survey_setting"
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/icon_survey_setting_gray" />
</LinearLayout>
<com.bingce.surveyor.widget.ExpandLayout
android:id="@+id/expand_layout"
android:layout_width="42dp"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_set"
android:layout_marginTop="5dp"
android:background="@drawable/rectangle_radius_all_5_white_full"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_top_tool"
android:layout_width="match_parent"
android:layout_height="25dp"
android:gravity="center">
<ImageView
android:id="@+id/iv_tool"
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@mipmap/icon_new_down_gray_arrow" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_position_center"
android:layout_width="match_parent"
android:layout_height="50dp">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_EBEBEB" />
<ImageView
android:id="@+id/iv_position_center"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="2dp"
android:src="@drawable/icon_survey_position_center_gray" />
<TextView
android:id="@+id/tv_position_center"
android:layout_width="34dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:gravity="center_horizontal"
android:text="@string/center_in"
android:textColor="@color/color_BCBCBC"
android:textSize="9sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_full_screen"
android:layout_width="match_parent"
android:layout_height="50dp">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_EBEBEB" />
<ImageView
android:id="@+id/iv_full_screen"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="2dp"
android:src="@drawable/icon_survey_full_screen" />
<TextView
android:id="@+id/tv_full_screen"
android:layout_width="34dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:gravity="center_horizontal"
android:text="@string/full_view"
android:textColor="@color/black"
android:textSize="9sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_target_flag"
android:layout_width="match_parent"
android:layout_height="50dp"
android:visibility="gone"
tools:visibility="visible">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_EBEBEB" />
<ImageView
android:id="@+id/iv_target_flag"
android:layout_width="35.5dp"
android:layout_height="35.5dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="2dp"
android:src="@drawable/icon_target_flag_black" />
<TextView
android:id="@+id/tv_target_flag"
android:layout_width="34dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:gravity="center_horizontal"
android:text="@string/input_point"
android:textColor="@color/black"
android:textSize="9sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_input_current_point"
android:layout_width="match_parent"
android:layout_height="50dp">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_EBEBEB" />
<ImageView
android:id="@+id/iv_input_current_point"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="2dp"
android:src="@drawable/icon_input_current_point_black" />
<TextView
android:id="@+id/tv_input_current_point"
android:layout_width="34dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:gravity="center_horizontal"
android:text="@string/position_point"
android:textColor="@color/black"
android:textSize="9sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_tilt_prim_auto"
android:layout_width="match_parent"
android:layout_height="50dp">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_EBEBEB" />
<ImageView
android:id="@+id/iv_tilt_prim_auto"
android:layout_width="35.5dp"
android:layout_height="35.5dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="1dp"
android:src="@drawable/icon_survey_tilt_gray" />
<TextView
android:id="@+id/tv_tilt_prim_auto"
android:layout_width="34dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:gravity="center_horizontal"
android:text="@string/tilt"
android:textColor="@color/color_BCBCBC"
android:textSize="9sp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
</com.bingce.surveyor.widget.ExpandLayout>
</LinearLayout>

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/rl_item_view"
android:layout_width="match_parent"
android:layout_height="58dp"
android:background="@color/white"
android:layout_marginBottom="@dimen/divider_height">
<RelativeLayout
android:id="@+id/rl_group_type"
android:layout_width="58dp"
android:layout_height="match_parent"
android:gravity="center_vertical">
<ImageView
android:id="@+id/poinView"
android:layout_width="9dp"
android:layout_height="9dp"
android:layout_centerInParent="true"
android:visibility="gone"
android:src="@drawable/icon_code_circle_full"/>
<View
android:id="@+id/lineView"
android:layout_width="28dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
android:background="@drawable/shape_line_dp1" />
<TextView
android:id="@+id/faceView"
android:layout_width="28dp"
android:layout_height="14dp"
android:layout_centerInParent="true"
android:visibility="gone"
android:background="@drawable/rectangle_radius_3_theme_green_full" />
</RelativeLayout>
<TextView
android:id="@+id/tv_code_name"
android:layout_toRightOf="@+id/rl_group_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="航行灯塔"
android:layout_centerVertical="true"
android:textColor="@color/color_575757"
android:textSize="16sp"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/tv_code_name"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:text="()"
android:textSize="13sp"
android:textColor="@color/color_999999"/>
<ImageView
android:id="@+id/iv_checkbox"
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:src="@mipmap/icon_checkbox_unselect_ovel"/>
</RelativeLayout>
</RelativeLayout>

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_point_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点名"
android:textColor="@color/color_575757"
android:textStyle="bold"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_prompt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_x"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="北坐标:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_y"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="东坐标:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_z"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="大地高:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_latitude"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="纬度:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_longitude"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="经度:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_altitude"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="海拔:"
android:textColor="@color/color_777777"
android:textStyle="bold"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="#D1D1D1"/>
</LinearLayout>

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.bingce.surveyor.widget.DraggingButton
android:id="@+id/dr_watch_survey"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_gravity="right"
android:layout_marginLeft="5dp"
android:layout_marginBottom="165dp"
android:background="@drawable/focused_pressed_oval_white_green"
android:gravity="center"
android:orientation="vertical"
android:text="@string/measure_sort"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />
<com.bingce.surveyor.widget.DraggingButton
android:id="@+id/dr_watch_survey_record"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="left"
android:layout_marginRight="5dp"
android:layout_marginBottom="165dp"
android:background="@drawable/focused_pressed_oval_white_green"
android:gravity="center"
android:orientation="vertical"
android:text="@string/record"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
</RelativeLayout>

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:id="@+id/v_line"
android:layout_width="4dp"
android:layout_height="14dp"
android:background="@drawable/rectangle_radius_20_green_full" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:gravity="center_vertical"
android:textAppearance="@style/MyTextAppearanceBody1"
android:textSize="14sp"
android:textStyle="bold"
tools:text="标题" />
<TextView
android:id="@+id/tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:gravity="center_vertical"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:textAppearance="@style/MyTextAppearanceBody1"
android:textSize="12sp"
tools:text="描述文本" />
</LinearLayout>

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<com.project.survey.widget.bingce.dragdrop.SquareRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/squareRelativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_grid_press">
<LinearLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="20dp"
android:background="@null"
android:contentDescription="@string/app_name"
android:scaleType="centerInside" />
<TextView
android:id="@+id/text"
android:layout_marginTop="2dp"
android:lines="2"
android:textSize="12sp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:gravity="center_horizontal"
android:textColor="@color/black"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageView
android:id="@+id/btn"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:background="@null"
android:contentDescription="@string/app_name"
android:padding="4dp"
android:scaleType="centerInside"
android:src="@drawable/ic_block_add" />
</com.project.survey.widget.bingce.dragdrop.SquareRelativeLayout>

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="280dp"
android:layout_height="wrap_content"
android:background="@drawable/rectangle_radius_5_white_full"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/prompt"
android:textColor="@color/black"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_detail"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="15dp"
android:text="@string/detail"
android:textColor="@color/color_1781FF"
android:gravity="center"
android:textSize="13sp"
android:textStyle="bold"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />
</RelativeLayout>
<lecho.hellocharts.view.LineChartView
android:id="@+id/line_chart_view_dialog"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@color/color_EBEBEB"/>
<LinearLayout
android:id="@+id/ll_button"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/btn_cancel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/cancel"
android:textColor="@color/color_575757"
android:textSize="13sp"
android:textStyle="bold" />
<TextView
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/confirm"
android:textColor="@color/color_575757"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_pole_hr_height"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_pole_hr_height"
android:layout_width="20dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_pole_high" />
<com.bingce.device.ui.widget.BingCeTextView
android:id="@+id/tv_pole_hr_height"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="0.00m"
android:textAppearance="@style/MyTextAppearanceBody1"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -19,4 +19,13 @@
<item name="android:windowExitAnimation">@anim/pop_add_hide</item>
</style>
<style name="gif_dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/rectangle_radius_all_7_white_full</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
</resources>

@ -172,5 +172,78 @@
<string name="no_remark">未备注</string>
<string name="continuous_same_time">连时</string>
<string name="quick_point">快速点</string>
<string name="hrms_limit">HRMS限制</string>
<string name="vrms_limit">VRMS限制</string>
<string name="pdop_limit">PDOP限制</string>
<string name="diff_age_limit">延迟限制</string>
<string name="ts_survey_setting">全站仪测量设置</string>
<string name="topographic_point">地形点</string>
<string name="continuity_point">连续点</string>
<string name="rtk_survey">RTK测量</string>
<string name="point_name_add_step">点名累加步长</string>
<string name="smooth_points_number">平滑点数</string>
<string name="continuous_survey_time_interval">连续测量时间间隔</string>
<string name="continuous_survey_distance_interval">连续测量距离间隔</string>
<string name="code_library">编码库</string>
<string name="select_survey_point_type">选择测量点类型</string>
<string name="continuous_same_distance">连距</string>
<string name="continuous_point_measurement_method">连续点测量方式</string>
<string name="tip">提示</string>
<string name="pull_up_edit_information_bar_displayed">继续上拉,可对底部信息栏所显示的信息,进行编辑</string>
<string name="press_hold_drag_adjust_order">按住可拖动调整顺序</string>
<string name="have_remark">已备注</string>
<string name="please_input_control_point_name">请先输入要测量的控制点点名</string>
<string name="control_points_being_collected">控制点采集中</string>
<string name="topographic_points_being_collected">地形点采集中</string>
<string name="point_name_cannot_be_empty">点名不能为空</string>
<string name="record_failed_exists_same_name_point">记录失败,点库里已经存在同名点,可以修改设置允许重名</string>
<string name="coordinate_information">坐标信息</string>
<string name="base_information">基站信息</string>
<string name="survey_information">测量信息</string>
<string name="projection_space_distance_comment">投影距离:与上一个点的投影距离。(空间距离同理)</string>
<string name="base_distance">基站距离</string>
<string name="speed">速度</string>
<string name="forward_angle">前进方位</string>
<string name="projection_distance">投影距离</string>
<string name="space_distance">空间距离</string>
<string name="computational_information">计算信息</string>
<string name="add_up_plane_distance">累计平距</string>
<string name="add_up_space_distance">累计斜距</string>
<string name="target_information">目标信息</string>
<string name="measured_information">实测信息</string>
<string name="distance_information">距离信息</string>
<string name="please_note_select_line_function">(请注意仅用于选线放样功能)</string>
<string name="target_x">目标 X</string>
<string name="target_y">目标 Y</string>
<string name="target_z">目标 Z</string>
<string name="target_mileage">目标里程</string>
<string name="target_offset">目标偏距</string>
<string name="design_height">设计高程</string>
<string name="design_z">设计Z坐标</string>
<string name="design_h">设计标高</string>
<string name="survey_x">实测 X</string>
<string name="survey_y">实测 Y</string>
<string name="survey_z">实测 Z</string>
<string name="survey_mileage">实测里程</string>
<string name="survey_offset">实测偏距</string>
<string name="start_distance">起点距</string>
<string name="end_distance">终点距</string>
<string name="base_info_not_received">未收到基站信息</string>
<string name="selected_display_information_not_exceed">选中的展示信息不能超过</string>
<string name="ge"></string>
<string name="show_information">展示信息</string>
<string name="allow_repeat_point_name">允许测量点名重复</string>
<string name="record_list">记录列表</string>
<string name="average_coordinates_calculation_way">坐标计算方式取平均值</string>
<string name="enter_code_name">请输入编码名称</string>
<string name="type">类型</string>
<string name="style">样式</string>
<string name="color">颜色</string>
<string name="add">新建</string>
<string name="point"></string>
<string name="surface"></string>
<string name="add_success">添加成功!</string>
<string name="picker_color">选择颜色</string>
</resources>

@ -111,4 +111,12 @@
<item name="android:windowExitAnimation">@anim/dialog_exit_bottom</item>
</style>
<declare-styleable name="BottomSheetBehavior_Layout">
<attr name="behavior_peekHeight" format="dimension" />
<attr name="behavior_hideAble" format="boolean" />
<attr name="behavior_skipCollapse" format="dimension" />
<attr name="behavior_middleHeight" format="dimension" />
<attr name="behavior_fitToContents" format="boolean" />
</declare-styleable>
</resources>

Loading…
Cancel
Save