修改bug ,腾讯网络信号为无的时候,使用GPS生成轨迹,

This commit is contained in:
wangdongsheng
2021-12-14 10:39:34 +08:00
parent 9f6a3a1cfe
commit b480884205
83 changed files with 970 additions and 1362 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ android {
applicationId "com.navinfo.outdoor"
minSdkVersion 22
targetSdkVersion 30
versionCode 10
versionName "7.1130"
versionCode 11
versionName "8.1210"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
-1
View File
@@ -51,7 +51,6 @@
android:supportsRtl="true"
android:theme="@style/Theme.WhiteScreen"
tools:targetApi="n">
<activity android:name=".activity.LinkActivity" />
<activity android:name=".activity.RegardMapActivity" />
<activity android:name=".activity.StatementActivity" />
<activity
@@ -6,7 +6,6 @@ import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseActivity;
import com.navinfo.outdoor.fragment.AboutFragment;
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment;
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment2;
import com.navinfo.outdoor.fragment.CapacityMeasurementFragment;
import com.navinfo.outdoor.fragment.ChargingPileFragment;
import com.navinfo.outdoor.fragment.ContactFragment;
@@ -31,7 +30,6 @@ import com.navinfo.outdoor.fragment.RecordFragment;
import com.navinfo.outdoor.fragment.RoadFragment;
import com.navinfo.outdoor.fragment.SetFragment;
import com.navinfo.outdoor.fragment.StaySubmitFragment;
import com.navinfo.outdoor.fragment.TaskExWebFragment;
import com.navinfo.outdoor.fragment.TaskExplainFragment;
import com.navinfo.outdoor.fragment.TaskExplainFragment2;
import com.navinfo.outdoor.fragment.TaskPrefectureFragment;
@@ -45,12 +43,12 @@ import com.gyf.immersionbar.ImmersionBar;
import com.navinfo.outdoor.fragment.WithdrawalRecordFragment;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
/**
* fragment 管理作用
* 对所有fragment 进行管理:
*
*/
public class FragmentManagement extends BaseActivity {
@@ -66,8 +64,6 @@ public class FragmentManagement extends BaseActivity {
private EventPrefectureFragment eventPrefectureFragment;//发现-活动专区的fragment -9
private TaskExplainFragment2 taskExplainFragment2;//发现-任务说明点击Item进入fragment -10
private CapacityEvaluationFragment capacityEvaluationFragment;//发现-能力测评fragment -11
private CapacityEvaluationFragment2 capacityEvaluationFragment2;//发现-能力测评2的fragment -12
private TaskExWebFragment taskExWebFragment;//发现-任务说明点击Item进入Web页面的fragment -13
private CapacityMeasurementFragment capacityMeasurementFragment;//发现-能力测评item点击跳转web的fragment -14
private WithdrawFragment withdrawFragment;//我的-提现的fragment -15
private IssueWebFragment issueWebFragment;//我的-常见问题-web的fragment -16
@@ -133,10 +129,6 @@ public class FragmentManagement extends BaseActivity {
fragmentTransaction.hide(taskExplainFragment2);
if (capacityEvaluationFragment != null)//发现-能力测评fragment -11
fragmentTransaction.hide(capacityEvaluationFragment);
if (capacityEvaluationFragment2 != null)//发现-能力测评2的fragment -12
fragmentTransaction.hide(capacityEvaluationFragment2);
if (taskExWebFragment != null)//发现-任务说明点击Item进入Web页面的fragment -13
fragmentTransaction.hide(taskExWebFragment);
if (capacityMeasurementFragment != null)//发现-能力测评item点击跳转web的fragment -14
fragmentTransaction.hide(capacityMeasurementFragment);
if (withdrawFragment != null)//我的-提现的fragment -15
@@ -282,22 +274,6 @@ public class FragmentManagement extends BaseActivity {
fragmentTransaction.show(capacityEvaluationFragment);
}
break;
case 12://发现-能力测评2的fragment
if (capacityEvaluationFragment2 == null) {
capacityEvaluationFragment2 = CapacityEvaluationFragment2.newInstance(new Bundle());
fragmentTransaction.add(R.id.frame_layout, capacityEvaluationFragment2);
} else {
fragmentTransaction.show(capacityEvaluationFragment2);
}
break;
case 13://发现-任务说明点击Item进入Web页面的fragment
if (taskExWebFragment == null) {
taskExWebFragment = TaskExWebFragment.newInstance(new Bundle());
fragmentTransaction.add(R.id.frame_layout, taskExWebFragment);
} else {
fragmentTransaction.show(taskExWebFragment);
}
break;
case 14://发现-能力测评item点击跳转测试的fragment
if (capacityMeasurementFragment == null) {
capacityMeasurementFragment = CapacityMeasurementFragment.newInstance(new Bundle());
@@ -320,9 +320,11 @@ public class GuidanceActivity extends BaseActivity {
protected void onDestroy() {
super.onDestroy();
frameLayout.removeAllViews();
if (guidanceBuilder!=null) {
guidanceBuilder.append(TimestampUtil.time()).append("onDestroy");
guidanceBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), guidanceBuilder.toString(), true);
}
}
}
@@ -50,6 +50,7 @@ import java.util.Objects;
/**
* 首页
* tabLayout + viewPager
*/
public class HomeActivity extends BaseActivity {
private TabLayout mTab;
@@ -15,7 +15,7 @@ import com.navinfo.outdoor.base.BaseActivity;
import java.util.ArrayList;
/**
* 点击查看大
* 点击图片列表 图片详情页面
*/
public class ImageShowActivity extends BaseActivity implements View.OnClickListener {
private ViewPager image_pager;
@@ -1,46 +0,0 @@
package com.navinfo.outdoor.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseActivity;
public class LinkActivity extends BaseActivity implements View.OnClickListener {
@Override
protected int getLayout() {
return R.layout.activity_link;
}
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void initView() {
super.initView();
String url = getIntent().getStringExtra("url");
ImageView ivIcon = findViewById(R.id.iv_icon);
ivIcon.setOnClickListener(this);
WebView linkWeb = findViewById(R.id.link_web);
linkWeb.getSettings().setBlockNetworkImage(false);
WebSettings settings = linkWeb.getSettings();
settings.setJavaScriptEnabled(true);
linkWeb.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
settings.setBuiltInZoomControls(false);
linkWeb.loadUrl(url);
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.iv_icon) {
finish();
}
}
}
@@ -192,6 +192,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
}
}
/**
* 登录获取 token
* @param name
* @param paw
*/
private void initLogIn(String name, String paw) {
try {
HttpParams httpParams = new HttpParams();
@@ -259,6 +264,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
}
}
/**
* 获取用户信息 通过SharedPreferences 进行存储
*/
private void initGetUserInfo() {
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(30)
@@ -359,9 +367,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
@Override
public void onDestroy() {
super.onDestroy();
if (loginBuilder!=null) {
loginBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
loginBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true);
}
if (EventBus.getDefault().isRegistered(this)) {//加上判断
EventBus.getDefault().unregister(this);
}
@@ -55,6 +55,8 @@ import java.util.List;
/**
* 启动页
* 包含 升级
* 以及自启动 (获取token 获取用户信息)
*/
public class MainActivity extends BaseActivity {
@@ -94,6 +96,9 @@ public class MainActivity extends BaseActivity {
return R.layout.activity_main;
}
/**
* 申请权限
*/
private void initPermission() {
XXPermissions.with(this)
// 申请安装包权限
@@ -128,6 +133,7 @@ public class MainActivity extends BaseActivity {
HttpInterface.initAppPath(Constant.USHERED);
Constant.initRootFolder(Constant.USHERED);
HttpInterface.initHttpInter(Constant.USHERED);
//
initCheckVersion();
} else {
initTime();
@@ -156,20 +162,23 @@ public class MainActivity extends BaseActivity {
});
}
/**
* 升级下载
*/
private void initCheckVersion() {
int versionCode = APKVersionCodeUtils.getVersionCode(this);//获取当前版本号
HttpParams httpParams = new HttpParams();
httpParams.put("version", versionCode);
httpParams.put("operationType", "android");
showLoadingDialog();
OkGoBuilder.getInstance()
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(0)
.Builder(this)
.url(HttpInterface.APP_CHECK_VERSION)
.params(httpParams)
.cls(ApkVersionBean.class)
.token(Constant.ACCESS_TOKEN)
.getRequest(new Callback<ApkVersionBean>() {
.token(Constant.ACCESS_TOKEN);
okGoBuilder.getRequest(new Callback<ApkVersionBean>() {
@Override
public void onSuccess(ApkVersionBean response, int id) {
dismissLoadingDialog();
@@ -186,6 +195,7 @@ public class MainActivity extends BaseActivity {
initTime();
}
}
@Override
public void onError(Throwable e, int id) {
dismissLoadingDialog();
@@ -268,6 +278,9 @@ public class MainActivity extends BaseActivity {
}
}
/**
* 获取用户信息
*/
private void initGetUserInfo() {
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(30)
@@ -330,7 +343,6 @@ public class MainActivity extends BaseActivity {
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
}
@@ -347,7 +359,9 @@ public class MainActivity extends BaseActivity {
}
});
}
/*
*获取token
*/
private void initLogIn() {
try {
HttpParams httpParams = new HttpParams();
@@ -390,7 +404,8 @@ public class MainActivity extends BaseActivity {
}
@Override
public void uploadProgress(Progress progress) { }
public void uploadProgress(Progress progress) {
}
@Override
public void onError(Throwable e, int id) {
@@ -52,7 +52,7 @@ import java.util.Objects;
/**
* 片对应
* 相机拍
*/
public class PhotographActivity extends BaseActivity implements View.OnClickListener {
private static final CameraLogger LOG = CameraLogger.create("Picture");
@@ -208,9 +208,11 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
protected void onDestroy() {
super.onDestroy();
cameraView.destroy();
if (photographBuilder!=null) {
photographBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
photographBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
}
if (EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().unregister(this);
}
@@ -86,6 +86,9 @@ import java.util.TimerTask;
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
/**
* 视频
*/
public class PictureActivity extends BaseActivity implements View.OnClickListener {
private static final CameraLogger LOG = CameraLogger.create("Picture");
private CameraView camera;
@@ -45,6 +45,7 @@ import com.navinfo.outdoor.util.BackHandlerHelper;
import com.navinfo.outdoor.util.GPSUtils;
import com.navinfo.outdoor.util.Geohash;
import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.Gps;
import com.navinfo.outdoor.util.MyTecentLocationSource;
import com.navinfo.outdoor.util.SystemTTS;
import com.navinfo.outdoor.util.TimestampUtil;
@@ -97,6 +98,10 @@ import java.util.concurrent.Future;
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
/**
* 拍照
* poi录像 道路
*/
public class PicturesActivity extends BaseActivity implements View.OnClickListener {
private static final CameraLogger LOG = CameraLogger.create("Picture");
private CameraView camera;
@@ -106,7 +111,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
private Polyline polyline;
private String finalVideoPath, geoWkt, detail; // 摄像后最终保存的文件名
private ViewGroup layerChange; // 切换地图和相机的父控件
private CheckBox capturePicture, cbMapType; //拍照
private CheckBox capturePicture; //拍照
private File paperFile, logFile;
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
private TencentLocation oldCurrentLocation = null;
@@ -148,6 +153,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
return false;
}
});
private boolean booleanExtra;
@Override
protected int getLayout() {
@@ -164,6 +170,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
type = getIntent().getIntExtra(Constant.INTENT_TYPE, 0);
geoWkt = getIntent().getStringExtra(Constant.INTENT_GEO_WKT);
detail = getIntent().getStringExtra(Constant.INTENT_DETAIL);
booleanExtra = getIntent().getBooleanExtra(Constant.INTENT_BOOLEAN, true);
if (finalVideoPath != null) {
File file = new File(finalVideoPath);
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
@@ -327,7 +334,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
result.toFile(file, new FileCallback() {
@Override
public void onFileReady(@Nullable File file) {
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, 0));
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, 0, booleanExtra));
}
});
} else {
@@ -366,18 +373,20 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
//private PictureResult pictureResult;
private File file;
private int count;
private boolean isBoolean;
// 该转换执行次数如果连续3次执行失败则不再转换
public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count) {
public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count, boolean isBoolean) {
//this.pictureResult = pictureResult;
this.file = file;
this.count = count;
this.isBoolean = isBoolean;
}
@Override
public void run() {
if (file.exists() && file != null) {
initWeb(file, count);
initWeb(file, count, isBoolean);
if (count <= 0) { // 不是重新转换webp流程
runOnUiThread(new Runnable() {
@SuppressLint("SetTextI18n")
@@ -385,7 +394,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
public void run() {
if (PicturesActivity.this != null) {
if (file.exists()) {
initMarker();
initMarker(isBoolean);
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
tvTitle.setText("保存成功:" + (videoIndex + 1));
@@ -418,7 +427,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
}
}
private void initWeb(File file, int count) {
private void initWeb(File file, int count, boolean isBoolean) {
try {
count++;
WebPNative webPNative = new WebPNative();
@@ -437,7 +446,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
UMCrashManager.reportCrash(this, e);
if (count < 3) {
//当尝试次数小于3次则加入转换队列尝试重新转换
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, count));
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, count, isBoolean));
}
}
}
@@ -546,6 +555,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
Intent intent = new Intent();
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
intent.putExtra(Constant.INTENT_BOOLEAN,booleanExtra);
setResult(0x111, intent);
PicturesActivity.this.finish();
break;
@@ -736,9 +746,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
removables.get(i).remove();
}
removables.clear();
if (picturesBuilder != null) {
picturesBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
picturesBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
}
if (EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().unregister(this);
}
@@ -800,9 +812,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
sb.append(initCount);
sb.append(",");
if (gpsLocation != null) {
sb.append(gpsLocation.getLatitude());
double[] doubles = Gps.toGCJ02Point(gpsLocation.getLatitude(), gpsLocation.getLongitude());
sb.append(doubles[0]);
sb.append(",");
sb.append(gpsLocation.getLongitude());
sb.append(doubles[1]);
} else {
sb.append(0);
sb.append(",");
@@ -917,8 +930,21 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
});
}
public void initMarker() {
LatLng latLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
/**
* 腾讯轨迹点
*/
public void initMarker(boolean isOration) {
LatLng latLng = null;
if (isOration) {
latLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
} else {
if (gpsLocation == null) {
latLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
} else {
double[] doubles = Gps.toGCJ02Point(gpsLocation.getLatitude(), gpsLocation.getLongitude());
latLng = new LatLng(doubles[0],doubles[1]);
}
}
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory
.fromResource(R.drawable.circle);
Marker marker = tencentMap.addMarker(new MarkerOptions(latLng)
@@ -9,7 +9,7 @@ import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseActivity;
/*
* 地图寻宝-关于地图的web页面
* 地图寻宝-我的-关于地图的web页面
* */
public class RegardMapActivity extends BaseActivity implements View.OnClickListener {
@@ -8,6 +8,9 @@ import android.widget.TextView;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseActivity;
/**
* 登录-用户协议展示页面
*/
public class StatementActivity extends BaseActivity implements View.OnClickListener{
@Override
@@ -157,7 +157,11 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
break;
case R.id.btn_gathering:
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去绑定的返回 ,");
if (Constant.AUDIOTAPES == -1) {
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
gatheringIntent.putExtra("tag", 24);
startActivity(gatheringIntent);
/* if (Constant.AUDIOTAPES == -1) {
ToastUtils.Message(UserActivity.this,"请先实名认证");
} else if (Constant.AUDIOTAPES == 1) {//认证通过
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
@@ -165,7 +169,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
startActivity(gatheringIntent);
} else if (Constant.AUDIOTAPES == 0) {
ToastUtils.Message(this,Constant.AUDITING + "");
}
}*/
break;
case R.id.btn_attestations:
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去认证的返回 ,");
@@ -415,8 +419,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
@Override
protected void onDestroy() {
super.onDestroy();
if (userBuilder!=null) {
userBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
userBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
}
}
}
@@ -21,7 +21,7 @@ import com.navinfo.outdoor.util.ToastUtils;
import java.util.HashMap;
import java.util.Map;
/**
* 详情页
* 统一的详情页
*/
public class WebActivity extends BaseActivity implements View.OnClickListener {
private WebView nWebView;
@@ -1,5 +1,6 @@
package com.navinfo.outdoor.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
@@ -37,6 +38,7 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
return new ViewHolder(capacity);
}
@SuppressLint("SetTextI18n")
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
TaskPrefectureBean.BodyBean.ListBean listBean = capacityList.get(position);
@@ -51,7 +53,6 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
}else {
holder.tvResults.setText("不通过");
}
Glide.with(context).load(listBean.getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
@@ -1,84 +0,0 @@
package com.navinfo.outdoor.adapter;
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.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.bean.TaskPrefectureBean;
import java.util.ArrayList;
import java.util.List;
public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapter.ViewHolder> {
private List<TaskPrefectureBean.BodyBean.ListBean> capItemList = new ArrayList<>();
private Context context;
public CapacityItemAdapter(Context context) {
this.context = context;
}
public void setCapItemList(List<TaskPrefectureBean.BodyBean.ListBean> capItemList) {
this.capItemList.addAll(capItemList);
notifyDataSetChanged();
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
final View capItem = LayoutInflater.from(context).inflate(R.layout.capacity_item, parent, false);
return new ViewHolder(capItem);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.tvCapItem.setText(capItemList.get(position).getTitle());
holder.tvReams.setText((Integer) capItemList.get(position).getStatus());
Glide.with(context).load(capItemList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapItem);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (setOnClick!=null){
setOnClick.onClick(position);
}
}
});
}
@Override
public int getItemCount() {
return capItemList.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder {
ImageView ivCapItem;
TextView tvCapItem;
TextView tvReams;
public ViewHolder(@NonNull View itemView) {
super(itemView);
ivCapItem = itemView.findViewById(R.id.iv_tas_capacity);
tvCapItem = itemView.findViewById(R.id.tas_capacity_title);
tvReams = itemView.findViewById(R.id.tv_capacity_through);
}
}
public interface setOnClick{
void onClick(int position);
}
private setOnClick setOnClick;
public void setSetOnClick(setOnClick setOnClick) {
this.setOnClick = setOnClick;
}
}
@@ -56,8 +56,6 @@ public class ChargingPileAdapter extends RecyclerView.Adapter<ChargingPileAdapte
}else {
holder.rlItem.setBackgroundColor(Color.parseColor("#4CEF6F"));
}
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -84,6 +82,7 @@ public class ChargingPileAdapter extends RecyclerView.Adapter<ChargingPileAdapte
textView=itemView.findViewById(R.id.tv_text);
}
}
private onLickItem onLickItem;
public void setOnLickItem(onLickItem onLickItem) {
@@ -54,9 +54,7 @@ public class EventPrefectureAdapter extends RecyclerView.Adapter<EventPrefecture
}
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView tvTitle;
TextView tvDest;
TextView tvTime;
TextView tvTitle, tvDest, tvTime;
public ViewHolder(@NonNull View itemView) {
super(itemView);
tvTitle=itemView.findViewById(R.id.tv_title);
@@ -98,7 +98,6 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
holder.cbFilter.setEnabled(false);
holder.tvTaskStatus.setTextColor(Color.parseColor("#1CEF7B"));
}
if (poiEntity.getIsLocalData() == 2) {
holder.cbFilter.setVisibility(View.VISIBLE);
holder.constraintLayout.setEnabled(false);
@@ -57,7 +57,7 @@ public class ImagePagerAdapter extends PagerAdapter {
@Override
public Object instantiateItem(@NotNull ViewGroup container, int position) {
View view = LayoutInflater.from(context).inflate(R.layout.details_imageshow_item, null);
full_image = (ImageView)view.findViewById(R.id.full_image);
full_image = view.findViewById(R.id.full_image);
Glide.with(context).load(impsUrl.get(position)).into(full_image);
((ViewPager) container).addView(view);
return view;
@@ -67,4 +67,5 @@ public class ImagePagerAdapter extends PagerAdapter {
public void destroyItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
((ViewPager) container).removeView((View) object);
}
}
@@ -71,4 +71,5 @@ public class IssueProblemAdapter extends RecyclerView.Adapter<IssueProblemAdapte
public void setOnIssueClick(OnIssueClick onIssueClick) {
this.onIssueClick = onIssueClick;
}
}
@@ -107,6 +107,7 @@ public class MarkerAdapter extends RecyclerView.Adapter<MarkerAdapter.ViewHolder
ivIcon=itemView.findViewById(R.id.iv_icon);
}
}
public interface OnBankClick {
void onClick(PoiEntity poiEntity);
}
@@ -71,6 +71,7 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
tvMessageTime = itemView.findViewById(R.id.tv_message_time);
}
}
public messageClickItem messageClickItem;
public void setMessageClickItem(messageClickItem messageClickItem) {
@@ -140,7 +140,6 @@ public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.ViewHolder>
static class ViewHolder extends RecyclerView.ViewHolder {
private ImageView ivPhoto;
private CheckBox cbPhoto;
public ViewHolder(@NonNull View itemView) {
super(itemView);
ivPhoto = itemView.findViewById(R.id.iv_photo);
@@ -1,197 +0,0 @@
package com.navinfo.outdoor.adapter;
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.bean.PhoneBean;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
/**
* poi 适配器
*/
public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.MyViewHolder> {
private Context context;
private List<PhoneBean> list=new ArrayList<>();
public PoiRecycleAdapter(Context context) {
this.context = context;
}
public void setList(List<PhoneBean> list) {
this.list.addAll(list);
notifyDataSetChanged();
}
public boolean getPhoneBean(){
for (int i = 0; i < list.size(); i++) {
PhoneBean poiBean = list.get(i);
if (poiBean.getPhone()==null){
return false;
}
}
return true;
}
public String getList() {
StringBuilder a= new StringBuilder();
for (int i = 0; i < list.size(); i++) {
PhoneBean poiBean = list.get(i);
if (list.size()==1){
if(poiBean.getPhone().indexOf('1')==0){
a = new StringBuilder(poiBean.getPhone());
}else {
a = new StringBuilder(poiBean.getArea() + "-" + poiBean.getPhone());
}
}else {
if (i==list.size()-1){
if(poiBean.getPhone().indexOf('1')==0){
a.append(poiBean.getPhone());
}else {
a.append(poiBean.getArea()).append("-").append(poiBean.getPhone());
}
}else{
if(poiBean.getPhone().indexOf('1')==0){
a.append(poiBean.getPhone()).append("|");
}else {
a.append(poiBean.getArea()).append("-").append(poiBean.getPhone()).append("|");
}
}
}
}
return a.toString();
}
@NotNull
@Override
public MyViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType) {
return new MyViewHolder(LayoutInflater.from(
context).inflate(R.layout.item_poi, parent,
false));
}
@Override
public void onBindViewHolder(@NotNull final MyViewHolder holder, final int position) {
PhoneBean poiBean = list.get(position);
if(poiBean.getPhone().startsWith("1")){
holder.llPoi.setVisibility(View.GONE);
}else {
holder.llPoi.setVisibility(View.VISIBLE);
}
holder.editAreaCode.setText(poiBean.getArea());
holder.tvPhone.setText(poiBean.getName());
holder.image.setImageResource(poiBean.getImage());
holder.editPhoneNumber.setText(poiBean.getPhone());
holder.image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (position == 0) {
addData(new PhoneBean("", "","", R.drawable.icon_del_bg));
} else {
removeData(position);
}
}
});
holder.editAreaCode.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) {
String area = s.toString().trim();
poiBean.setArea(area);
}
});
holder.editPhoneNumber.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
//正在输入
String str = holder.editPhoneNumber.getText().toString().trim();
if(str.indexOf('1')==0){
holder.llPoi.setVisibility(View.GONE);
}else {
holder.llPoi.setVisibility(View.VISIBLE);
}
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
//输入之前
}
@Override
public void afterTextChanged(Editable s) {
String str = s.toString().trim();
poiBean.setPhone(str);
}
});
}
@Override
public int getItemCount() {
return list.size();
}
// 添加数据
public void addData(PhoneBean poiBean) {
//在list中添加数据并通知条目加入一条
list.add(poiBean);
//添加动画
notifyDataSetChanged();
}
// 删除数据
public void removeData(int position) {
list.remove(position);
//删除动画
notifyItemRemoved(position);
}
/**
* ViewHolder的类用于缓存控件
*/
public static class MyViewHolder extends RecyclerView.ViewHolder {
TextView tvPhone;
EditText editAreaCode, editPhoneNumber;
ImageView image;
LinearLayout llPoi;
//因为删除有可能会删除中间条目然后会造成角标越界所以必须整体刷新一下
public MyViewHolder(View view) {
super(view);
tvPhone = view.findViewById(R.id.tv_phone);
editAreaCode = view.findViewById(R.id.edit_area_code);
llPoi = view.findViewById(R.id.ll_poi);
editPhoneNumber = view.findViewById(R.id.edit_phone_number);
image = view.findViewById(R.id.image);
}
}
}
@@ -22,7 +22,6 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
private Context context;
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
public PoiTaskAdapter(Context context, List<HasSubmitBean.BodyBean.ListBean> listBeans) {
this.context = context;
this.listBeans = listBeans;
@@ -64,7 +63,6 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView tvnName, tvTime, tvMany, tvMassage, tvAuditStatus;
public ViewHolder(@NonNull View itemView) {
super(itemView);
tvnName = itemView.findViewById(R.id.tv_has_name);
@@ -62,6 +62,7 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
tvTime=itemView.findViewById(R.id.tv_time);
}
}
private clickItem clickItem;
public void setClickItem(clickItem clickItem) {
@@ -28,7 +28,6 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
notifyDataSetChanged();
}
public WithdrawalAdapter(Context context) {
this.context = context;
}
@@ -72,7 +71,6 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
public static class OnViewHolder extends RecyclerView.ViewHolder {
private TextView tvTitle, tvDec, tvTime;
public OnViewHolder(@NotNull View itemView) {
super(itemView);
tvTitle = itemView.findViewById(R.id.tv_title);
@@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map;
/**
* 获取token
* 身份证 银行卡 获取token
*/
public class AuthService {
@@ -31,7 +31,6 @@ public class AuthService {
String clientSecret = "0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB";
return getAuth(clientId, clientSecret);
}
/**
* 获取API访问token
* 该token有一定的有效期需要自行管理当失效时需重新获取.
@@ -15,10 +15,6 @@ public class BankCard {
/**
* 重要提示代码中所需工具类
* FileUtil,Base64Util,HttpUtil,GsonUtils请从
* https://ai.baidu.com/file/658A35ABAB2D404FBF903F64D47C1F72
* https://ai.baidu.com/file/C8D81F3301E24D2892968F09AE1AD6E2
* https://ai.baidu.com/file/544D677F5D4E4F17B4122FBD60DB82B3
* https://ai.baidu.com/file/470B3ACCA3FE43788B5A963BF0B625F3
* 下载
*/
public static String bankCard() {
@@ -32,15 +28,11 @@ public class BankCard {
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
String param = "image=" + imgParam;
// 注意这里仅为了简化编码每一次请求都去获取access_token线上环境access_token有过期时间 客户端可自行缓存过期后重新获取
String accessToken = AuthService.getAuth("iafhTwf6LnOMoYTiZQDlrKTu","0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB");
String accessToken = AuthService.getAuth();
return HttpUtil.post(url, accessToken, param);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) {
BankCard.bankCard();
}
}
@@ -27,6 +27,7 @@ public class Constant {
public static final String GET_ERR_MESSAGE2 = "manifest 中配置的 key 不正确";
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
public static final String ROOT_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
public static final String INTENT_BOOLEAN = "intent_boolean";
public static String BASE_FOLDER = null;
//保存图片的目录
public static String PICTURE_FOLDER;
@@ -12,11 +12,7 @@ import java.net.URLEncoder;
public class IdCard {
/**
* 重要提示代码中所需工具类
* FileUtil,Base64Util,HttpUtil,GsonUtils请从
* https://ai.baidu.com/file/658A35ABAB2D404FBF903F64D47C1F72
* https://ai.baidu.com/file/C8D81F3301E24D2892968F09AE1AD6E2
* https://ai.baidu.com/file/544D677F5D4E4F17B4122FBD60DB82B3
* https://ai.baidu.com/file/470B3ACCA3FE43788B5A963BF0B625F3
* FileUtil,Base64Util,HttpUtil,GSONUtils请从
* 下载
*/
public static String icarus() {
@@ -30,7 +26,7 @@ public class IdCard {
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
String param = "id_card_side=" + "front" + "&image=" + imgParam;
// 注意这里仅为了简化编码每一次请求都去获取access_token线上环境access_token有过期时间 客户端可自行缓存过期后重新获取
String accessToken = AuthService.getAuth("iafhTwf6LnOMoYTiZQDlrKTu","0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB");
String accessToken = AuthService.getAuth();
return HttpUtil.post(url, accessToken, param);
} catch (Exception e) {
e.printStackTrace();
@@ -38,8 +34,4 @@ public class IdCard {
return null;
}
public static void main(String[] args) {
IdCard.icarus();
}
}
@@ -17,7 +17,7 @@ import com.navinfo.outdoor.http.HttpInterface;
import java.util.Objects;
/**
* 关于页面的fragment
* 我的-关于页面的fragment
*/
public class AboutFragment extends BaseFragment implements View.OnClickListener {
@@ -247,8 +247,10 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this);
super.onDestroy();
if (capacityEvaluationBuilder != null) {
capacityEvaluationBuilder.append("onDestroy ");
capacityEvaluationBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), capacityEvaluationBuilder.toString(), true);
}
}
}
@@ -1,135 +0,0 @@
package com.navinfo.outdoor.fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.lzy.okgo.model.HttpParams;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.adapter.CapacityItemAdapter;
import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.bean.TaskPrefectureBean;
import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.ToastUtils;
import org.json.JSONObject;
import java.util.Objects;
/**
* 能力测评的第二个页面
*/
public class CapacityEvaluationFragment2 extends BaseFragment implements View.OnClickListener {
private CapacityItemAdapter capacityItemAdapter;
public static CapacityEvaluationFragment2 newInstance(Bundle bundle) {
CapacityEvaluationFragment2 fragment = new CapacityEvaluationFragment2();
fragment.setArguments(bundle);
return fragment;
}
@Override
protected int getLayout() {
return R.layout.fragment_capacity_evaluation2;
}
@Override
protected void initView() {
super.initView();
ImageView ivCapItemFinish = findViewById(R.id.iv_task_capacity2_finish);
XRecyclerView capacityRlv = findViewById(R.id.task_capacity2_recycler);
ivCapItemFinish.setOnClickListener(this);
capacityRlv.setLayoutManager(new LinearLayoutManager(getActivity()));
capacityRlv.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
capacityRlv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
capacityRlv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
capacityRlv.setPullRefreshEnabled(false);
capacityRlv.setLoadingMoreEnabled(false);
capacityItemAdapter = new CapacityItemAdapter(getActivity());
capacityRlv.setAdapter(capacityItemAdapter);
capacityRlv.getDefaultFootView().setNoMoreHint("已经加载成功");
capacityRlv.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
}
@Override
public void onLoadMore() {
}
});
capacityItemAdapter.setSetOnClick(new CapacityItemAdapter.setOnClick() {
@Override
public void onClick(int position) {
}
});
}
@Override
protected void initData() {
super.initData();
initNetWorks(true);
}
private void initNetWorks(boolean aBoolean) {
showLoadingDialog();
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
.time(30)
.Builder(getActivity())
.url(HttpInterface.MSG_LISt)
.token(Constant.ACCESS_TOKEN)
.params(new HttpParams())
.cls(TaskPrefectureBean.class);
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
@Override
public void onSuccess(TaskPrefectureBean response, int id) {
dismissLoadingDialog();
if (response.getCode() == 200) {
capacityItemAdapter.setCapItemList(response.getBody().getList());
} else if (response.getCode() == 230) {
FlushTokenUtil.flushToken(getActivity());
} else {
ToastUtils.Message(getActivity(),response.getMessage());
}
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's" + aBoolean);
}
@Override
public void onError(Throwable e, int id) {
dismissLoadingDialog();
String message = e.getMessage();
assert message != null;
if (message.equals("timeout")|| message.equals("Read time out")) {
ToastUtils.Message(getActivity(),"请求超时");
} else {
ToastUtils.Message(getActivity(),message);
}
}
});
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.iv_task_capacity2_finish) {
Objects.requireNonNull(getActivity()).finish();
}
}
}
@@ -58,7 +58,7 @@ import java.util.Objects;
import okhttp3.MediaType;
/**
* 发现-能力测评条目点击进入测试页面
* 发现-能力测评条目-能力测评页面
*/
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
private CapacityMeasureAdapter capacityMeasureAdapter;
@@ -312,9 +312,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
@Override
public void onDestroy() {
super.onDestroy();
if (capacityMeasureBuilder != null) {
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
capacityMeasureBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
}
}
}
@@ -74,8 +74,7 @@ import java.util.List;
import java.util.Objects;
/**
* 充电站中的充电桩的Fragment
* 2021-5-25
* 寻宝-上报-充电站中的充电桩的Fragment
*/
public class ChargingPileFragment extends BaseDrawerFragment implements View.OnClickListener {
private EditText editDescribe;
@@ -904,11 +903,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
private void disables() {
checkBoxLife.setEnabled(false);
tvNameContent.setEnabled(false);
/*checkButton1.setEnabled(false);//开放状态1
checkButton2.setEnabled(false);//开放状态2
checkButton3.setEnabled(false);//开放状态3
checkButton4.setEnabled(false);//开放状态4
checkButton5.setEnabled(false);//开放状态5*/
spinnerType.setEnabled(false);//充电地面层
rlPanorama.setEnabled(false);//全景照片
rlCoding.setEnabled(false);//充电桩编码
@@ -979,7 +973,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
}
}
@Subscribe
public void onEvent(Message data) {
if (data.what == Constant.PICTURE_VIDEO_WORD) {
@@ -989,7 +982,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
}
}
@Override
public void onClick(View v) {
switch (v.getId()) {
@@ -1324,10 +1316,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
if (markerPile != null) {
markerPile.remove();
}
if (chargingPileBuilder!=null) {
chargingPileBuilder.append("onDestroy");
chargingPileBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), chargingPileBuilder.toString(), true);
}
}
@Override
protected ChargingPileEntity initChargingPileEntityByUI(ChargingPileEntity chargingPileEntity) {
@@ -103,8 +103,7 @@ import java.util.Objects;
import okhttp3.Response;
/**
* 充电站的Fragment
* 2021-5-25
* 寻宝-上报-充电站的Fragment
*/
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
private EditText editDescribe;
@@ -1324,7 +1323,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
}).start();
} else {
ToastUtils.Message(getActivity(), chargingStationBean.getMessage());
}
} else if (chargingStationBean.getCode() == 230) {
FlushTokenUtil.flushToken(getActivity());
@@ -1627,14 +1625,18 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
if (markerStation != null) {
markerStation.remove();
}
if (removablesLocality != null) {
for (int i = 0; i < removablesLocality.size(); i++) {
removablesLocality.get(i).remove();
}
removablesLocality.clear();
}
if (chargingStationBuilder != null) {
chargingStationBuilder.append(TimestampUtil.time()).append("onDestroy");
chargingStationBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), chargingStationBuilder.toString(), true);
}
}
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
if (poiEntity.getTaskId() == 0) {
@@ -12,7 +12,7 @@ import com.navinfo.outdoor.base.BaseFragment;
import java.util.Objects;
/**
* 联系我们的Fragment
*我的-联系我们的Fragment
*/
public class ContactFragment extends BaseFragment implements View.OnClickListener {
@@ -224,8 +224,10 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
@Override
public void onDestroy() {
super.onDestroy();
if (eventPrefectureBuilder!=null) {
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
eventPrefectureBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
}
}
}
@@ -61,7 +61,7 @@ import java.util.List;
import java.util.Objects;
/**
* 筛选的Fragment
* 寻宝-筛选的Fragment
*/
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
private XRecyclerView recyclerFilter;
@@ -26,7 +26,6 @@ import java.util.Objects;
/**
* 发现的Fragment
* 2021-5-25
*/
public class FindFragment extends BaseFragment implements View.OnClickListener {
@@ -132,9 +131,11 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
@Override
public void onDestroy() {
super.onDestroy();
if (findBuilder != null) {
findBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
findBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
}
}
}
@@ -42,7 +42,7 @@ import java.util.Date;
import java.util.Objects;
/**
* 忘记密码页面
* 登录-忘记密码页面
*/
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
private TextView forgetPawGetNote;
@@ -299,8 +299,10 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
@Override
public void onDestroy() {
super.onDestroy();
if (forgetPawBuilder!=null) {
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
forgetPawBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true);
}
}
}
@@ -58,7 +58,7 @@ import java.util.List;
import java.util.Objects;
/**
* 领取采集的fragment
* 寻宝领取采集的fragment
*/
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
@@ -1048,9 +1048,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
@Override
public void onDestroy() {
super.onDestroy();
if (gatherGetBuilder!=null) {
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
gatherGetBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
}
}
}
@@ -62,7 +62,8 @@ import java.util.Date;
import java.util.Objects;
/*
收款信息
* 我的-用户资料-收款信息的fragment
* 绑定银行卡
*/
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
private TextView tvBank;
@@ -115,7 +116,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
} else {
tvBank.setText(Constant.BACKGROUND_NAME);
}
btnBank.setText("重新绑定");
}
}
@@ -339,7 +339,9 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
Constant.FILE_PATH = absolutePath;
gatheringCamera.setTag(absolutePath);
//银行卡识别
BankCardBean bankCardBean = new Gson().fromJson(BankCard.bankCard(), BankCardBean.class);
String bankCard = BankCard.bankCard();
if (bankCard != null) {
BankCardBean bankCardBean = new Gson().fromJson(bankCard, BankCardBean.class);
if (bankCardBean == null) {
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
} else {
@@ -363,6 +365,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
}
}
}
}
//所属银行解析
public ArrayList<BankPathBean> parseData(String result) {//Gao 解析
@@ -395,8 +398,10 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
@Override
public void onDestroy() {
super.onDestroy();
if (gatheringBuilder != null) {
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
gatheringBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
}
}
}
@@ -10,7 +10,7 @@ import com.navinfo.outdoor.base.BaseFragment;
import java.util.Objects;
/**
* 我的等级页面的fragment
* 我的-等级页面的fragment
*/
public class GradeFragment extends BaseFragment implements View.OnClickListener{
@@ -232,6 +232,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
ToastUtils.Message(getActivity(),message);
}
}
});
}
@@ -477,8 +478,10 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this);
super.onDestroy();
if (hasSubmitBuilder!=null) {
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
hasSubmitBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
}
}
}
@@ -39,7 +39,7 @@ import java.util.Objects;
import okhttp3.OkHttpClient;
/**
* 常见问题页面的fragment
* 我的-常见问题页面的fragment
*/
public class IssueFragment extends BaseFragment implements View.OnClickListener {
private IssueProblemAdapter issueProblemAdapter;
@@ -24,8 +24,8 @@ import java.util.Objects;
/**
* 我的-常见问题-web
*/
* 我的-常见问题-web页面
* */
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
public static IssueWebFragment newInstance(Bundle bundle) {
@@ -10,10 +10,11 @@ import com.navinfo.outdoor.base.BaseFragment;
import java.util.Objects;
/**
* 地图下载的Fragment
/*
*我的-地图下载的Fragment
*/
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
public static MapDownloadFragment newInstance(Bundle bundle) {
MapDownloadFragment fragment = new MapDownloadFragment();
fragment.setArguments(bundle);
@@ -63,9 +63,9 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override
protected void initView() {
super.initView();
ImageView messageFinal = (ImageView) findViewById(R.id.message_final);
ImageView messageFinal = findViewById(R.id.message_final);
messageFinal.setOnClickListener(this);
XRecyclerView messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
XRecyclerView messageRecycler = findViewById(R.id.message_recycler);
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
messageRecycler.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
@@ -89,6 +89,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override
public void onRefresh() {
}
@Override
public void onLoadMore() {
}
@@ -188,8 +189,10 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override
public void onDestroy() {
super.onDestroy();
if (messageBuilder != null) {
messageBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
messageBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true);
}
}
}
@@ -47,7 +47,6 @@ import java.util.Objects;
/**
* 我的Fragment
* 2021-5-25
*/
public class MineFragment extends BaseFragment implements View.OnClickListener {
private TextView tvMoney;
@@ -287,14 +286,15 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
mainBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
}
@Override
public void onDestroy() {
if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this);
super.onDestroy();
if (mainBuilder != null) {
mainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
mainBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), mainBuilder.toString(), true);
}
}
}
@@ -435,8 +435,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
private void initShowPoi() {
// 添加信息
assert getArguments() != null;
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
showPoiEntity = (PoiEntity) Objects.requireNonNull(getArguments()).getSerializable("poiEntity");
if (showPoiEntity != null) {
String name = showPoiEntity.getName();//名称
if (name != null && !name.equals("")) {
@@ -602,9 +601,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
}
});
}
}
}
}).start();
} else {
@@ -876,10 +873,12 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
if (markerOther != null) {
markerOther.remove();
}
if (otherBuilder != null) {
otherBuilder.append(TimestampUtil.time()).append("onDestroy");
otherBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true);
}
}
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
if (poiEntity.getTaskId() == 0) {
@@ -227,9 +227,11 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this);
super.onDestroy();
if (photoBuilder != null) {
photoBuilder.append(TimestampUtil.time()).append("onDestroy");
photoBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), photoBuilder.toString(), true);
}
}
}
@@ -92,8 +92,7 @@ import java.util.List;
import java.util.Objects;
/**
* poi记录的Fragment
* 2021-5-25
* 寻宝-上报- poi记录的Fragment
*/
public class PoiFragment extends BaseDrawerFragment implements View.OnClickListener {
private EditText editDescribe;
@@ -334,6 +333,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
@@ -452,9 +452,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private void initShowPoi() {
// 添加信息
assert getArguments() != null;
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
assert showPoiEntity != null;
showPoiEntity = (PoiEntity) Objects.requireNonNull(getArguments()).getSerializable("poiEntity");
if (showPoiEntity != null) {
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
tvPoiExamine.setVisibility(View.GONE);
} else {
@@ -591,6 +590,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
});
}
}
/**
* 得到电话区号电话位数
*/
@@ -669,6 +670,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
btnSaveLocal.setEnabled(false);
spinnerExist.setEnabled(false);
relativePhone.setEnabled(false);
linearContact.setEnabled(false);
}
@Override
@@ -1240,10 +1242,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
if (markerPoi != null) {
markerPoi.remove();
}
if (poiBuilder != null) {
poiBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
poiBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
}
}
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
if (poiEntity.getTaskId() == 0) {
@@ -44,8 +44,7 @@ import java.util.List;
import java.util.Objects;
/**
*
* 记录-已提交-poi任务列表
* 记录-已提交-任务列表
*/
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
private XRecyclerView poiTaskXrv;
@@ -101,6 +100,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
page = 1;
initWork(type, true);
}
@Override
public void onLoadMore() {
initWork(type, false);
@@ -241,9 +241,11 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
@Override
public void onDestroy() {
super.onDestroy();
if (poiTaskBuilder != null) {
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
poiTaskBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), poiTaskBuilder.toString(), true);
}
}
}
@@ -79,8 +79,7 @@ import java.util.List;
import java.util.Objects;
/**
*
* 寻宝-点击上传弹窗-poi录像
* 寻宝-上报弹窗-poi录像
*/
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
private EditText etRoadName, etDesc;
@@ -93,6 +92,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
private TextView tvCombo, tvShort;
private StringBuilder poiVideoBuilder;
private LatLng rearLatLng;
private boolean booleanExtra = true;
public static PoiVideoFragment newInstance(Bundle bundle) {
PoiVideoFragment fragment = new PoiVideoFragment();
@@ -364,13 +364,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
}
fmPoiVideoPic.setTag(fileListByUUID);
}
}
//判断是否是已做完任务并保存成功
assert showPoiEntity != null;
if (showPoiEntity.getTaskStatus() == 3) {
disables();//禁用所有可操作的控件
}
}
}
private void disables() {
etRoadName.setEnabled(false);
@@ -456,6 +454,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
int gpsRssi = Constant.currentLocation.getGPSRssi();
if (gpsRssi == 0) {
intents.putExtra(Constant.INTENT_BOOLEAN, false);
} else {
intents.putExtra(Constant.INTENT_BOOLEAN, true);
}
startActivityForResult(intents, 0x101);
break;
case R.id.tv_combo://自动连拍:
@@ -480,6 +484,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
int gpsRss = Constant.currentLocation.getGPSRssi();
if (gpsRss == 0) {
intent.putExtra(Constant.INTENT_BOOLEAN, false);
} else {
intent.putExtra(Constant.INTENT_BOOLEAN, true);
}
startActivityForResult(intent, 0x102);
break;
case R.id.btn_poi_video_upload:
@@ -705,6 +715,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
if (requestCode == 0x101 && resultCode == 0x111) {
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
booleanExtra = data.getBooleanExtra(Constant.INTENT_BOOLEAN, true);
assert videoPath != null;
File videoFile = new File(videoPath);
if (videoFile.exists()) {
@@ -761,10 +772,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
if (markerPoiVideo != null) {
markerPoiVideo.remove();
}
if (poiVideoBuilder != null) {
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
poiVideoBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true);
}
}
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
if (poiEntity == null) {
@@ -875,14 +888,27 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
if (fileListByUUID != null) {
fmPoiVideoPic.setTag(fileListByUUID);
if (booleanExtra) {
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
if (lineStringByFileList != null) {
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
poiEntity.setPhoto(photoStr);
if (lineString != null) {
poiEntity.setDetail(lineString);
}
}
} else {
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
if (lineStringByFileList != null) {
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
if (lineString != null) {
poiEntity.setDetail(lineString);
}
}
}
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
poiEntity.setPhoto(photoStr);
}
}
return poiEntity;
@@ -10,7 +10,7 @@ import com.navinfo.outdoor.base.BaseFragment;
import java.util.Objects;
/**
* 我的等级页面的fragment
* 我的-等级页面的fragment
*/
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener {
@@ -25,7 +25,6 @@ import java.util.Objects;
/**
* 记录的Fragment
* 2021-5-25
*/
public class RecordFragment extends BaseFragment {
@@ -46,7 +46,7 @@ import java.util.Objects;
/**
* 注册页面
* 登录-注册页面
*/
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
private EditText etRegisterPhone, etRegisterNote, etRegisterPaw, etRegisterConfirmPaw;
@@ -56,7 +56,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
private CheckBox ivRegisterCheck;
private File logFile;
private StringBuilder registerBuilder;
private EditText etRegisterReferrer;
public static RegisterFragment newInstance(Bundle bundle) {
RegisterFragment fragment = new RegisterFragment();
@@ -78,7 +78,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
etRegisterNote = findViewById(R.id.et_register_note);
registerGetNote = findViewById(R.id.register_get_note);
registerGetNote.setOnClickListener(this);
etRegisterReferrer = findViewById(R.id.et_register_referrer);
EditText etRegisterReferrer = findViewById(R.id.et_register_referrer);
etRegisterPaw = findViewById(R.id.et_register_paw);
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
ivRegisterCheck = findViewById(R.id.iv_register_check);
@@ -320,9 +320,11 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
@Override
public void onDestroy() {
super.onDestroy();
if (registerBuilder != null) {
registerBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
registerBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
}
}
}
@@ -93,6 +93,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
private Marker markerRoad;
private LatLng latLng, rearLatLng;
private StringBuilder roadBuilder;
private boolean booleanExtra = true;
public static RoadFragment newInstance(Bundle bundle) {
RoadFragment fragment = new RoadFragment();
@@ -471,6 +472,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
int gpsRssi = Constant.currentLocation.getGPSRssi();
if (gpsRssi == 0) {
intent.putExtra(Constant.INTENT_BOOLEAN, false);
} else {
intent.putExtra(Constant.INTENT_BOOLEAN, true);
}
startActivityForResult(intent, 0x101);
break;
case R.id.road_upload:
@@ -511,7 +518,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
}
});
}
}
}
}).start();
@@ -561,6 +567,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
}
}
@Override
public void onDenied(List<String> permissions, boolean never) {
if (never) {
@@ -594,7 +601,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
}
}
private void poiVideoUpload(int body, File fileZip) {
if (body == 0) {
ToastUtils.Message(getActivity(), "请先保存本地上传");
@@ -696,6 +702,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
// 扫描照片目录中当前视频的所有视频文件
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
booleanExtra = data.getBooleanExtra(Constant.INTENT_BOOLEAN, true);
assert videoPath != null;
File videoFile = new File(videoPath);
if (videoFile.exists()) {
@@ -755,10 +762,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
if (markerRoad != null) {
markerRoad.remove();
}
if (roadBuilder != null) {
roadBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
roadBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
}
}
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
if (poiEntity.getTaskId() == 0) {
@@ -866,14 +875,26 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
if (fileListByUUID != null) {
fmRoadPic.setTag(fileListByUUID);
if (booleanExtra) {//true
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
if (lineStringByFileList != null) {
String encodeList = Geohash.getInstance().encodeList(lineStringByFileList);
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
poiEntity.setPhoto(photoStr);
if (encodeList != null) {
poiEntity.setDetail(encodeList);
}
}
} else {
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
if (lineStringByFileList != null) {
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
if (lineString != null) {
poiEntity.setDetail(lineString);
}
}
}
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
poiEntity.setPhoto(photoStr);
}
}
return poiEntity;
}
@@ -1,44 +0,0 @@
package com.navinfo.outdoor.fragment;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseFragment;
/**
* 记录-已提交-道路任务列表的fragment
*/
public class RoadTaskFragment extends BaseFragment implements View.OnClickListener {
public static RoadTaskFragment newInstance(Bundle bundle) {
RoadTaskFragment fragment = new RoadTaskFragment();
fragment.setArguments(bundle);
return fragment;
}
@Override
protected int getLayout() {
return R.layout.fragment_road_task;
}
@Override
protected void initView() {
super.initView();
}
@Override
protected void initData() {
super.initData();
}
@Override
public void onClick(View v) {
}
}
@@ -18,7 +18,7 @@ import com.navinfo.outdoor.base.BaseFragment;
import java.util.Objects;
/**
* 设置页面的fragment
* 我的-设置页面的fragment
*/
public class SetFragment extends BaseFragment implements View.OnClickListener {
@@ -309,7 +309,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
} else {
ToastUtils.Message(getActivity(), "有正在提交的数据,等提交成功后,方可操作");
}
break;
case R.id.btn_stay_submit://提交
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了提交的按钮 ,");
@@ -479,8 +478,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
EventBus.getDefault().unregister(this);
super.onDestroy();
dismissLoadingDialog();
if (staySubmitBuilder!=null) {
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
staySubmitBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
}
}
}
@@ -1,37 +0,0 @@
package com.navinfo.outdoor.fragment;
import android.os.Bundle;
import android.view.View;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.base.BaseFragment;
/**
* 发现-任务说明的Item点击进入Web页面
*/
public class TaskExWebFragment extends BaseFragment implements View.OnClickListener {
public static TaskExWebFragment newInstance(Bundle bundle) {
TaskExWebFragment fragment = new TaskExWebFragment();
fragment.setArguments(bundle);
return fragment;
}
@Override
protected int getLayout() {
return R.layout.fragment_task_ex_web;
}
@Override
protected void initView() {
super.initView();
}
@Override
protected void initData() {
super.initData();
}
@Override
public void onClick(View v) { }
}
@@ -70,11 +70,9 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
ImageView ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
taskExplainRecycle = findViewById(R.id.task_explain_recycler);
ivFindTaskExplain.setOnClickListener(this);
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
//下划线
// taskExplainRecycle.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
taskExplainRecycle.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
taskExplainRecycle.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
//取消上啦加载下拉刷新
@@ -83,18 +81,15 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
taskExplainAdapter = new TaskExplainAdapter(explainList, getActivity());
taskExplainRecycle.setAdapter(taskExplainAdapter);
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
taskPage = 1;
initNetWork(true);
}
@Override
public void onLoadMore() {
initNetWork(false);
}
});
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
@Override
@@ -195,7 +190,6 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
} else {
if (taskPrefectureBean.getBody().getList() == null) {
taskExplainRecycle.setNoMore(true);
} else {
explainList.addAll(taskPrefectureBean.getBody().getList());
taskExplainAdapter.notifyDataSetChanged();
@@ -232,9 +226,11 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
@Override
public void onDestroy() {
super.onDestroy();
if (taskExplainBuilder!=null) {
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
taskExplainBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
}
}
}
@@ -2,26 +2,21 @@ package com.navinfo.outdoor.fragment;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.github.lazylibrary.util.FileUtils;
import com.lzy.okgo.model.HttpParams;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.activity.WebActivity;
import com.navinfo.outdoor.adapter.TaskExplainAdapter2;
import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseFragment;
import com.navinfo.outdoor.bean.TaskExplainInfo;
import com.navinfo.outdoor.bean.TaskPrefectureBean;
import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface;
@@ -32,8 +27,6 @@ import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtils;
import org.json.JSONObject;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@ -44,7 +37,7 @@ import java.util.List;
import java.util.Objects;
/**
* 发现页面的任务说明的点击条目跳转第二个页面
* 发现-任务说明-操作说明
*/
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
private XRecyclerView taskExplain2Recycler;
@@ -62,7 +55,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
@Override
protected int getLayout() {
return R.layout.fragment_task_explain2;
return R.layout.task_explains_fragment;
}
@Override
@@ -230,9 +223,11 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
@Override
public void onDestroy() {
super.onDestroy();
if (taskExplain2Builder != null) {
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onDestroy");
taskExplain2Builder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
}
}
}
@@ -147,6 +147,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
dismissLoadingDialog();
initTaskPrefectureBean(taskPrefectureBean, aNet);
}
@Override
public void onError(Throwable e, int id) {
dismissLoadingDialog();
@@ -216,8 +217,10 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
@Override
public void onDestroy() {
super.onDestroy();
if (taskPrefectureBuilder != null) {
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
taskPrefectureBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
}
}
}
@@ -24,6 +24,7 @@ import android.widget.CompoundButton;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@@ -32,6 +33,7 @@ import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.github.lazylibrary.util.DensityUtil;
import com.github.lazylibrary.util.FileUtils;
import com.google.gson.Gson;
@@ -565,6 +567,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
/**
* 网络删选接口
*
* @param tencentLocation location
*/
private void initList(TencentLocation tencentLocation) {
@@ -842,6 +845,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
/**
* geo 坐标点转成
*
* @param latLng lat
*/
public String initGeo(LatLng latLng) {
@@ -863,6 +867,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
/**
* marker 选中的状态
*
* @param poiEntity PoiEntity
* @param aBoolean boolean
*/
@@ -1450,14 +1455,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else if (data.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
if (tencentMap != null) {
TencentLocation tencentLocation = (TencentLocation) data.obj;
int gpsRssi = tencentLocation.getGPSRssi();
if (gpsRssi == 0) {
int gasRabi = tencentLocation.getGPSRssi();
if (gasRabi == 0) {
tvTenantGaps.setText("信号强度:无信号");
} else if (gpsRssi == 1) {
} else if (gasRabi == 1) {
tvTenantGaps.setText("信号强度:弱");
} else if (gpsRssi == 2) {
} else if (gasRabi == 2) {
tvTenantGaps.setText("信号强度:中");
} else if (gpsRssi == 3) {
} else if (gasRabi == 3) {
tvTenantGaps.setText("信号强度:强");
}
}
@@ -1638,18 +1643,22 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
if (mapView != null) {
mapView.onDestroy();
}
if (treasureBuilder != null) {
treasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
treasureBuilder.append("\r\n");
//initLocation();
FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true);
}
//initLocation();
if (bigMarker != null) {
bigMarker.remove();
}
if (removableScreenMarker != null) {
for (int i = 0; i < removableScreenMarker.size(); i++) {
removableScreenMarker.get(i).remove();
}
removableScreenMarker.clear();
}
}
@Override
public void onClick(View v) {
@@ -1671,8 +1680,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
case R.id.iv_location://定位:
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了定位的按钮,");
if (Constant.currentLocation != null) {
CameraUpdate cameraSigma =
CameraUpdateFactory.newCameraPosition(new CameraPosition(
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()),//中心点坐标地图目标经纬度
17,//目标缩放级别
0,//目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
@@ -54,7 +54,7 @@ import java.util.regex.Pattern;
import static android.app.Activity.RESULT_OK;
/**
* 实名认证
* 我的-用户资料-实名认证的fragment
*/
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
private ImageView ivAttestation2, ivAttestation1, ivAttestation3, ivHera1, ivHera2, ivHera3, useCamera;
@@ -446,7 +446,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
}
}
} else {
ToastUtils.Message(getActivity(), "请先拍照");
@@ -469,9 +468,11 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
@Override
public void onDestroy() {
super.onDestroy();
if (userAttestationBuilder != null) {
userAttestationBuilder.append(TimestampUtil.time()).append("onDestroy");
userAttestationBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), userAttestationBuilder.toString(), true);
}
}
}
@@ -133,6 +133,7 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
EventBus.getDefault().post(message);
Objects.requireNonNull(getActivity()).finish();
break;
case R.id.tv_video_album_delete:
if (fileBeans != null) {
for (int i = 0; i < fileBeans.size(); i++) {
@@ -142,6 +143,7 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
ToastUtils.Message(getActivity(),"请选择要删除的数据后才可以删除");
}
break;
}
}
@@ -43,7 +43,7 @@ import java.util.Date;
import java.util.Objects;
/**
* 提现页面的fragment
* 我的-提现页面的fragment
*/
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
private TextView tvUnit, tvAlready, tvTotal, poiPushMoney, poiReportMoney, poiVideoPushMoney, poiVideoReportMoney, roadPushMoney, roadReportMoney, chargingPushMoney, chargingReportMoney, otherPushMoney, otherReportMoney;
@@ -325,8 +325,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
@Override
public void onDestroy() {
super.onDestroy();
if (withdrawBuilder != null) {
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
withdrawBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true);
}
}
}
@@ -38,7 +38,7 @@ import java.util.Date;
import java.util.Objects;
/**
* 提现记录
* 我的-去提现-提现记录的fragment
*/
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
@@ -64,7 +64,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
super.initView();
ImageView ivWithdraw = findViewById(R.id.iv_withdraw);
ivWithdraw.setOnClickListener(this);
rxlWithdraw = (XRecyclerView) findViewById(R.id.rxl_withdraw);
rxlWithdraw = findViewById(R.id.rxl_withdraw);
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
@@ -144,7 +144,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
}
rxlWithdraw.loadMoreComplete();
rxlWithdraw.refreshComplete();
Log.d("TAG", "onSuccess: " + withdrawalBean.getMessage() + "");
Log.d("TAG", "onSuccess: " + withdrawalBean.getMessage());
}
@Override
@@ -186,8 +186,10 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
@Override
public void onDestroy() {
super.onDestroy();
if (withdrawalRecordBuilder != null) {
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onDestroy");
withdrawalRecordBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawalRecordBuilder.toString(), true);
}
}
}
@@ -1,9 +1,8 @@
package com.navinfo.outdoor.http;
public class HttpInterface {
public static final String IP = "http://172.23.139.127:9999/m4";//测试接口
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String IP2 = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
public static final String IP1 = "http://172.23.139.127:9999/m4";//测试接口
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String USER_PATH = "/user/";//我的
public static final String MSG_LIST_PATH = "/msgList/";//发现
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
@@ -40,9 +39,11 @@ public class HttpInterface {
public static String USER_DETAIL_BY_USER_ID = null; //获取用户信息
//172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
public static String INSERT_USER_GUIDE = null;//引导页完成接口
/* 发现
* Path=/m4/msgList/
*/
public static String MSG_CONTENT = null;//发现 -富文本详情页请求
public static String LIST_TASK = null;//任务专区
public static String LIST_EVENT = null;//活动专区
@@ -0,0 +1,145 @@
package com.navinfo.outdoor.util;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* gps纠偏算法适用于google,高德体系的地图
*/
public abstract class Gps {
private final static double a = 6378245.0;
private final static double pi = 3.1415926535897932384626;
private final static double ee = 0.00669342162296594323;
/**
* 计算地球上任意两点(经纬度)距离
*
* @param lat1
* 第一点纬度
* @param lng1
* 第一点经度
* @param lat2
* 第二点纬度
* @param lng2
* 第二点经度
* @return 返回距离 单位
*/
public static double distance(double lat1, double lng1, double lat2, double lng2) {
double a, b, R;
R = 6378137; // 地球半径
lat1 = lat1 * Math.PI / 180.0;
lat2 = lat2 * Math.PI / 180.0;
a = lat1 - lat2;
b = (lng1 - lng2) * Math.PI / 180.0;
double d;
double sa2, sb2;
sa2 = Math.sin(a / 2.0);
sb2 = Math.sin(b / 2.0);
d = 2 * R * Math.asin(Math.sqrt(sa2 * sa2 + Math.cos(lat1) * Math.cos(lat2) * sb2 * sb2));
return d;
}
/**
* Description: WGS-84 to GCJ-02 <BR>
*
* @author dsn
* @date 2017年10月24日 下午2:09:27
* @param latitude
* 纬度
* @param longitude
* 经度
* @return [纬度经度]
* @version 1.0
*/
public static double[] toGCJ02Point(double latitude, double longitude) {
double[] dev = calDev(latitude, longitude);
double retLat = latitude + dev[0];
double retLon = longitude + dev[1];
return new double[] { retLat, retLon };
}
/**
* Description: WGS-84 to GCJ-02 <BR>
*
* @author dsn
* @date 2017年10月24日 下午2:09:27
* @param latitude
* 纬度
* @param longitude
* 经度
* @param scale
* 经纬度保留小数位数
* @return [纬度经度]
* @version 1.0
*/
public static double[] toGCJ02Point(double latitude, double longitude, int scale) {
double[] dev = calDev(latitude, longitude);
double retLat = latitude + dev[0];
double retLon = longitude + dev[1];
return new double[] { new BigDecimal(retLat).setScale(scale, RoundingMode.DOWN).doubleValue(),
new BigDecimal(retLon).setScale(scale, RoundingMode.DOWN).doubleValue() };
}
/**
* Description:GCJ-02 to WGS-84 <BR>
*
* @author dsn
* @date 2017年10月24日 下午2:09:54
* @param latitude
* 纬度
* @param longitude
* 经度
* @return [纬度经度]
* @version 1.0
*/
public static double[] toWGS84Point(double latitude, double longitude) {
double[] dev = calDev(latitude, longitude);
double retLat = latitude - dev[0];
double retLon = longitude - dev[1];
dev = calDev(retLat, retLon);
retLat = latitude - dev[0];
retLon = longitude - dev[1];
return new double[] { retLat, retLon };
}
private static double[] calDev(double wgLat, double wgLon) {
if (isOutOfChina(wgLat, wgLon)) {
return new double[] { 0, 0 };
}
double dLat = calLat(wgLon - 105.0, wgLat - 35.0);
double dLon = calLon(wgLon - 105.0, wgLat - 35.0);
double radLat = wgLat / 180.0 * pi;
double magic = Math.sin(radLat);
magic = 1 - ee * magic * magic;
double sqrtMagic = Math.sqrt(magic);
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi);
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi);
return new double[] { dLat, dLon };
}
private static boolean isOutOfChina(double lat, double lon) {
if (lon < 72.004 || lon > 137.8347)
return true;
if (lat < 0.8293 || lat > 55.8271)
return true;
return false;
}
private static double calLat(double x, double y) {
double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(y * pi) + 40.0 * Math.sin(y / 3.0 * pi)) * 2.0 / 3.0;
ret += (160.0 * Math.sin(y / 12.0 * pi) + 320 * Math.sin(y * pi / 30.0)) * 2.0 / 3.0;
return ret;
}
private static double calLon(double x, double y) {
double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(x * pi) + 40.0 * Math.sin(x / 3.0 * pi)) * 2.0 / 3.0;
ret += (150.0 * Math.sin(x / 12.0 * pi) + 300.0 * Math.sin(x / 30.0 * pi)) * 2.0 / 3.0;
return ret;
}
}
-42
View File
@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".activity.LinkActivity">
<RelativeLayout
android:id="@+id/rl_web"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:paddingTop="@dimen/top_pind_sp">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentStart="true"
android:layout_marginStart="15dp"
android:padding="5dp"
android:src="@drawable/ic_baseline_arrow"
tools:ignore="ContentDescription" />
<!--<TextView-->
<!--android:id="@+id/tv_title"-->
<!--style="@style/text_style_toolbar_title"-->
<!--android:layout_width="wrap_content"-->
<!---->
<!--android:layout_toRightOf="@id/iv_icon"-->
<!--android:textColor="#fff" />-->
</RelativeLayout>
<WebView
android:id="@+id/link_web"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.CapacityEvaluationFragment2">
<LinearLayout
android:id="@+id/rl_capacity2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryBlue"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_task_capacity2_finish"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/ic_baseline_arrow"
/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/rl_capacity2"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/nsv">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/task_capacity2_recycler"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@+id/rl_capacity2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
tools:context=".fragment.RoadTaskFragment">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -1,13 +0,0 @@
<?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="match_parent"
tools:context=".fragment.TaskExWebFragment">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/bg"/>
</LinearLayout>
@@ -24,6 +24,18 @@
android:layout_marginLeft="15dp"
android:src="@drawable/ic_baseline_arrow"
/>
<TextView
android:id="@+id/tv_find"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@id/iv_find_task"
android:gravity="center"
android:text="操作说明"
android:textColor="#fff"
android:textSize="17sp"
android:textStyle="bold" />
</LinearLayout>
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/task_explain2_recycler"