修改bug ,腾讯网络信号为无的时候,使用GPS生成轨迹,
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ android {
|
|||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 10
|
versionCode 11
|
||||||
versionName "7.1130"
|
versionName "8.1210"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.WhiteScreen"
|
android:theme="@style/Theme.WhiteScreen"
|
||||||
tools:targetApi="n">
|
tools:targetApi="n">
|
||||||
<activity android:name=".activity.LinkActivity" />
|
|
||||||
<activity android:name=".activity.RegardMapActivity" />
|
<activity android:name=".activity.RegardMapActivity" />
|
||||||
<activity android:name=".activity.StatementActivity" />
|
<activity android:name=".activity.StatementActivity" />
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
import com.navinfo.outdoor.fragment.AboutFragment;
|
import com.navinfo.outdoor.fragment.AboutFragment;
|
||||||
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment;
|
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment;
|
||||||
import com.navinfo.outdoor.fragment.CapacityEvaluationFragment2;
|
|
||||||
import com.navinfo.outdoor.fragment.CapacityMeasurementFragment;
|
import com.navinfo.outdoor.fragment.CapacityMeasurementFragment;
|
||||||
import com.navinfo.outdoor.fragment.ChargingPileFragment;
|
import com.navinfo.outdoor.fragment.ChargingPileFragment;
|
||||||
import com.navinfo.outdoor.fragment.ContactFragment;
|
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.RoadFragment;
|
||||||
import com.navinfo.outdoor.fragment.SetFragment;
|
import com.navinfo.outdoor.fragment.SetFragment;
|
||||||
import com.navinfo.outdoor.fragment.StaySubmitFragment;
|
import com.navinfo.outdoor.fragment.StaySubmitFragment;
|
||||||
import com.navinfo.outdoor.fragment.TaskExWebFragment;
|
|
||||||
import com.navinfo.outdoor.fragment.TaskExplainFragment;
|
import com.navinfo.outdoor.fragment.TaskExplainFragment;
|
||||||
import com.navinfo.outdoor.fragment.TaskExplainFragment2;
|
import com.navinfo.outdoor.fragment.TaskExplainFragment2;
|
||||||
import com.navinfo.outdoor.fragment.TaskPrefectureFragment;
|
import com.navinfo.outdoor.fragment.TaskPrefectureFragment;
|
||||||
@@ -45,12 +43,12 @@ import com.gyf.immersionbar.ImmersionBar;
|
|||||||
import com.navinfo.outdoor.fragment.WithdrawalRecordFragment;
|
import com.navinfo.outdoor.fragment.WithdrawalRecordFragment;
|
||||||
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fragment 管理作用:
|
* 对所有fragment 进行管理:
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FragmentManagement extends BaseActivity {
|
public class FragmentManagement extends BaseActivity {
|
||||||
@@ -66,8 +64,6 @@ public class FragmentManagement extends BaseActivity {
|
|||||||
private EventPrefectureFragment eventPrefectureFragment;//发现-活动专区的fragment -9
|
private EventPrefectureFragment eventPrefectureFragment;//发现-活动专区的fragment -9
|
||||||
private TaskExplainFragment2 taskExplainFragment2;//发现-任务说明点击Item进入fragment -10
|
private TaskExplainFragment2 taskExplainFragment2;//发现-任务说明点击Item进入fragment -10
|
||||||
private CapacityEvaluationFragment capacityEvaluationFragment;//发现-能力测评fragment -11
|
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 CapacityMeasurementFragment capacityMeasurementFragment;//发现-能力测评item点击跳转web的fragment -14
|
||||||
private WithdrawFragment withdrawFragment;//我的-提现的fragment -15
|
private WithdrawFragment withdrawFragment;//我的-提现的fragment -15
|
||||||
private IssueWebFragment issueWebFragment;//我的-常见问题-web的fragment -16
|
private IssueWebFragment issueWebFragment;//我的-常见问题-web的fragment -16
|
||||||
@@ -133,10 +129,6 @@ public class FragmentManagement extends BaseActivity {
|
|||||||
fragmentTransaction.hide(taskExplainFragment2);
|
fragmentTransaction.hide(taskExplainFragment2);
|
||||||
if (capacityEvaluationFragment != null)//发现-能力测评fragment -11
|
if (capacityEvaluationFragment != null)//发现-能力测评fragment -11
|
||||||
fragmentTransaction.hide(capacityEvaluationFragment);
|
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
|
if (capacityMeasurementFragment != null)//发现-能力测评item点击跳转web的fragment -14
|
||||||
fragmentTransaction.hide(capacityMeasurementFragment);
|
fragmentTransaction.hide(capacityMeasurementFragment);
|
||||||
if (withdrawFragment != null)//我的-提现的fragment -15
|
if (withdrawFragment != null)//我的-提现的fragment -15
|
||||||
@@ -282,22 +274,6 @@ public class FragmentManagement extends BaseActivity {
|
|||||||
fragmentTransaction.show(capacityEvaluationFragment);
|
fragmentTransaction.show(capacityEvaluationFragment);
|
||||||
}
|
}
|
||||||
break;
|
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
|
case 14://发现-能力测评item点击跳转测试的fragment
|
||||||
if (capacityMeasurementFragment == null) {
|
if (capacityMeasurementFragment == null) {
|
||||||
capacityMeasurementFragment = CapacityMeasurementFragment.newInstance(new Bundle());
|
capacityMeasurementFragment = CapacityMeasurementFragment.newInstance(new Bundle());
|
||||||
|
|||||||
@@ -320,9 +320,11 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
frameLayout.removeAllViews();
|
frameLayout.removeAllViews();
|
||||||
guidanceBuilder.append(TimestampUtil.time()).append("onDestroy");
|
if (guidanceBuilder!=null) {
|
||||||
guidanceBuilder.append("\r\n");
|
guidanceBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), guidanceBuilder.toString(), true);
|
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 {
|
public class HomeActivity extends BaseActivity {
|
||||||
private TabLayout mTab;
|
private TabLayout mTab;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.navinfo.outdoor.base.BaseActivity;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击查看大图
|
* 点击图片列表 图片详情页面
|
||||||
*/
|
*/
|
||||||
public class ImageShowActivity extends BaseActivity implements View.OnClickListener {
|
public class ImageShowActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private ViewPager image_pager;
|
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) {
|
private void initLogIn(String name, String paw) {
|
||||||
try {
|
try {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@@ -259,6 +264,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户信息 通过SharedPreferences 进行存储
|
||||||
|
*/
|
||||||
private void initGetUserInfo() {
|
private void initGetUserInfo() {
|
||||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||||
.time(30)
|
.time(30)
|
||||||
@@ -359,9 +367,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
loginBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (loginBuilder!=null) {
|
||||||
loginBuilder.append("\r\n");
|
loginBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true);
|
loginBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true);
|
||||||
|
}
|
||||||
if (EventBus.getDefault().isRegistered(this)) {//加上判断
|
if (EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动页
|
* 启动页
|
||||||
|
* 包含 升级
|
||||||
|
* 以及自启动 (获取token 获取用户信息)
|
||||||
*/
|
*/
|
||||||
public class MainActivity extends BaseActivity {
|
public class MainActivity extends BaseActivity {
|
||||||
|
|
||||||
@@ -94,6 +96,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
return R.layout.activity_main;
|
return R.layout.activity_main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请权限
|
||||||
|
*/
|
||||||
private void initPermission() {
|
private void initPermission() {
|
||||||
XXPermissions.with(this)
|
XXPermissions.with(this)
|
||||||
// 申请安装包权限
|
// 申请安装包权限
|
||||||
@@ -128,6 +133,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
HttpInterface.initAppPath(Constant.USHERED);
|
HttpInterface.initAppPath(Constant.USHERED);
|
||||||
Constant.initRootFolder(Constant.USHERED);
|
Constant.initRootFolder(Constant.USHERED);
|
||||||
HttpInterface.initHttpInter(Constant.USHERED);
|
HttpInterface.initHttpInter(Constant.USHERED);
|
||||||
|
//
|
||||||
initCheckVersion();
|
initCheckVersion();
|
||||||
} else {
|
} else {
|
||||||
initTime();
|
initTime();
|
||||||
@@ -156,49 +162,53 @@ public class MainActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 升级下载
|
||||||
|
*/
|
||||||
private void initCheckVersion() {
|
private void initCheckVersion() {
|
||||||
int versionCode = APKVersionCodeUtils.getVersionCode(this);//获取当前版本号
|
int versionCode = APKVersionCodeUtils.getVersionCode(this);//获取当前版本号
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("version", versionCode);
|
httpParams.put("version", versionCode);
|
||||||
httpParams.put("operationType", "android");
|
httpParams.put("operationType", "android");
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||||
.time(0)
|
.time(0)
|
||||||
.Builder(this)
|
.Builder(this)
|
||||||
.url(HttpInterface.APP_CHECK_VERSION)
|
.url(HttpInterface.APP_CHECK_VERSION)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.cls(ApkVersionBean.class)
|
.cls(ApkVersionBean.class)
|
||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN);
|
||||||
.getRequest(new Callback<ApkVersionBean>() {
|
okGoBuilder.getRequest(new Callback<ApkVersionBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ApkVersionBean response, int id) {
|
public void onSuccess(ApkVersionBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
int version = response.getBody().getVersion();
|
int version = response.getBody().getVersion();
|
||||||
if (versionCode < version) {//TODO 改成
|
if (versionCode < version) {//TODO 改成
|
||||||
//升级
|
//升级
|
||||||
ApkVersionBean.bodyBean body = response.getBody();
|
ApkVersionBean.bodyBean body = response.getBody();
|
||||||
showUpdateDialog(body);
|
showUpdateDialog(body);
|
||||||
} else {//不需要升级
|
} else {//不需要升级
|
||||||
initTime();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
initTime();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@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(MainActivity.this,"请求超时");
|
|
||||||
} else {
|
|
||||||
ToastUtils.Message(MainActivity.this,message);
|
|
||||||
}
|
|
||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
initTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@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(MainActivity.this, "请求超时");
|
||||||
|
} else {
|
||||||
|
ToastUtils.Message(MainActivity.this, message);
|
||||||
|
}
|
||||||
|
initTime();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,7 +245,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
Environment.MEDIA_MOUNTED)) {
|
Environment.MEDIA_MOUNTED)) {
|
||||||
downFile(bodyBean.getApkUrl());//点击确定将apk下载
|
downFile(bodyBean.getApkUrl());//点击确定将apk下载
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(MainActivity.this,"SD卡不可用,请插入SD卡");
|
ToastUtils.Message(MainActivity.this, "SD卡不可用,请插入SD卡");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -268,6 +278,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户信息
|
||||||
|
*/
|
||||||
private void initGetUserInfo() {
|
private void initGetUserInfo() {
|
||||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||||
.time(30)
|
.time(30)
|
||||||
@@ -330,7 +343,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,15 +351,17 @@ public class MainActivity extends BaseActivity {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")|| message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(MainActivity.this,"请求超时");
|
ToastUtils.Message(MainActivity.this, "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(MainActivity.this,message);
|
ToastUtils.Message(MainActivity.this, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
*获取token
|
||||||
|
*/
|
||||||
private void initLogIn() {
|
private void initLogIn() {
|
||||||
try {
|
try {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@@ -380,7 +394,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
initGetUserInfo();//获取用户信息
|
initGetUserInfo();//获取用户信息
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(MainActivity.this,"获取用户id失败,请重试");
|
ToastUtils.Message(MainActivity.this, "获取用户id失败,请重试");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
@@ -390,17 +404,18 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uploadProgress(Progress progress) { }
|
public void uploadProgress(Progress progress) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")|| message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(MainActivity.this,"请求超时");
|
ToastUtils.Message(MainActivity.this, "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(MainActivity.this,message);
|
ToastUtils.Message(MainActivity.this, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 照片对应
|
* 相机拍照
|
||||||
*/
|
*/
|
||||||
public class PhotographActivity extends BaseActivity implements View.OnClickListener {
|
public class PhotographActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
||||||
private CameraView cameraView;
|
private CameraView cameraView;
|
||||||
private String photo_path;
|
private String photo_path;
|
||||||
@@ -208,9 +208,11 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
cameraView.destroy();
|
cameraView.destroy();
|
||||||
photographBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
if (photographBuilder!=null) {
|
||||||
photographBuilder.append("\r\n");
|
photographBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
photographBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
||||||
|
}
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(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;
|
||||||
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
|
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频
|
||||||
|
*/
|
||||||
public class PictureActivity extends BaseActivity implements View.OnClickListener {
|
public class PictureActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
||||||
private CameraView camera;
|
private CameraView camera;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import com.navinfo.outdoor.util.BackHandlerHelper;
|
|||||||
import com.navinfo.outdoor.util.GPSUtils;
|
import com.navinfo.outdoor.util.GPSUtils;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
|
import com.navinfo.outdoor.util.Gps;
|
||||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||||
import com.navinfo.outdoor.util.SystemTTS;
|
import com.navinfo.outdoor.util.SystemTTS;
|
||||||
import com.navinfo.outdoor.util.TimestampUtil;
|
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;
|
||||||
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
|
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拍照
|
||||||
|
* (poi录像 和 道路)
|
||||||
|
*/
|
||||||
public class PicturesActivity extends BaseActivity implements View.OnClickListener {
|
public class PicturesActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
||||||
private CameraView camera;
|
private CameraView camera;
|
||||||
@@ -106,7 +111,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private Polyline polyline;
|
private Polyline polyline;
|
||||||
private String finalVideoPath, geoWkt, detail; // 摄像后最终保存的文件名
|
private String finalVideoPath, geoWkt, detail; // 摄像后最终保存的文件名
|
||||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||||
private CheckBox capturePicture, cbMapType; //拍照
|
private CheckBox capturePicture; //拍照
|
||||||
private File paperFile, logFile;
|
private File paperFile, logFile;
|
||||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
|
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
|
||||||
private TencentLocation oldCurrentLocation = null;
|
private TencentLocation oldCurrentLocation = null;
|
||||||
@@ -148,6 +153,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
private boolean booleanExtra;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@@ -164,6 +170,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
type = getIntent().getIntExtra(Constant.INTENT_TYPE, 0);
|
type = getIntent().getIntExtra(Constant.INTENT_TYPE, 0);
|
||||||
geoWkt = getIntent().getStringExtra(Constant.INTENT_GEO_WKT);
|
geoWkt = getIntent().getStringExtra(Constant.INTENT_GEO_WKT);
|
||||||
detail = getIntent().getStringExtra(Constant.INTENT_DETAIL);
|
detail = getIntent().getStringExtra(Constant.INTENT_DETAIL);
|
||||||
|
booleanExtra = getIntent().getBooleanExtra(Constant.INTENT_BOOLEAN, true);
|
||||||
if (finalVideoPath != null) {
|
if (finalVideoPath != null) {
|
||||||
File file = new File(finalVideoPath);
|
File file = new File(finalVideoPath);
|
||||||
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
|
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
|
||||||
@@ -268,7 +275,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (radioPicture == 0) {
|
if (radioPicture == 0) {
|
||||||
capturePicture.setChecked(false);
|
capturePicture.setChecked(false);
|
||||||
capturePicture.setText("开始采集");
|
capturePicture.setText("开始采集");
|
||||||
ToastUtils.Message(PicturesActivity.this,"请选择模式");
|
ToastUtils.Message(PicturesActivity.this, "请选择模式");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
@@ -303,14 +310,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
camera.addCameraListener(new CameraListener() {
|
camera.addCameraListener(new CameraListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPictureTaken(@NonNull PictureResult result) {
|
public void onPictureTaken(@NonNull PictureResult result) {
|
||||||
if (result.getData()!=null&&result != null && result.getData().length > 0) {
|
if (result.getData() != null && result != null && result.getData().length > 0) {
|
||||||
super.onPictureTaken(result);
|
super.onPictureTaken(result);
|
||||||
isBack = true;
|
isBack = true;
|
||||||
// 如果当前手机是竖向,则不
|
// 如果当前手机是竖向,则不
|
||||||
if (isOration) {
|
if (isOration) {
|
||||||
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
||||||
isOration = true;
|
isOration = true;
|
||||||
ToastUtils.Message(PicturesActivity.this,"不允许竖向拍摄...");
|
ToastUtils.Message(PicturesActivity.this, "不允许竖向拍摄...");
|
||||||
picturesBuilder.append("camera 用户竖屏拍照 ,");
|
picturesBuilder.append("camera 用户竖屏拍照 ,");
|
||||||
stopTimer();
|
stopTimer();
|
||||||
capturePicture.setChecked(false);
|
capturePicture.setChecked(false);
|
||||||
@@ -327,7 +334,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
result.toFile(file, new FileCallback() {
|
result.toFile(file, new FileCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onFileReady(@Nullable File file) {
|
public void onFileReady(@Nullable File file) {
|
||||||
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, 0));
|
UserApplication.fixedThreadPool.execute(new Jpg2WebpRunnable(/*result, */file, 0, booleanExtra));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -366,18 +373,20 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
//private PictureResult pictureResult;
|
//private PictureResult pictureResult;
|
||||||
private File file;
|
private File file;
|
||||||
private int count;
|
private int count;
|
||||||
|
private boolean isBoolean;
|
||||||
// 该转换执行次数,如果连续3次执行失败,则不再转换
|
// 该转换执行次数,如果连续3次执行失败,则不再转换
|
||||||
|
|
||||||
public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count) {
|
public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count, boolean isBoolean) {
|
||||||
//this.pictureResult = pictureResult;
|
//this.pictureResult = pictureResult;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.count = count;
|
this.count = count;
|
||||||
|
this.isBoolean = isBoolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (file.exists() && file != null) {
|
if (file.exists() && file != null) {
|
||||||
initWeb(file, count);
|
initWeb(file, count, isBoolean);
|
||||||
if (count <= 0) { // 不是重新转换webp流程
|
if (count <= 0) { // 不是重新转换webp流程
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
@@ -385,7 +394,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
public void run() {
|
public void run() {
|
||||||
if (PicturesActivity.this != null) {
|
if (PicturesActivity.this != null) {
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
initMarker();
|
initMarker(isBoolean);
|
||||||
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
||||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
|
||||||
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
||||||
@@ -411,14 +420,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ToastUtils.Message(PicturesActivity.this,"源文件不存在");
|
ToastUtils.Message(PicturesActivity.this, "源文件不存在");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initWeb(File file, int count) {
|
private void initWeb(File file, int count, boolean isBoolean) {
|
||||||
try {
|
try {
|
||||||
count++;
|
count++;
|
||||||
WebPNative webPNative = new WebPNative();
|
WebPNative webPNative = new WebPNative();
|
||||||
@@ -437,7 +446,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
UMCrashManager.reportCrash(this, e);
|
UMCrashManager.reportCrash(this, e);
|
||||||
if (count < 3) {
|
if (count < 3) {
|
||||||
//当尝试次数小于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();
|
Intent intent = new Intent();
|
||||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
|
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
|
||||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||||
|
intent.putExtra(Constant.INTENT_BOOLEAN,booleanExtra);
|
||||||
setResult(0x111, intent);
|
setResult(0x111, intent);
|
||||||
PicturesActivity.this.finish();
|
PicturesActivity.this.finish();
|
||||||
break;
|
break;
|
||||||
@@ -736,9 +746,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
removables.get(i).remove();
|
removables.get(i).remove();
|
||||||
}
|
}
|
||||||
removables.clear();
|
removables.clear();
|
||||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (picturesBuilder != null) {
|
||||||
picturesBuilder.append("\r\n");
|
picturesBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
|
picturesBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
|
||||||
|
}
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
@@ -800,9 +812,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
sb.append(initCount);
|
sb.append(initCount);
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
if (gpsLocation != null) {
|
if (gpsLocation != null) {
|
||||||
sb.append(gpsLocation.getLatitude());
|
double[] doubles = Gps.toGCJ02Point(gpsLocation.getLatitude(), gpsLocation.getLongitude());
|
||||||
|
sb.append(doubles[0]);
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
sb.append(gpsLocation.getLongitude());
|
sb.append(doubles[1]);
|
||||||
} else {
|
} else {
|
||||||
sb.append(0);
|
sb.append(0);
|
||||||
sb.append(",");
|
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
|
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory
|
||||||
.fromResource(R.drawable.circle);
|
.fromResource(R.drawable.circle);
|
||||||
Marker marker = tencentMap.addMarker(new MarkerOptions(latLng)
|
Marker marker = tencentMap.addMarker(new MarkerOptions(latLng)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 地图寻宝-关于地图的web页面
|
* 地图寻宝-我的-关于地图的web页面
|
||||||
* */
|
* */
|
||||||
public class RegardMapActivity extends BaseActivity implements View.OnClickListener {
|
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.R;
|
||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录-用户协议展示页面
|
||||||
|
*/
|
||||||
public class StatementActivity extends BaseActivity implements View.OnClickListener{
|
public class StatementActivity extends BaseActivity implements View.OnClickListener{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -157,7 +157,11 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
break;
|
break;
|
||||||
case R.id.btn_gathering:
|
case R.id.btn_gathering:
|
||||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去绑定的返回 ,");
|
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,"请先实名认证");
|
ToastUtils.Message(UserActivity.this,"请先实名认证");
|
||||||
} else if (Constant.AUDIOTAPES == 1) {//认证通过
|
} else if (Constant.AUDIOTAPES == 1) {//认证通过
|
||||||
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
Intent gatheringIntent = new Intent(this, FragmentManagement.class);
|
||||||
@@ -165,7 +169,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
startActivity(gatheringIntent);
|
startActivity(gatheringIntent);
|
||||||
} else if (Constant.AUDIOTAPES == 0) {
|
} else if (Constant.AUDIOTAPES == 0) {
|
||||||
ToastUtils.Message(this,Constant.AUDITING + "");
|
ToastUtils.Message(this,Constant.AUDITING + "");
|
||||||
}
|
}*/
|
||||||
break;
|
break;
|
||||||
case R.id.btn_attestations:
|
case R.id.btn_attestations:
|
||||||
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去认证的返回 ,");
|
userBuilder.append(TimestampUtil.time()).append(",").append("点击了去认证的返回 ,");
|
||||||
@@ -415,8 +419,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
userBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (userBuilder!=null) {
|
||||||
userBuilder.append("\r\n");
|
userBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
|
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.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* 详情页
|
* 统一的详情页
|
||||||
*/
|
*/
|
||||||
public class WebActivity extends BaseActivity implements View.OnClickListener {
|
public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private WebView nWebView;
|
private WebView nWebView;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.navinfo.outdoor.adapter;
|
package com.navinfo.outdoor.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -37,6 +38,7 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
|||||||
return new ViewHolder(capacity);
|
return new ViewHolder(capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
TaskPrefectureBean.BodyBean.ListBean listBean = capacityList.get(position);
|
TaskPrefectureBean.BodyBean.ListBean listBean = capacityList.get(position);
|
||||||
@@ -51,7 +53,6 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
|||||||
}else {
|
}else {
|
||||||
holder.tvResults.setText("不通过");
|
holder.tvResults.setText("不通过");
|
||||||
}
|
}
|
||||||
|
|
||||||
Glide.with(context).load(listBean.getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
Glide.with(context).load(listBean.getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@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 {
|
}else {
|
||||||
holder.rlItem.setBackgroundColor(Color.parseColor("#4CEF6F"));
|
holder.rlItem.setBackgroundColor(Color.parseColor("#4CEF6F"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@@ -84,6 +82,7 @@ public class ChargingPileAdapter extends RecyclerView.Adapter<ChargingPileAdapte
|
|||||||
textView=itemView.findViewById(R.id.tv_text);
|
textView=itemView.findViewById(R.id.tv_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onLickItem onLickItem;
|
private onLickItem onLickItem;
|
||||||
|
|
||||||
public void setOnLickItem(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 {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvTitle;
|
TextView tvTitle, tvDest, tvTime;
|
||||||
TextView tvDest;
|
|
||||||
TextView tvTime;
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
tvTitle=itemView.findViewById(R.id.tv_title);
|
tvTitle=itemView.findViewById(R.id.tv_title);
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
|||||||
holder.cbFilter.setEnabled(false);
|
holder.cbFilter.setEnabled(false);
|
||||||
holder.tvTaskStatus.setTextColor(Color.parseColor("#1CEF7B"));
|
holder.tvTaskStatus.setTextColor(Color.parseColor("#1CEF7B"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (poiEntity.getIsLocalData() == 2) {
|
if (poiEntity.getIsLocalData() == 2) {
|
||||||
holder.cbFilter.setVisibility(View.VISIBLE);
|
holder.cbFilter.setVisibility(View.VISIBLE);
|
||||||
holder.constraintLayout.setEnabled(false);
|
holder.constraintLayout.setEnabled(false);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class ImagePagerAdapter extends PagerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public Object instantiateItem(@NotNull ViewGroup container, int position) {
|
public Object instantiateItem(@NotNull ViewGroup container, int position) {
|
||||||
View view = LayoutInflater.from(context).inflate(R.layout.details_imageshow_item, null);
|
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);
|
Glide.with(context).load(impsUrl.get(position)).into(full_image);
|
||||||
((ViewPager) container).addView(view);
|
((ViewPager) container).addView(view);
|
||||||
return view;
|
return view;
|
||||||
@@ -67,4 +67,5 @@ public class ImagePagerAdapter extends PagerAdapter {
|
|||||||
public void destroyItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
|
public void destroyItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
|
||||||
((ViewPager) container).removeView((View) object);
|
((ViewPager) container).removeView((View) object);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,4 +71,5 @@ public class IssueProblemAdapter extends RecyclerView.Adapter<IssueProblemAdapte
|
|||||||
public void setOnIssueClick(OnIssueClick onIssueClick) {
|
public void setOnIssueClick(OnIssueClick onIssueClick) {
|
||||||
this.onIssueClick = onIssueClick;
|
this.onIssueClick = onIssueClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ public class MarkerAdapter extends RecyclerView.Adapter<MarkerAdapter.ViewHolder
|
|||||||
ivIcon=itemView.findViewById(R.id.iv_icon);
|
ivIcon=itemView.findViewById(R.id.iv_icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnBankClick {
|
public interface OnBankClick {
|
||||||
void onClick(PoiEntity poiEntity);
|
void onClick(PoiEntity poiEntity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
|
|||||||
tvMessageTime = itemView.findViewById(R.id.tv_message_time);
|
tvMessageTime = itemView.findViewById(R.id.tv_message_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public messageClickItem messageClickItem;
|
public messageClickItem messageClickItem;
|
||||||
|
|
||||||
public void setMessageClickItem(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 {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
private ImageView ivPhoto;
|
private ImageView ivPhoto;
|
||||||
private CheckBox cbPhoto;
|
private CheckBox cbPhoto;
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
ivPhoto = itemView.findViewById(R.id.iv_photo);
|
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 Context context;
|
||||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||||
|
|
||||||
|
|
||||||
public PoiTaskAdapter(Context context, List<HasSubmitBean.BodyBean.ListBean> listBeans) {
|
public PoiTaskAdapter(Context context, List<HasSubmitBean.BodyBean.ListBean> listBeans) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.listBeans = listBeans;
|
this.listBeans = listBeans;
|
||||||
@@ -64,7 +63,6 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
|||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvnName, tvTime, tvMany, tvMassage, tvAuditStatus;
|
TextView tvnName, tvTime, tvMany, tvMassage, tvAuditStatus;
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
tvnName = itemView.findViewById(R.id.tv_has_name);
|
tvnName = itemView.findViewById(R.id.tv_has_name);
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
synchronized (allRoad) {
|
synchronized (allRoad) {
|
||||||
Iterator<PoiEntity> iterator = allRoad.iterator();
|
Iterator<PoiEntity> iterator = allRoad.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
|||||||
tvTime=itemView.findViewById(R.id.tv_time);
|
tvTime=itemView.findViewById(R.id.tv_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private clickItem clickItem;
|
private clickItem clickItem;
|
||||||
|
|
||||||
public void setClickItem(clickItem clickItem) {
|
public void setClickItem(clickItem clickItem) {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
|
|||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public WithdrawalAdapter(Context context) {
|
public WithdrawalAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
@@ -72,7 +71,6 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
|
|||||||
|
|
||||||
public static class OnViewHolder extends RecyclerView.ViewHolder {
|
public static class OnViewHolder extends RecyclerView.ViewHolder {
|
||||||
private TextView tvTitle, tvDec, tvTime;
|
private TextView tvTitle, tvDec, tvTime;
|
||||||
|
|
||||||
public OnViewHolder(@NotNull View itemView) {
|
public OnViewHolder(@NotNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
tvTitle = itemView.findViewById(R.id.tv_title);
|
tvTitle = itemView.findViewById(R.id.tv_title);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取token
|
* 身份证 银行卡 获取token
|
||||||
*/
|
*/
|
||||||
public class AuthService {
|
public class AuthService {
|
||||||
|
|
||||||
@@ -31,7 +31,6 @@ public class AuthService {
|
|||||||
String clientSecret = "0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB";
|
String clientSecret = "0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB";
|
||||||
return getAuth(clientId, clientSecret);
|
return getAuth(clientId, clientSecret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取API访问token
|
* 获取API访问token
|
||||||
* 该token有一定的有效期,需要自行管理,当失效时需重新获取.
|
* 该token有一定的有效期,需要自行管理,当失效时需重新获取.
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ public class BankCard {
|
|||||||
/**
|
/**
|
||||||
* 重要提示代码中所需工具类
|
* 重要提示代码中所需工具类
|
||||||
* FileUtil,Base64Util,HttpUtil,GsonUtils请从
|
* 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() {
|
public static String bankCard() {
|
||||||
@@ -32,15 +28,11 @@ public class BankCard {
|
|||||||
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
|
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
|
||||||
String param = "image=" + imgParam;
|
String param = "image=" + imgParam;
|
||||||
// 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。
|
// 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。
|
||||||
String accessToken = AuthService.getAuth("iafhTwf6LnOMoYTiZQDlrKTu","0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB");
|
String accessToken = AuthService.getAuth();
|
||||||
return HttpUtil.post(url, accessToken, param);
|
return HttpUtil.post(url, accessToken, param);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return null;
|
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_MESSAGE2 = "manifest 中配置的 key 不正确";
|
||||||
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
||||||
public static final String ROOT_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
|
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 BASE_FOLDER = null;
|
||||||
//保存图片的目录
|
//保存图片的目录
|
||||||
public static String PICTURE_FOLDER;
|
public static String PICTURE_FOLDER;
|
||||||
|
|||||||
@@ -12,11 +12,7 @@ import java.net.URLEncoder;
|
|||||||
public class IdCard {
|
public class IdCard {
|
||||||
/**
|
/**
|
||||||
* 重要提示代码中所需工具类
|
* 重要提示代码中所需工具类
|
||||||
* FileUtil,Base64Util,HttpUtil,GsonUtils请从
|
* 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 icarus() {
|
public static String icarus() {
|
||||||
@@ -30,7 +26,7 @@ public class IdCard {
|
|||||||
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
|
String imgParam = URLEncoder.encode(imgStr, "UTF-8");
|
||||||
String param = "id_card_side=" + "front" + "&image=" + imgParam;
|
String param = "id_card_side=" + "front" + "&image=" + imgParam;
|
||||||
// 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。
|
// 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。
|
||||||
String accessToken = AuthService.getAuth("iafhTwf6LnOMoYTiZQDlrKTu","0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB");
|
String accessToken = AuthService.getAuth();
|
||||||
return HttpUtil.post(url, accessToken, param);
|
return HttpUtil.post(url, accessToken, param);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -38,8 +34,4 @@ public class IdCard {
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
IdCard.icarus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于页面的fragment
|
* 我的-关于页面的fragment
|
||||||
*/
|
*/
|
||||||
public class AboutFragment extends BaseFragment implements View.OnClickListener {
|
public class AboutFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafrases");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafrases");
|
||||||
}
|
}
|
||||||
@@ -180,9 +180,9 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
/* 友盟+
|
/* 友盟+
|
||||||
@@ -199,7 +199,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
capacityList.clear();
|
capacityList.clear();
|
||||||
}
|
}
|
||||||
if (taskPrefectureBean.getBody().getList() == null) {
|
if (taskPrefectureBean.getBody().getList() == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有相关数据");
|
ToastUtils.Message(getActivity(), "没有相关数据");
|
||||||
} else {
|
} else {
|
||||||
capacityList.addAll(taskPrefectureBean.getBody().getList());
|
capacityList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
capacityPage++;
|
capacityPage++;
|
||||||
@@ -217,7 +217,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),taskPrefectureBean.getMessage());
|
ToastUtils.Message(getActivity(), taskPrefectureBean.getMessage());
|
||||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,8 +247,10 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
capacityEvaluationBuilder.append("onDestroy ");
|
if (capacityEvaluationBuilder != null) {
|
||||||
capacityEvaluationBuilder.append("\r\n");
|
capacityEvaluationBuilder.append("onDestroy ");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), capacityEvaluationBuilder.toString(), true);
|
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;
|
import okhttp3.MediaType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-能力测评条目点击进入测试页面
|
* 发现-能力测评条目-能力测评页面
|
||||||
*/
|
*/
|
||||||
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
|
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private CapacityMeasureAdapter capacityMeasureAdapter;
|
private CapacityMeasureAdapter capacityMeasureAdapter;
|
||||||
@@ -185,9 +185,9 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -210,7 +210,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
for (int i = 0; i < baleen.size(); i++) {
|
for (int i = 0; i < baleen.size(); i++) {
|
||||||
final String id = baleen.get(i).getId();
|
final String id = baleen.get(i).getId();
|
||||||
if (!checkedMap.containsKey(id) || checkedMap.get(id) == null || ("").equals(checkedMap.get(id))) {
|
if (!checkedMap.containsKey(id) || checkedMap.get(id) == null || ("").equals(checkedMap.get(id))) {
|
||||||
ToastUtils.Message(getActivity(),"有题目未填写答案,请仔细检查!");
|
ToastUtils.Message(getActivity(), "有题目未填写答案,请仔细检查!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
initExamSubmit();
|
initExamSubmit();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"无数据,无法提交");
|
ToastUtils.Message(getActivity(), "无数据,无法提交");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,9 +289,9 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -312,9 +312,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (capacityMeasureBuilder != null) {
|
||||||
capacityMeasureBuilder.append("\r\n");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
capacityMeasureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -74,8 +74,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电站中的充电桩的Fragment
|
* 寻宝-上报-充电站中的充电桩的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class ChargingPileFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class ChargingPileFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText editDescribe;
|
private EditText editDescribe;
|
||||||
@@ -904,11 +903,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
private void disables() {
|
private void disables() {
|
||||||
checkBoxLife.setEnabled(false);
|
checkBoxLife.setEnabled(false);
|
||||||
tvNameContent.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);//充电地面层
|
spinnerType.setEnabled(false);//充电地面层
|
||||||
rlPanorama.setEnabled(false);//全景照片
|
rlPanorama.setEnabled(false);//全景照片
|
||||||
rlCoding.setEnabled(false);//充电桩编码
|
rlCoding.setEnabled(false);//充电桩编码
|
||||||
@@ -979,7 +973,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||||
@@ -989,7 +982,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
@@ -1324,9 +1316,11 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
if (markerPile != null) {
|
if (markerPile != null) {
|
||||||
markerPile.remove();
|
markerPile.remove();
|
||||||
}
|
}
|
||||||
chargingPileBuilder.append("onDestroy");
|
if (chargingPileBuilder!=null) {
|
||||||
chargingPileBuilder.append("\r\n");
|
chargingPileBuilder.append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), chargingPileBuilder.toString(), true);
|
chargingPileBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), chargingPileBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -103,8 +103,7 @@ import java.util.Objects;
|
|||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电站的Fragment
|
* 寻宝-上报-充电站的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText editDescribe;
|
private EditText editDescribe;
|
||||||
@@ -758,7 +757,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
private void initPhone() {
|
private void initPhone() {
|
||||||
String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude);
|
String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude);
|
||||||
if (encode == null) {
|
if (encode == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有确定经纬度");
|
ToastUtils.Message(getActivity(), "没有确定经纬度");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@@ -770,43 +769,43 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
.cls(GetPhoneBean.class)
|
.cls(GetPhoneBean.class)
|
||||||
.token(Constant.ACCESS_TOKEN);
|
.token(Constant.ACCESS_TOKEN);
|
||||||
okGoBuilder.getRequest(new Callback<GetPhoneBean>() {
|
okGoBuilder.getRequest(new Callback<GetPhoneBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (getPhoneBean.getCode() == 200) {
|
if (getPhoneBean.getCode() == 200) {
|
||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||||
if (!code.equals(Constant.CODE)) {
|
if (!code.equals(Constant.CODE)) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.CODE = code;
|
Constant.CODE = code;
|
||||||
Constant.TelLength = telLength;
|
Constant.TelLength = telLength;
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} else if (getPhoneBean.getCode() == 230) {
|
});
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
|
||||||
} else {
|
|
||||||
ToastUtils.Message(getActivity(),getPhoneBean.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else if (getPhoneBean.getCode() == 230) {
|
||||||
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
|
} else {
|
||||||
|
ToastUtils.Message(getActivity(), getPhoneBean.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initRemovePileSharePre() {
|
public void initRemovePileSharePre() {
|
||||||
@@ -936,11 +935,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
String name = editNameContent.getText().toString().trim();//名称
|
String name = editNameContent.getText().toString().trim();//名称
|
||||||
if (name.equals("")) {
|
if (name.equals("")) {
|
||||||
ToastUtils.Message(getActivity(),"请输入充电站 名称");
|
ToastUtils.Message(getActivity(), "请输入充电站 名称");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (latLng == null) {
|
if (latLng == null) {
|
||||||
ToastUtils.Message(getActivity(),"请确定点位");
|
ToastUtils.Message(getActivity(), "请确定点位");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (chargingStationList != null) {
|
if (chargingStationList != null) {
|
||||||
@@ -948,14 +947,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
String tagPanorama = (String) tvPanorama.getTag();
|
String tagPanorama = (String) tvPanorama.getTag();
|
||||||
if (tagPanorama == null) {
|
if (tagPanorama == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
chargingStationList.add(new File(tagPanorama));
|
chargingStationList.add(new File(tagPanorama));
|
||||||
}
|
}
|
||||||
String tagName = (String) tvNamePic.getTag();
|
String tagName = (String) tvNamePic.getTag();
|
||||||
if (tagName == null) {
|
if (tagName == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
chargingStationList.add(new File(tagName));
|
chargingStationList.add(new File(tagName));
|
||||||
@@ -963,21 +962,21 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (existence == 0) {
|
if (existence == 0) {
|
||||||
String tagInternal = (String) tvInternal.getTag();
|
String tagInternal = (String) tvInternal.getTag();
|
||||||
if (tagInternal == null) {
|
if (tagInternal == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
chargingStationList.add(new File(tagInternal));
|
chargingStationList.add(new File(tagInternal));
|
||||||
}
|
}
|
||||||
String tagElse = (String) tvElse.getTag();
|
String tagElse = (String) tvElse.getTag();
|
||||||
if (tagElse == null) {
|
if (tagElse == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
chargingStationList.add(new File(tagElse));
|
chargingStationList.add(new File(tagElse));
|
||||||
}
|
}
|
||||||
String tagScutcheon = (String) tvScutcheon.getTag();
|
String tagScutcheon = (String) tvScutcheon.getTag();
|
||||||
if (tagScutcheon == null) {
|
if (tagScutcheon == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
chargingStationList.add(new File(tagScutcheon));
|
chargingStationList.add(new File(tagScutcheon));
|
||||||
@@ -1032,7 +1031,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"该任务正在提交中");
|
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.tv_station_examine:
|
case R.id.tv_station_examine:
|
||||||
@@ -1123,7 +1122,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
||||||
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
||||||
if (poiCheckResult.getCode() == 1) {
|
if (poiCheckResult.getCode() == 1) {
|
||||||
ToastUtils.Message(getActivity(),poiCheckResult.getMsg() );
|
ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
poiEntity.setTaskStatus(2);
|
poiEntity.setTaskStatus(2);
|
||||||
@@ -1146,14 +1145,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"没有申请权限,请手动申请");
|
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
ToastUtils.Message(getActivity(),"被永久拒绝授权,请手动授予权限");
|
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
||||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||||
}
|
}
|
||||||
@@ -1240,7 +1239,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
|
|
||||||
private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) {
|
private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) {
|
||||||
if (poiEntity == null) {
|
if (poiEntity == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有保存本地");
|
ToastUtils.Message(getActivity(), "没有保存本地");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@@ -1323,13 +1322,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),chargingStationBean.getMessage());
|
ToastUtils.Message(getActivity(), chargingStationBean.getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (chargingStationBean.getCode() == 230) {
|
} else if (chargingStationBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),chargingStationBean.getMessage());
|
ToastUtils.Message(getActivity(), chargingStationBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1339,9 +1337,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -1377,9 +1375,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
for (int i = 0; i < body.size(); i++) {
|
for (int i = 0; i < body.size(); i++) {
|
||||||
stringBuilder.append(body.get(i)).append(";");
|
stringBuilder.append(body.get(i)).append(";");
|
||||||
}
|
}
|
||||||
ToastUtils.Message(getActivity()," 存在类似名称--");
|
ToastUtils.Message(getActivity(), " 存在类似名称--");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"没有类似名称,可以作业");
|
ToastUtils.Message(getActivity(), "没有类似名称,可以作业");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1398,7 +1396,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ToastUtils.Message(getActivity(),taskNameBean.getMessage());
|
ToastUtils.Message(getActivity(), taskNameBean.getMessage());
|
||||||
editNameContent.setTextColor(Color.RED);
|
editNameContent.setTextColor(Color.RED);
|
||||||
btnSaveLocal.setEnabled(false);
|
btnSaveLocal.setEnabled(false);
|
||||||
btnUploading.setEnabled(false);
|
btnUploading.setEnabled(false);
|
||||||
@@ -1417,9 +1415,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -1627,23 +1625,27 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (markerStation != null) {
|
if (markerStation != null) {
|
||||||
markerStation.remove();
|
markerStation.remove();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < removablesLocality.size(); i++) {
|
if (removablesLocality != null) {
|
||||||
removablesLocality.get(i).remove();
|
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);
|
||||||
}
|
}
|
||||||
removablesLocality.clear();
|
|
||||||
chargingStationBuilder.append(TimestampUtil.time()).append("onDestroy");
|
|
||||||
chargingStationBuilder.append("\r\n");
|
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), chargingStationBuilder.toString(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||||
if (poiEntity.getTaskId() == 0) {
|
if (poiEntity.getTaskId() == 0) {
|
||||||
ToastUtils.Message(getActivity(),"无此任务");
|
ToastUtils.Message(getActivity(), "无此任务");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||||
httpParams.put("auditIds","");
|
httpParams.put("auditIds", "");
|
||||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||||
.time(30)
|
.time(30)
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
@@ -1697,10 +1699,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.contains("timeout") || message.contains("Read time out")) {
|
if (message.contains("timeout") || message.contains("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 联系我们的Fragment
|
*我的-联系我们的Fragment
|
||||||
*/
|
*/
|
||||||
public class ContactFragment extends BaseFragment implements View.OnClickListener {
|
public class ContactFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|||||||
@@ -224,8 +224,10 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (eventPrefectureBuilder!=null) {
|
||||||
eventPrefectureBuilder.append("\r\n");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
eventPrefectureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 筛选的Fragment
|
* 寻宝-筛选的Fragment
|
||||||
*/
|
*/
|
||||||
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private XRecyclerView recyclerFilter;
|
private XRecyclerView recyclerFilter;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import java.util.Objects;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现的Fragment
|
* 发现的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class FindFragment extends BaseFragment implements View.OnClickListener {
|
public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
@@ -87,7 +86,7 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.linear_task_prefecture:
|
case R.id.linear_task_prefecture:
|
||||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了最新公告:任务专区 跳转 ,");
|
findBuilder.append(TimestampUtil.time()).append(",").append("点击了最新公告:任务专区 跳转 ,");
|
||||||
@@ -132,9 +131,11 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
findBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (findBuilder != null) {
|
||||||
findBuilder.append("\r\n");
|
findBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
findBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import java.util.Date;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 忘记密码页面
|
* 登录-忘记密码页面
|
||||||
*/
|
*/
|
||||||
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
|
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView forgetPawGetNote;
|
private TextView forgetPawGetNote;
|
||||||
@@ -299,8 +299,10 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (forgetPawBuilder!=null) {
|
||||||
forgetPawBuilder.append("\r\n");
|
forgetPawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true);
|
forgetPawBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取采集的fragment
|
* 寻宝——领取采集的fragment
|
||||||
*/
|
*/
|
||||||
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
||||||
@@ -1048,9 +1048,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (gatherGetBuilder!=null) {
|
||||||
gatherGetBuilder.append("\r\n");
|
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
gatherGetBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ import java.util.Date;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
收款信息
|
* 我的-用户资料-收款信息的fragment
|
||||||
|
* (绑定银行卡)
|
||||||
*/
|
*/
|
||||||
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView tvBank;
|
private TextView tvBank;
|
||||||
@@ -115,7 +116,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else {
|
} else {
|
||||||
tvBank.setText(Constant.BACKGROUND_NAME);
|
tvBank.setText(Constant.BACKGROUND_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
btnBank.setText("重新绑定");
|
btnBank.setText("重新绑定");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
case R.id.btn_bank:
|
case R.id.btn_bank:
|
||||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击绑定银行卡 ,");
|
gatheringBuilder.append(TimestampUtil.time()).append(",").append("点击绑定银行卡 ,");
|
||||||
if (etBankNum.getText().toString().equals("")) {
|
if (etBankNum.getText().toString().equals("")) {
|
||||||
ToastUtils.Message(getActivity(),"银行卡号不能为空");
|
ToastUtils.Message(getActivity(), "银行卡号不能为空");
|
||||||
Log.e("TAG", "onClick: " + etBankNum);
|
Log.e("TAG", "onClick: " + etBankNum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -249,9 +249,9 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
ArrayList<File> gatheringList = new ArrayList<>();
|
ArrayList<File> gatheringList = new ArrayList<>();
|
||||||
if (gatheringCamera.getTag() == null) {
|
if (gatheringCamera.getTag() == null) {
|
||||||
if (Constant.BACKGROUND == null) {
|
if (Constant.BACKGROUND == null) {
|
||||||
ToastUtils.Message(getActivity(),"请先拍银行卡");
|
ToastUtils.Message(getActivity(), "请先拍银行卡");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"如果需要重新绑定请先拍照银行卡");
|
ToastUtils.Message(getActivity(), "如果需要重新绑定请先拍照银行卡");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
String etBankAccount = etBankNum.getText().toString().trim();
|
String etBankAccount = etBankNum.getText().toString().trim();
|
||||||
if (etBankAccount.equals("")) {
|
if (etBankAccount.equals("")) {
|
||||||
if (!etBankAccount.matches("^\\\\d{19}$\"")) {
|
if (!etBankAccount.matches("^\\\\d{19}$\"")) {
|
||||||
ToastUtils.Message(getActivity(),"银行卡号不能为空");
|
ToastUtils.Message(getActivity(), "银行卡号不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,7 +301,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"绑定失败!");
|
ToastUtils.Message(getActivity(), "绑定失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,9 +317,9 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.contains("timeout") || message.contains("Read time out")) {
|
if (message.contains("timeout") || message.contains("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -339,24 +339,27 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Constant.FILE_PATH = absolutePath;
|
Constant.FILE_PATH = absolutePath;
|
||||||
gatheringCamera.setTag(absolutePath);
|
gatheringCamera.setTag(absolutePath);
|
||||||
//银行卡识别
|
//银行卡识别
|
||||||
BankCardBean bankCardBean = new Gson().fromJson(BankCard.bankCard(), BankCardBean.class);
|
String bankCard = BankCard.bankCard();
|
||||||
if (bankCardBean == null) {
|
if (bankCard != null) {
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
BankCardBean bankCardBean = new Gson().fromJson(bankCard, BankCardBean.class);
|
||||||
} else {
|
if (bankCardBean == null) {
|
||||||
if (bankCardBean.getResult() != null) {
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
if (bankCardBean.getResult().getBank_card_number() != null) {
|
|
||||||
String bankCardNumber = bankCardBean.getResult().getBank_card_number().trim();
|
|
||||||
String bank_card_number = bankCardNumber.replace(" ", "");
|
|
||||||
if (StringUtils.isEmpty(bank_card_number)) {
|
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
etBankNum.setText(bank_card_number);
|
|
||||||
} else {
|
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
if (bankCardBean.getResult() != null) {
|
||||||
|
if (bankCardBean.getResult().getBank_card_number() != null) {
|
||||||
|
String bankCardNumber = bankCardBean.getResult().getBank_card_number().trim();
|
||||||
|
String bank_card_number = bankCardNumber.replace(" ", "");
|
||||||
|
if (StringUtils.isEmpty(bank_card_number)) {
|
||||||
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
etBankNum.setText(bank_card_number);
|
||||||
|
} else {
|
||||||
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,8 +398,10 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (gatheringBuilder != null) {
|
||||||
gatheringBuilder.append("\r\n");
|
gatheringBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
|
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;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的等级页面的fragment
|
* 我的-等级页面的fragment
|
||||||
*/
|
*/
|
||||||
public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||||
|
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(),message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,8 +478,10 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (hasSubmitBuilder!=null) {
|
||||||
hasSubmitBuilder.append("\r\n");
|
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
hasSubmitBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ import java.util.Objects;
|
|||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 常见问题页面的fragment
|
* 我的-常见问题页面的fragment
|
||||||
*/
|
*/
|
||||||
public class IssueFragment extends BaseFragment implements View.OnClickListener {
|
public class IssueFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private IssueProblemAdapter issueProblemAdapter;
|
private IssueProblemAdapter issueProblemAdapter;
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的-常见问题-web
|
* 我的-常见问题-web页面
|
||||||
*/
|
* */
|
||||||
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
|
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
public static IssueWebFragment newInstance(Bundle bundle) {
|
public static IssueWebFragment newInstance(Bundle bundle) {
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 地图下载的Fragment
|
*我的-地图下载的Fragment
|
||||||
*/
|
*/
|
||||||
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
|
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
|
||||||
|
|
||||||
public static MapDownloadFragment newInstance(Bundle bundle) {
|
public static MapDownloadFragment newInstance(Bundle bundle) {
|
||||||
MapDownloadFragment fragment = new MapDownloadFragment();
|
MapDownloadFragment fragment = new MapDownloadFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ImageView messageFinal = (ImageView) findViewById(R.id.message_final);
|
ImageView messageFinal = findViewById(R.id.message_final);
|
||||||
messageFinal.setOnClickListener(this);
|
messageFinal.setOnClickListener(this);
|
||||||
XRecyclerView messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
|
XRecyclerView messageRecycler = findViewById(R.id.message_recycler);
|
||||||
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
messageRecycler.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
|
messageRecycler.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
|
||||||
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
@@ -89,6 +89,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
public void onRefresh() {
|
public void onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadMore() {
|
public void onLoadMore() {
|
||||||
}
|
}
|
||||||
@@ -118,7 +119,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
} else if (taskPrefectureBean.getCode() == 230) {
|
} else if (taskPrefectureBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),taskPrefectureBean.getMessage());
|
ToastUtils.Message(getActivity(), taskPrefectureBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,10 +128,10 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -188,8 +189,10 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
messageBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (messageBuilder != null) {
|
||||||
messageBuilder.append("\r\n");
|
messageBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true);
|
messageBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,6 @@ import java.util.Objects;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的Fragment
|
* 我的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class MineFragment extends BaseFragment implements View.OnClickListener {
|
public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView tvMoney;
|
private TextView tvMoney;
|
||||||
@@ -148,7 +147,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
GetPriceBean.BodyBean body = response.getBody();
|
GetPriceBean.BodyBean body = response.getBody();
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
String minePrice = DoubleUtil.format2( body.getUserPrice());
|
String minePrice = DoubleUtil.format2(body.getUserPrice());
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
@@ -162,7 +161,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString());
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
@@ -172,10 +171,10 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -235,7 +234,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentGrade.putExtra("tag", 17);
|
intentGrade.putExtra("tag", 17);
|
||||||
startActivity(intentGrade);*/
|
startActivity(intentGrade);*/
|
||||||
ToastUtils.Message(getActivity(),"该功能以后上新,敬请期待");
|
ToastUtils.Message(getActivity(), "该功能以后上新,敬请期待");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.btn_withdraw://提现页面
|
case R.id.btn_withdraw://提现页面
|
||||||
@@ -287,14 +286,15 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
mainBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
mainBuilder.append(TimestampUtil.time()).append(",").append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
mainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (mainBuilder != null) {
|
||||||
mainBuilder.append("\r\n");
|
mainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), mainBuilder.toString(), true);
|
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() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
assert getArguments() != null;
|
showPoiEntity = (PoiEntity) Objects.requireNonNull(getArguments()).getSerializable("poiEntity");
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (name != null && !name.equals("")) {
|
||||||
@@ -539,23 +538,23 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
String name = editTaskName.getText().toString().trim();//名称
|
String name = editTaskName.getText().toString().trim();//名称
|
||||||
if (name.equals("")) {
|
if (name.equals("")) {
|
||||||
ToastUtils.Message(getActivity(),"请输入poi 名称");
|
ToastUtils.Message(getActivity(), "请输入poi 名称");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (latLng == null) {
|
if (latLng == null) {
|
||||||
ToastUtils.Message(getActivity(),"请确定点位");
|
ToastUtils.Message(getActivity(), "请确定点位");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String tagPicture = (String) tvPicture.getTag();
|
String tagPicture = (String) tvPicture.getTag();
|
||||||
if (tagPicture == null) {
|
if (tagPicture == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
otherUploadList.add(new File(tagPicture));
|
otherUploadList.add(new File(tagPicture));
|
||||||
}
|
}
|
||||||
String tagPictures = (String) tvPictures.getTag();
|
String tagPictures = (String) tvPictures.getTag();
|
||||||
if (tagPictures == null) {
|
if (tagPictures == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照");
|
ToastUtils.Message(getActivity(), "请拍照");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
otherUploadList.add(new File(tagPictures));
|
otherUploadList.add(new File(tagPictures));
|
||||||
@@ -602,13 +601,11 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"该任务正在提交中");
|
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -626,7 +623,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
||||||
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
||||||
if (poiCheckResult.getCode() == 1) {
|
if (poiCheckResult.getCode() == 1) {
|
||||||
ToastUtils.Message(getActivity(),poiCheckResult.getMsg());
|
ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
poiEntity.setTaskStatus(2);
|
poiEntity.setTaskStatus(2);
|
||||||
@@ -648,14 +645,14 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"没有申请权限,请手动申请");
|
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
ToastUtils.Message(getActivity(),"被永久拒绝授权,请手动授予权限");
|
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
||||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||||
}
|
}
|
||||||
@@ -688,7 +685,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
|
|
||||||
private void otherUploadByNet(int body, List<File> otherUploadList) {
|
private void otherUploadByNet(int body, List<File> otherUploadList) {
|
||||||
if (body == 0) {
|
if (body == 0) {
|
||||||
ToastUtils.Message(getActivity(),"没有保存本地");
|
ToastUtils.Message(getActivity(), "没有保存本地");
|
||||||
Log.e("TAG", "poiUploadByNetWork: " + body + otherUploadList);
|
Log.e("TAG", "poiUploadByNetWork: " + body + otherUploadList);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -752,12 +749,12 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),poiSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
} else if (poiSaveBean.getCode() == 230) {
|
} else if (poiSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),poiSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -767,9 +764,9 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -876,14 +873,16 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
if (markerOther != null) {
|
if (markerOther != null) {
|
||||||
markerOther.remove();
|
markerOther.remove();
|
||||||
}
|
}
|
||||||
otherBuilder.append(TimestampUtil.time()).append("onDestroy");
|
if (otherBuilder != null) {
|
||||||
otherBuilder.append("\r\n");
|
otherBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true);
|
otherBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||||
if (poiEntity.getTaskId() == 0) {
|
if (poiEntity.getTaskId() == 0) {
|
||||||
ToastUtils.Message(getActivity(),"无此任务");
|
ToastUtils.Message(getActivity(), "无此任务");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ import java.util.Objects;
|
|||||||
public class PhotoFragment extends BaseFragment implements View.OnClickListener {
|
public class PhotoFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ArrayList<FileBean> fileBeans;
|
private ArrayList<FileBean> fileBeans;
|
||||||
private PhotoAdapter photoAdapter;
|
private PhotoAdapter photoAdapter;
|
||||||
private File logFile,fileTxt;
|
private File logFile, fileTxt;
|
||||||
private StringBuilder photoBuilder;
|
private StringBuilder photoBuilder;
|
||||||
|
|
||||||
public static PhotoFragment newInstance(Bundle bundle) {
|
public static PhotoFragment newInstance(Bundle bundle) {
|
||||||
@@ -154,7 +154,7 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
photoAdapter = new PhotoAdapter(fileTxt, getContext());
|
photoAdapter = new PhotoAdapter(fileTxt, getContext());
|
||||||
photoAdapter.setFileBeans(fileBeans);
|
photoAdapter.setFileBeans(fileBeans);
|
||||||
photoRecycler.setAdapter(photoAdapter);
|
photoRecycler.setAdapter(photoAdapter);
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.getLocalizedMessage();
|
e.getLocalizedMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,9 +227,11 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
photoBuilder.append(TimestampUtil.time()).append("onDestroy");
|
if (photoBuilder != null) {
|
||||||
photoBuilder.append("\r\n");
|
photoBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), photoBuilder.toString(), true);
|
photoBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), photoBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* poi记录的Fragment
|
* 寻宝-上报- poi记录的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class PoiFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class PoiFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText editDescribe;
|
private EditText editDescribe;
|
||||||
@@ -334,6 +333,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNothingSelected(AdapterView<?> parent) {
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
@@ -452,143 +452,144 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
assert getArguments() != null;
|
showPoiEntity = (PoiEntity) Objects.requireNonNull(getArguments()).getSerializable("poiEntity");
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
if (showPoiEntity != null) {
|
||||||
assert showPoiEntity != null;
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
tvPoiExamine.setVisibility(View.GONE);
|
||||||
tvPoiExamine.setVisibility(View.GONE);
|
} else {
|
||||||
} else {
|
tvPoiExamine.setVisibility(View.VISIBLE);
|
||||||
tvPoiExamine.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
String name = showPoiEntity.getName();//名称
|
|
||||||
if (name != null && !name.equals("")) {
|
|
||||||
editNameContent.setText(name);
|
|
||||||
}
|
|
||||||
String address = showPoiEntity.getAddress();//地址
|
|
||||||
if (address != null && !address.equals("")) {
|
|
||||||
editSiteContent.setText(address);
|
|
||||||
}
|
|
||||||
String geoWkt = showPoiEntity.getGeoWkt();
|
|
||||||
if (geoWkt != null) {
|
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
|
||||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
|
||||||
switch (geometry.getGeometryType()) {
|
|
||||||
case "Point": //点
|
|
||||||
latLng = GeometryTools.createLatLng(geo);
|
|
||||||
break;
|
|
||||||
case "LineString": //线
|
|
||||||
case "Polygon": //面
|
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
|
||||||
assert latLineString != null;
|
|
||||||
latLng = latLineString.get(0);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
String name = showPoiEntity.getName();//名称
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).anchor(0.5f, 1.0f));
|
if (name != null && !name.equals("")) {
|
||||||
markerPoi.setZIndex(4);
|
editNameContent.setText(name);
|
||||||
moveLatlng(latLng, null);
|
}
|
||||||
} else {
|
String address = showPoiEntity.getAddress();//地址
|
||||||
String x = showPoiEntity.getX();
|
if (address != null && !address.equals("")) {
|
||||||
String y = showPoiEntity.getY();
|
editSiteContent.setText(address);
|
||||||
if (x != null && y != null) {
|
}
|
||||||
latLng = new LatLng();
|
String geoWkt = showPoiEntity.getGeoWkt();
|
||||||
latLng.setLatitude(Double.parseDouble(y));
|
if (geoWkt != null) {
|
||||||
latLng.setLongitude(Double.parseDouble(x));
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
|
switch (geometry.getGeometryType()) {
|
||||||
|
case "Point": //点
|
||||||
|
latLng = GeometryTools.createLatLng(geo);
|
||||||
|
break;
|
||||||
|
case "LineString": //线
|
||||||
|
case "Polygon": //面
|
||||||
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
|
assert latLineString != null;
|
||||||
|
latLng = latLineString.get(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).anchor(0.5f, 1.0f));
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).anchor(0.5f, 1.0f));
|
||||||
markerPoi.setZIndex(4);
|
markerPoi.setZIndex(4);
|
||||||
moveLatlng(latLng, null);
|
moveLatlng(latLng, null);
|
||||||
}
|
|
||||||
}
|
|
||||||
//得到区号
|
|
||||||
initPhone();
|
|
||||||
String memo = showPoiEntity.getMemo();//任务描述
|
|
||||||
if (memo != null && !memo.equals("")) {
|
|
||||||
editDescribe.setText(memo);
|
|
||||||
}
|
|
||||||
String telPhone = showPoiEntity.getTelPhone();
|
|
||||||
if (telPhone != null && !telPhone.equals("") && !telPhone.equals("null")) {
|
|
||||||
String[] phones = telPhone.split("\\|");
|
|
||||||
for (int i = 0; i < phones.length; i++) {
|
|
||||||
if (i == 0) {
|
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
|
||||||
String[] split = phones[i].split("-");
|
|
||||||
if (split.length > 1) {
|
|
||||||
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
|
||||||
String[] split = phones[i].split("-");
|
|
||||||
if (split.length > 1) {
|
|
||||||
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (phones[i] != null) {
|
|
||||||
poiBeans.add(new PhoneBean("", phones[i] + "", "", R.drawable.icon_del_bg));
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (Constant.CODE == null || Constant.CODE.equals("")) {
|
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg));
|
String x = showPoiEntity.getX();
|
||||||
}
|
String y = showPoiEntity.getY();
|
||||||
}
|
if (x != null && y != null) {
|
||||||
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
latLng = new LatLng();
|
||||||
contactView.resetView();
|
latLng.setLatitude(Double.parseDouble(y));
|
||||||
//poiRecycleAdapter.setList(poiBeans);
|
latLng.setLongitude(Double.parseDouble(x));
|
||||||
if (showPoiEntity.getName() != null) {
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
linearExist.setVisibility(View.VISIBLE);
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).anchor(0.5f, 1.0f));
|
||||||
spinnerExist.setSelection(showPoiEntity.getExistence(), true);
|
markerPoi.setZIndex(4);
|
||||||
}
|
moveLatlng(latLng, null);
|
||||||
if (showPoiEntity.getPhotoInfo() != null) {
|
|
||||||
for (int i = 0; i < showPoiEntity.getPhotoInfo().size(); i++) {
|
|
||||||
String photo = showPoiEntity.getPhotoInfo().get(i).getPhoto();
|
|
||||||
String[] split = photo.split("/");
|
|
||||||
if (split[split.length - 1].startsWith("a")) {
|
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPanorama);
|
|
||||||
tvPanorama.setTag(photo);
|
|
||||||
} else if (split[split.length - 1].startsWith("b")) {
|
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivName);
|
|
||||||
tvPoiNamePic.setTag(photo);
|
|
||||||
} else if (split[split.length - 1].startsWith("c")) {
|
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivInternal);
|
|
||||||
tvInternal.setTag(photo);
|
|
||||||
} else if (split[split.length - 1].startsWith("d")) {
|
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard);
|
|
||||||
tvCard.setTag(photo);
|
|
||||||
} else if (split[split.length - 1].startsWith("e")) {
|
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivElse);
|
|
||||||
tvElse.setTag(photo);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//得到区号
|
||||||
if (showPoiEntity.getTaskStatus() == 3) {
|
initPhone();
|
||||||
disables();
|
String memo = showPoiEntity.getMemo();//任务描述
|
||||||
}
|
if (memo != null && !memo.equals("")) {
|
||||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
editDescribe.setText(memo);
|
||||||
@Override
|
}
|
||||||
public void onFocusChange(View v, boolean hasFocus) {
|
String telPhone = showPoiEntity.getTelPhone();
|
||||||
if (!hasFocus) {
|
if (telPhone != null && !telPhone.equals("") && !telPhone.equals("null")) {
|
||||||
findingDuplicateByWork();
|
String[] phones = telPhone.split("\\|");
|
||||||
|
for (int i = 0; i < phones.length; i++) {
|
||||||
|
if (i == 0) {
|
||||||
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
|
String[] split = phones[i].split("-");
|
||||||
|
if (split.length > 1) {
|
||||||
|
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||||
|
} else {
|
||||||
|
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
|
String[] split = phones[i].split("-");
|
||||||
|
if (split.length > 1) {
|
||||||
|
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||||
|
} else {
|
||||||
|
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (phones[i] != null) {
|
||||||
|
poiBeans.add(new PhoneBean("", phones[i] + "", "", R.drawable.icon_del_bg));
|
||||||
|
} else {
|
||||||
|
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (Constant.CODE == null || Constant.CODE.equals("")) {
|
||||||
|
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||||
|
} else {
|
||||||
|
poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
||||||
|
contactView.resetView();
|
||||||
|
//poiRecycleAdapter.setList(poiBeans);
|
||||||
|
if (showPoiEntity.getName() != null) {
|
||||||
|
linearExist.setVisibility(View.VISIBLE);
|
||||||
|
spinnerExist.setSelection(showPoiEntity.getExistence(), true);
|
||||||
|
}
|
||||||
|
if (showPoiEntity.getPhotoInfo() != null) {
|
||||||
|
for (int i = 0; i < showPoiEntity.getPhotoInfo().size(); i++) {
|
||||||
|
String photo = showPoiEntity.getPhotoInfo().get(i).getPhoto();
|
||||||
|
String[] split = photo.split("/");
|
||||||
|
if (split[split.length - 1].startsWith("a")) {
|
||||||
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPanorama);
|
||||||
|
tvPanorama.setTag(photo);
|
||||||
|
} else if (split[split.length - 1].startsWith("b")) {
|
||||||
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivName);
|
||||||
|
tvPoiNamePic.setTag(photo);
|
||||||
|
} else if (split[split.length - 1].startsWith("c")) {
|
||||||
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivInternal);
|
||||||
|
tvInternal.setTag(photo);
|
||||||
|
} else if (split[split.length - 1].startsWith("d")) {
|
||||||
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard);
|
||||||
|
tvCard.setTag(photo);
|
||||||
|
} else if (split[split.length - 1].startsWith("e")) {
|
||||||
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivElse);
|
||||||
|
tvElse.setTag(photo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (showPoiEntity.getTaskStatus() == 3) {
|
||||||
|
disables();
|
||||||
|
}
|
||||||
|
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
if (!hasFocus) {
|
||||||
|
findingDuplicateByWork();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -629,7 +630,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
} else if (getPhoneBean.getCode() == 230) {
|
} else if (getPhoneBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), getPhoneBean.getMessage());
|
ToastUtils.Message(getActivity(), getPhoneBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,6 +670,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
btnSaveLocal.setEnabled(false);
|
btnSaveLocal.setEnabled(false);
|
||||||
spinnerExist.setEnabled(false);
|
spinnerExist.setEnabled(false);
|
||||||
relativePhone.setEnabled(false);
|
relativePhone.setEnabled(false);
|
||||||
|
linearContact.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -868,7 +870,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (taskNameBean.getCode() == 200) {
|
if (taskNameBean.getCode() == 200) {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -881,7 +883,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
for (int i = 0; i < body.size(); i++) {
|
for (int i = 0; i < body.size(); i++) {
|
||||||
stringBuilder.append(body.get(i)).append(";");
|
stringBuilder.append(body.get(i)).append(";");
|
||||||
}
|
}
|
||||||
ToastUtils.Message(getActivity(), "存在类似名称---"+stringBuilder.toString());
|
ToastUtils.Message(getActivity(), "存在类似名称---" + stringBuilder.toString());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "没有类似名称,可以作业");
|
ToastUtils.Message(getActivity(), "没有类似名称,可以作业");
|
||||||
}
|
}
|
||||||
@@ -988,7 +990,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
.cls(PoiSaveBean.class)
|
.cls(PoiSaveBean.class)
|
||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.params(httpParams);
|
.params(httpParams);
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getPoiPreserveCallback(getActivity(), poiEntity));
|
okGoBuilder.getRequest(PreserveUtils.getInstance().getPoiPreserveCallback(getActivity(), poiEntity));
|
||||||
getActivity().getSupportFragmentManager().popBackStack();//回退
|
getActivity().getSupportFragmentManager().popBackStack();//回退
|
||||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务已保存本地,请稍后");
|
WaitDialog.show((AppCompatActivity) getActivity(), "任务已保存本地,请稍后");
|
||||||
@@ -1012,7 +1014,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.fileList(poiPicList)
|
.fileList(poiPicList)
|
||||||
.params(httpParams);
|
.params(httpParams);
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getPoiUploadCallback(getActivity(), showPoiEntity, poiPicList));
|
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getPoiUploadCallback(getActivity(), showPoiEntity, poiPicList));
|
||||||
getActivity().getSupportFragmentManager().popBackStack();//回退
|
getActivity().getSupportFragmentManager().popBackStack();//回退
|
||||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||||
@@ -1062,12 +1064,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
} else if (poiSaveBean.getCode() == 230) {
|
} else if (poiSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), poiSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1077,9 +1079,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -1240,14 +1242,16 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (markerPoi != null) {
|
if (markerPoi != null) {
|
||||||
markerPoi.remove();
|
markerPoi.remove();
|
||||||
}
|
}
|
||||||
poiBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (poiBuilder != null) {
|
||||||
poiBuilder.append("\r\n");
|
poiBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
|
poiBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||||
if (poiEntity.getTaskId() == 0) {
|
if (poiEntity.getTaskId() == 0) {
|
||||||
ToastUtils.Message(getActivity(), "无此任务");
|
ToastUtils.Message(getActivity(), "无此任务");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@@ -1280,7 +1284,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1290,9 +1294,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 记录-已提交-任务列表
|
||||||
* 记录-已提交-poi任务列表
|
|
||||||
*/
|
*/
|
||||||
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
|
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private XRecyclerView poiTaskXrv;
|
private XRecyclerView poiTaskXrv;
|
||||||
@@ -101,6 +100,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
page = 1;
|
page = 1;
|
||||||
initWork(type, true);
|
initWork(type, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadMore() {
|
public void onLoadMore() {
|
||||||
initWork(type, false);
|
initWork(type, false);
|
||||||
@@ -170,7 +170,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
} else if (hasSubmitBean.getCode() == 230) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), hasSubmitBean.getMessage());
|
ToastUtils.Message(getActivity(), hasSubmitBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,10 +179,10 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -195,7 +195,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
listBeans.clear();
|
listBeans.clear();
|
||||||
}
|
}
|
||||||
if (hasSubmitBean.getBody().getList() == null) {
|
if (hasSubmitBean.getBody().getList() == null) {
|
||||||
ToastUtils.Message(getActivity(), "没有相关数据");
|
ToastUtils.Message(getActivity(), "没有相关数据");
|
||||||
} else {
|
} else {
|
||||||
listBeans.addAll(hasSubmitBean.getBody().getList());
|
listBeans.addAll(hasSubmitBean.getBody().getList());
|
||||||
page++;
|
page++;
|
||||||
@@ -213,7 +213,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), hasSubmitBean.getMessage());
|
ToastUtils.Message(getActivity(), hasSubmitBean.getMessage());
|
||||||
Log.d("TAG", "" + hasSubmitBean.getMessage());
|
Log.d("TAG", "" + hasSubmitBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,9 +241,11 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (poiTaskBuilder != null) {
|
||||||
poiTaskBuilder.append("\r\n");
|
poiTaskBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiTaskBuilder.toString(), true);
|
poiTaskBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), poiTaskBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -79,8 +79,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 寻宝-上报弹窗-poi录像
|
||||||
* 寻宝-点击上传弹窗-poi录像
|
|
||||||
*/
|
*/
|
||||||
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText etRoadName, etDesc;
|
private EditText etRoadName, etDesc;
|
||||||
@@ -93,6 +92,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
private TextView tvCombo, tvShort;
|
private TextView tvCombo, tvShort;
|
||||||
private StringBuilder poiVideoBuilder;
|
private StringBuilder poiVideoBuilder;
|
||||||
private LatLng rearLatLng;
|
private LatLng rearLatLng;
|
||||||
|
private boolean booleanExtra = true;
|
||||||
|
|
||||||
public static PoiVideoFragment newInstance(Bundle bundle) {
|
public static PoiVideoFragment newInstance(Bundle bundle) {
|
||||||
PoiVideoFragment fragment = new PoiVideoFragment();
|
PoiVideoFragment fragment = new PoiVideoFragment();
|
||||||
@@ -159,7 +159,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了返回当前页面的 确定 按钮,");
|
||||||
if (showPoiEntity!=null){
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getId() != null) {
|
if (showPoiEntity.getId() != null) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
@@ -364,11 +364,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
fmPoiVideoPic.setTag(fileListByUUID);
|
fmPoiVideoPic.setTag(fileListByUUID);
|
||||||
}
|
}
|
||||||
}
|
if (showPoiEntity.getTaskStatus() == 3) {
|
||||||
//判断是否是已做完任务并保存成功
|
disables();//禁用所有可操作的控件
|
||||||
assert showPoiEntity != null;
|
}
|
||||||
if (showPoiEntity.getTaskStatus() == 3) {
|
|
||||||
disables();//禁用所有可操作的控件
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,7 +423,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"请拍摄");
|
ToastUtils.Message(getActivity(), "请拍摄");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_poi_video_save:
|
case R.id.btn_poi_video_save:
|
||||||
@@ -441,12 +439,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);//終點于用戶的距離
|
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);//終點于用戶的距離
|
||||||
if (geometry > rearGeometry) {//用戶在终点开始作业
|
if (geometry > rearGeometry) {//用戶在终点开始作业
|
||||||
if (rearGeometry > 5000) {
|
if (rearGeometry > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {//用户在起点开始作业
|
} else {//用户在起点开始作业
|
||||||
if (geometry > 5000) {
|
if (geometry > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,6 +454,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
||||||
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||||
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
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);
|
startActivityForResult(intents, 0x101);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_combo://自动连拍:
|
case R.id.tv_combo://自动连拍:
|
||||||
@@ -465,12 +469,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng);
|
double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng);
|
||||||
if (geom > rearGeom) {//用戶在终点开始作业
|
if (geom > rearGeom) {//用戶在终点开始作业
|
||||||
if (rearGeom > 5000) {
|
if (rearGeom > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {//用户在起点开始作业
|
} else {//用户在起点开始作业
|
||||||
if (geom > 5000) {
|
if (geom > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -480,6 +484,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
||||||
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||||
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
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);
|
startActivityForResult(intent, 0x102);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_poi_video_upload:
|
case R.id.btn_poi_video_upload:
|
||||||
@@ -516,7 +526,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fileZip.delete();
|
fileZip.delete();
|
||||||
ToastUtils.Message(getActivity(), "压缩文件失败,请重新提交");
|
ToastUtils.Message(getActivity(), "压缩文件失败,请重新提交");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -525,11 +535,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
ToastUtils.Message(getActivity(), "请录像");
|
ToastUtils.Message(getActivity(), "请录像");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -545,7 +555,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
||||||
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
PoiCheckResult poiCheckResult = checkPoiEntity(poiEntity);
|
||||||
if (poiCheckResult.getCode() == 1) {
|
if (poiCheckResult.getCode() == 1) {
|
||||||
ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
|
ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
poiEntity.setTaskStatus(2);
|
poiEntity.setTaskStatus(2);
|
||||||
@@ -569,14 +579,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
||||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||||
}
|
}
|
||||||
@@ -609,11 +619,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
|
|
||||||
private void poiVideoUpload(int poiVideoBody, File fileZip) {
|
private void poiVideoUpload(int poiVideoBody, File fileZip) {
|
||||||
if (poiVideoBody == 0) {
|
if (poiVideoBody == 0) {
|
||||||
ToastUtils.Message(getActivity(), "请先保存本地在上传");
|
ToastUtils.Message(getActivity(), "请先保存本地在上传");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fileZip == null) {
|
if (fileZip == null) {
|
||||||
ToastUtils.Message(getActivity(), "未压缩完成");
|
ToastUtils.Message(getActivity(), "未压缩完成");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@@ -676,12 +686,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), poiVideoBean.getMessage());
|
ToastUtils.Message(getActivity(), poiVideoBean.getMessage());
|
||||||
}
|
}
|
||||||
} else if (poiVideoBean.getCode() == 230) {
|
} else if (poiVideoBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), poiVideoBean.getMessage());
|
ToastUtils.Message(getActivity(), poiVideoBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,7 +701,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
@@ -705,6 +715,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (requestCode == 0x101 && resultCode == 0x111) {
|
if (requestCode == 0x101 && resultCode == 0x111) {
|
||||||
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||||
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||||
|
booleanExtra = data.getBooleanExtra(Constant.INTENT_BOOLEAN, true);
|
||||||
assert videoPath != null;
|
assert videoPath != null;
|
||||||
File videoFile = new File(videoPath);
|
File videoFile = new File(videoPath);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
@@ -761,13 +772,15 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (markerPoiVideo != null) {
|
if (markerPoiVideo != null) {
|
||||||
markerPoiVideo.remove();
|
markerPoiVideo.remove();
|
||||||
}
|
}
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
if (poiVideoBuilder != null) {
|
||||||
poiVideoBuilder.append("\r\n");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("onDestroy ");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true);
|
poiVideoBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||||
if (poiEntity==null){
|
if (poiEntity == null) {
|
||||||
ToastUtils.Message(getActivity(), "无此任务");
|
ToastUtils.Message(getActivity(), "无此任务");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -811,7 +824,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -821,9 +834,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -875,13 +888,26 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
if (fileListByUUID != null) {
|
if (fileListByUUID != null) {
|
||||||
fmPoiVideoPic.setTag(fileListByUUID);
|
fmPoiVideoPic.setTag(fileListByUUID);
|
||||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
if (booleanExtra) {
|
||||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||||
|
if (lineStringByFileList != null) {
|
||||||
|
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||||
|
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);
|
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||||
poiEntity.setPhoto(photoStr);
|
poiEntity.setPhoto(photoStr);
|
||||||
if (lineString != null) {
|
|
||||||
poiEntity.setDetail(lineString);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的等级页面的fragment
|
* 我的-等级页面的fragment
|
||||||
*/
|
*/
|
||||||
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener {
|
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import java.util.Objects;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录的Fragment
|
* 记录的Fragment
|
||||||
* 2021-5-25
|
|
||||||
*/
|
*/
|
||||||
public class RecordFragment extends BaseFragment {
|
public class RecordFragment extends BaseFragment {
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册页面
|
* 登录-注册页面
|
||||||
*/
|
*/
|
||||||
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private EditText etRegisterPhone, etRegisterNote, etRegisterPaw, etRegisterConfirmPaw;
|
private EditText etRegisterPhone, etRegisterNote, etRegisterPaw, etRegisterConfirmPaw;
|
||||||
@@ -56,7 +56,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
private CheckBox ivRegisterCheck;
|
private CheckBox ivRegisterCheck;
|
||||||
private File logFile;
|
private File logFile;
|
||||||
private StringBuilder registerBuilder;
|
private StringBuilder registerBuilder;
|
||||||
private EditText etRegisterReferrer;
|
|
||||||
|
|
||||||
public static RegisterFragment newInstance(Bundle bundle) {
|
public static RegisterFragment newInstance(Bundle bundle) {
|
||||||
RegisterFragment fragment = new RegisterFragment();
|
RegisterFragment fragment = new RegisterFragment();
|
||||||
@@ -78,7 +78,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
etRegisterNote = findViewById(R.id.et_register_note);
|
etRegisterNote = findViewById(R.id.et_register_note);
|
||||||
registerGetNote = findViewById(R.id.register_get_note);
|
registerGetNote = findViewById(R.id.register_get_note);
|
||||||
registerGetNote.setOnClickListener(this);
|
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);
|
etRegisterPaw = findViewById(R.id.et_register_paw);
|
||||||
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
|
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
|
||||||
ivRegisterCheck = findViewById(R.id.iv_register_check);
|
ivRegisterCheck = findViewById(R.id.iv_register_check);
|
||||||
@@ -134,7 +134,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
case R.id.register_get_note:
|
case R.id.register_get_note:
|
||||||
registerBuilder.append(TimestampUtil.time()).append(",").append("点击了获取短信验证码,");
|
registerBuilder.append(TimestampUtil.time()).append(",").append("点击了获取短信验证码,");
|
||||||
if (!RegexUtil.isPhone(etRegisterPhone.getText().toString())) {
|
if (!RegexUtil.isPhone(etRegisterPhone.getText().toString())) {
|
||||||
ToastUtils.Message(getActivity(), "手机号错误,请重新输入");
|
ToastUtils.Message(getActivity(), "手机号错误,请重新输入");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
initGetNote();
|
initGetNote();
|
||||||
@@ -150,7 +150,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
ToastUtils.Message(getActivity(), "请输入手机号");
|
ToastUtils.Message(getActivity(), "请输入手机号");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("mobile", mobile);
|
httpParams.put("mobile", mobile);
|
||||||
@@ -171,9 +171,9 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
sessionId = response.getBody();
|
sessionId = response.getBody();
|
||||||
registerNote();
|
registerNote();
|
||||||
ToastUtils.Message(getActivity(), "验证码已发送");
|
ToastUtils.Message(getActivity(), "验证码已发送");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,9 +183,9 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -195,21 +195,21 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
String mobile = etRegisterPhone.getText().toString().trim();
|
String mobile = etRegisterPhone.getText().toString().trim();
|
||||||
if (!RegexUtil.isPhone(mobile)) {
|
if (!RegexUtil.isPhone(mobile)) {
|
||||||
ToastUtils.Message(getActivity(), "手机号错误");
|
ToastUtils.Message(getActivity(), "手机号错误");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("mobile", mobile);
|
httpParams.put("mobile", mobile);
|
||||||
}
|
}
|
||||||
String code = etRegisterNote.getText().toString().trim();
|
String code = etRegisterNote.getText().toString().trim();
|
||||||
if (code.equals("")) {
|
if (code.equals("")) {
|
||||||
ToastUtils.Message(getActivity(), "请获取短信验证码");
|
ToastUtils.Message(getActivity(), "请获取短信验证码");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("code", code);
|
httpParams.put("code", code);
|
||||||
}
|
}
|
||||||
String password = etRegisterPaw.getText().toString().trim();
|
String password = etRegisterPaw.getText().toString().trim();
|
||||||
if (password.equals("")) {
|
if (password.equals("")) {
|
||||||
ToastUtils.Message(getActivity(), "请输入密码");
|
ToastUtils.Message(getActivity(), "请输入密码");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@@ -220,21 +220,21 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
String conFirmPaw = etRegisterConfirmPaw.getText().toString().trim();
|
String conFirmPaw = etRegisterConfirmPaw.getText().toString().trim();
|
||||||
if (conFirmPaw.equals("")) {
|
if (conFirmPaw.equals("")) {
|
||||||
ToastUtils.Message(getActivity(), "请输入确认密码");
|
ToastUtils.Message(getActivity(), "请输入确认密码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!conFirmPaw.equals(password)) {
|
if (!conFirmPaw.equals(password)) {
|
||||||
ToastUtils.Message(getActivity(), "密码和确认密码请保持一致");
|
ToastUtils.Message(getActivity(), "密码和确认密码请保持一致");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sessionId == null || sessionId.equals("")) {
|
if (sessionId == null || sessionId.equals("")) {
|
||||||
ToastUtils.Message(getActivity(), "请短信获取验证码");
|
ToastUtils.Message(getActivity(), "请短信获取验证码");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("sessionId", sessionId);
|
httpParams.put("sessionId", sessionId);
|
||||||
}
|
}
|
||||||
if (!ivRegisterCheck.isChecked()) {
|
if (!ivRegisterCheck.isChecked()) {
|
||||||
ToastUtils.Message(getActivity(), "请先同意用户协议");
|
ToastUtils.Message(getActivity(), "请先同意用户协议");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
@@ -252,7 +252,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onSuccess(UserBean response, int id) {
|
public void onSuccess(UserBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
ToastUtils.Message(getActivity(), "注册成功");
|
ToastUtils.Message(getActivity(), "注册成功");
|
||||||
Constant.USER_NAME = mobile;
|
Constant.USER_NAME = mobile;
|
||||||
Constant.PASS_WORD = password;
|
Constant.PASS_WORD = password;
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
@@ -261,7 +261,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,9 +276,9 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.contains("timeout") || message.contains("Read time out")) {
|
if (message.contains("timeout") || message.contains("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -320,9 +320,11 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
registerBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (registerBuilder != null) {
|
||||||
registerBuilder.append("\r\n");
|
registerBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
|
registerBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -88,11 +88,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
private EditText etRoadName, etDesc;
|
private EditText etRoadName, etDesc;
|
||||||
private ImageView ivRoadPicture;
|
private ImageView ivRoadPicture;
|
||||||
private Button btnRoadSave;
|
private Button btnRoadSave;
|
||||||
private File fileZip,logFile;
|
private File fileZip, logFile;
|
||||||
private FrameLayout fmRoadPic;
|
private FrameLayout fmRoadPic;
|
||||||
private Marker markerRoad;
|
private Marker markerRoad;
|
||||||
private LatLng latLng,rearLatLng;
|
private LatLng latLng, rearLatLng;
|
||||||
private StringBuilder roadBuilder;
|
private StringBuilder roadBuilder;
|
||||||
|
private boolean booleanExtra = true;
|
||||||
|
|
||||||
public static RoadFragment newInstance(Bundle bundle) {
|
public static RoadFragment newInstance(Bundle bundle) {
|
||||||
RoadFragment fragment = new RoadFragment();
|
RoadFragment fragment = new RoadFragment();
|
||||||
@@ -444,7 +445,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "请拍摄");
|
ToastUtils.Message(getActivity(), "请拍摄");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.tv_pictures:
|
case R.id.tv_pictures:
|
||||||
@@ -456,12 +457,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);
|
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);
|
||||||
if (geometry > rearGeometry) {//用戶在终点开始作业
|
if (geometry > rearGeometry) {//用戶在终点开始作业
|
||||||
if (rearGeometry > 5000) {
|
if (rearGeometry > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {//用户在起点开始作业
|
} else {//用户在起点开始作业
|
||||||
if (geometry > 5000) {
|
if (geometry > 5000) {
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -471,6 +472,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
||||||
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||||
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
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);
|
startActivityForResult(intent, 0x101);
|
||||||
break;
|
break;
|
||||||
case R.id.road_upload:
|
case R.id.road_upload:
|
||||||
@@ -507,21 +514,20 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fileZip.delete();
|
fileZip.delete();
|
||||||
ToastUtils.Message(getActivity(),"压缩文件失败,请重新提交");
|
ToastUtils.Message(getActivity(), "压缩文件失败,请重新提交");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
ToastUtils.Message(getActivity(), "请录像");
|
ToastUtils.Message(getActivity(), "请录像");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
ToastUtils.Message(getActivity(), "该任务正在提交中");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -558,13 +564,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
ToastUtils.Message(getActivity(), "没有申请权限,请手动申请");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
ToastUtils.Message(getActivity(), "被永久拒绝授权,请手动授予权限");
|
||||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||||
}
|
}
|
||||||
@@ -594,14 +601,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void poiVideoUpload(int body, File fileZip) {
|
private void poiVideoUpload(int body, File fileZip) {
|
||||||
if (body == 0) {
|
if (body == 0) {
|
||||||
ToastUtils.Message(getActivity(), "请先保存本地上传");
|
ToastUtils.Message(getActivity(), "请先保存本地上传");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fileZip == null) {
|
if (fileZip == null) {
|
||||||
ToastUtils.Message(getActivity(), "未压缩完成");
|
ToastUtils.Message(getActivity(), "未压缩完成");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@@ -665,12 +671,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), roadSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), roadSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
} else if (roadSaveBean.getCode() == 230) {
|
} else if (roadSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), roadSaveBean.getMessage());
|
ToastUtils.Message(getActivity(), roadSaveBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,7 +686,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
@@ -696,6 +702,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||||
// 扫描照片目录中当前视频的所有视频文件
|
// 扫描照片目录中当前视频的所有视频文件
|
||||||
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||||
|
booleanExtra = data.getBooleanExtra(Constant.INTENT_BOOLEAN, true);
|
||||||
assert videoPath != null;
|
assert videoPath != null;
|
||||||
File videoFile = new File(videoPath);
|
File videoFile = new File(videoPath);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
@@ -755,9 +762,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (markerRoad != null) {
|
if (markerRoad != null) {
|
||||||
markerRoad.remove();
|
markerRoad.remove();
|
||||||
}
|
}
|
||||||
roadBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (roadBuilder != null) {
|
||||||
roadBuilder.append("\r\n");
|
roadBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
roadBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||||
@@ -801,7 +810,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -813,7 +822,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(), "请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -866,13 +875,25 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
if (fileListByUUID != null) {
|
if (fileListByUUID != null) {
|
||||||
fmRoadPic.setTag(fileListByUUID);
|
fmRoadPic.setTag(fileListByUUID);
|
||||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
if (booleanExtra) {//true
|
||||||
String encodeList = Geohash.getInstance().encodeList(lineStringByFileList);
|
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||||
|
if (lineStringByFileList != null) {
|
||||||
|
String encodeList = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||||
|
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);
|
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||||
poiEntity.setPhoto(photoStr);
|
poiEntity.setPhoto(photoStr);
|
||||||
if (encodeList != null) {
|
|
||||||
poiEntity.setDetail(encodeList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return poiEntity;
|
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;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置页面的fragment
|
* 我的-设置页面的fragment
|
||||||
*/
|
*/
|
||||||
public class SetFragment extends BaseFragment implements View.OnClickListener {
|
public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|||||||
@@ -309,7 +309,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), "有正在提交的数据,等提交成功后,方可操作");
|
ToastUtils.Message(getActivity(), "有正在提交的数据,等提交成功后,方可操作");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case R.id.btn_stay_submit://提交
|
case R.id.btn_stay_submit://提交
|
||||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了提交的按钮 ,");
|
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了提交的按钮 ,");
|
||||||
@@ -479,8 +478,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (staySubmitBuilder!=null) {
|
||||||
staySubmitBuilder.append("\r\n");
|
staySubmitBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
|
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,31 +70,26 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
ImageView ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
|
ImageView ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
|
||||||
taskExplainRecycle = findViewById(R.id.task_explain_recycler);
|
taskExplainRecycle = findViewById(R.id.task_explain_recycler);
|
||||||
ivFindTaskExplain.setOnClickListener(this);
|
ivFindTaskExplain.setOnClickListener(this);
|
||||||
|
|
||||||
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
//下划线
|
//下划线
|
||||||
// taskExplainRecycle.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
// taskExplainRecycle.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||||
|
|
||||||
taskExplainRecycle.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
taskExplainRecycle.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
taskExplainRecycle.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
taskExplainRecycle.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
//取消上啦加载下拉刷新
|
//取消上啦加载下拉刷新
|
||||||
// taskExplainRecycle.setPullRefreshEnabled(false);
|
// taskExplainRecycle.setPullRefreshEnabled(false);
|
||||||
// taskExplainRecycle.setLoadingMoreEnabled(false);
|
// taskExplainRecycle.setLoadingMoreEnabled(false);
|
||||||
taskExplainAdapter = new TaskExplainAdapter(explainList, getActivity());
|
taskExplainAdapter = new TaskExplainAdapter(explainList, getActivity());
|
||||||
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
||||||
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh() {
|
public void onRefresh() {
|
||||||
taskPage = 1;
|
taskPage = 1;
|
||||||
initNetWork(true);
|
initNetWork(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadMore() {
|
public void onLoadMore() {
|
||||||
initNetWork(false);
|
initNetWork(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
||||||
@Override
|
@Override
|
||||||
@@ -195,7 +190,6 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
} else {
|
} else {
|
||||||
if (taskPrefectureBean.getBody().getList() == null) {
|
if (taskPrefectureBean.getBody().getList() == null) {
|
||||||
taskExplainRecycle.setNoMore(true);
|
taskExplainRecycle.setNoMore(true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
taskExplainAdapter.notifyDataSetChanged();
|
taskExplainAdapter.notifyDataSetChanged();
|
||||||
@@ -232,9 +226,11 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (taskExplainBuilder!=null) {
|
||||||
taskExplainBuilder.append("\r\n");
|
taskExplainBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
|
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.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
|
|
||||||
import com.navinfo.outdoor.activity.WebActivity;
|
|
||||||
import com.navinfo.outdoor.adapter.TaskExplainAdapter2;
|
import com.navinfo.outdoor.adapter.TaskExplainAdapter2;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
|
||||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
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.TimestampUtil;
|
||||||
import com.navinfo.outdoor.util.ToastUtils;
|
import com.navinfo.outdoor.util.ToastUtils;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -44,7 +37,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现页面的任务说明的点击条目跳转第二个页面
|
* 发现-任务说明-操作说明
|
||||||
*/
|
*/
|
||||||
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
||||||
private XRecyclerView taskExplain2Recycler;
|
private XRecyclerView taskExplain2Recycler;
|
||||||
@@ -62,7 +55,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.fragment_task_explain2;
|
return R.layout.task_explains_fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -158,7 +151,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(), response.getMessage() );
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||||
}
|
}
|
||||||
@@ -169,9 +162,9 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -184,7 +177,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
explainList.clear();
|
explainList.clear();
|
||||||
}
|
}
|
||||||
if (taskPrefectureBean.getBody().getList() == null) {
|
if (taskPrefectureBean.getBody().getList() == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有相关数据");
|
ToastUtils.Message(getActivity(), "没有相关数据");
|
||||||
} else {
|
} else {
|
||||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
taskExplainPage++;
|
taskExplainPage++;
|
||||||
@@ -202,7 +195,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),taskPrefectureBean.getMessage());
|
ToastUtils.Message(getActivity(), taskPrefectureBean.getMessage());
|
||||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,9 +223,11 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (taskExplain2Builder != null) {
|
||||||
taskExplain2Builder.append("\r\n");
|
taskExplain2Builder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
|
taskExplain2Builder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -147,15 +147,16 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
initTaskPrefectureBean(taskPrefectureBean, aNet);
|
initTaskPrefectureBean(taskPrefectureBean, aNet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -168,7 +169,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
dataBeanList.clear();
|
dataBeanList.clear();
|
||||||
}
|
}
|
||||||
if (taskPrefectureBean.getBody().getList() == null) {
|
if (taskPrefectureBean.getBody().getList() == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有相关数据");
|
ToastUtils.Message(getActivity(), "没有相关数据");
|
||||||
} else {
|
} else {
|
||||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
taskPage++;
|
taskPage++;
|
||||||
@@ -188,7 +189,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
} else if (taskPrefectureBean.getCode() == 230) {
|
} else if (taskPrefectureBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),taskPrefectureBean.getMessage());
|
ToastUtils.Message(getActivity(), taskPrefectureBean.getMessage());
|
||||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,8 +217,10 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (taskPrefectureBuilder != null) {
|
||||||
taskPrefectureBuilder.append("\r\n");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
|
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.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
@@ -32,6 +33,7 @@ import androidx.fragment.app.FragmentTransaction;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.DensityUtil;
|
import com.github.lazylibrary.util.DensityUtil;
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -293,17 +295,17 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initUM() {
|
private void initUM() {
|
||||||
if (Constant.NOTIFICATION!=null){
|
if (Constant.NOTIFICATION != null) {
|
||||||
NotificationBean notificationBean = new Gson().fromJson(Constant.NOTIFICATION, NotificationBean.class);
|
NotificationBean notificationBean = new Gson().fromJson(Constant.NOTIFICATION, NotificationBean.class);
|
||||||
NotificationBean.ExtraBean extra = notificationBean.getExtra();
|
NotificationBean.ExtraBean extra = notificationBean.getExtra();
|
||||||
if (extra!=null){
|
if (extra != null) {
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id", extra.getId()+ "");
|
paramMap.put("id", extra.getId() + "");
|
||||||
Intent intent = new Intent(getActivity(), WebActivity.class);
|
Intent intent = new Intent(getActivity(), WebActivity.class);
|
||||||
intent.putExtra("map", paramMap);
|
intent.putExtra("map", paramMap);
|
||||||
intent.putExtra("url", HttpInterface.MSG_CONTENT);
|
intent.putExtra("url", HttpInterface.MSG_CONTENT);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}else {
|
} else {
|
||||||
Intent messageIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent messageIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
messageIntent.putExtra("tag", 35);
|
messageIntent.putExtra("tag", 35);
|
||||||
startActivity(messageIntent);
|
startActivity(messageIntent);
|
||||||
@@ -565,6 +567,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 网络删选接口
|
* 网络删选接口
|
||||||
|
*
|
||||||
* @param tencentLocation location
|
* @param tencentLocation location
|
||||||
*/
|
*/
|
||||||
private void initList(TencentLocation tencentLocation) {
|
private void initList(TencentLocation tencentLocation) {
|
||||||
@@ -842,6 +845,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* geo 坐标点转成
|
* geo 坐标点转成
|
||||||
|
*
|
||||||
* @param latLng lat
|
* @param latLng lat
|
||||||
*/
|
*/
|
||||||
public String initGeo(LatLng latLng) {
|
public String initGeo(LatLng latLng) {
|
||||||
@@ -863,6 +867,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* marker 选中的状态
|
* marker 选中的状态
|
||||||
|
*
|
||||||
* @param poiEntity PoiEntity
|
* @param poiEntity PoiEntity
|
||||||
* @param aBoolean boolean
|
* @param aBoolean boolean
|
||||||
*/
|
*/
|
||||||
@@ -1450,14 +1455,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else if (data.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
} else if (data.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||||
if (tencentMap != null) {
|
if (tencentMap != null) {
|
||||||
TencentLocation tencentLocation = (TencentLocation) data.obj;
|
TencentLocation tencentLocation = (TencentLocation) data.obj;
|
||||||
int gpsRssi = tencentLocation.getGPSRssi();
|
int gasRabi = tencentLocation.getGPSRssi();
|
||||||
if (gpsRssi == 0) {
|
if (gasRabi == 0) {
|
||||||
tvTenantGaps.setText("信号强度:无信号");
|
tvTenantGaps.setText("信号强度:无信号");
|
||||||
} else if (gpsRssi == 1) {
|
} else if (gasRabi == 1) {
|
||||||
tvTenantGaps.setText("信号强度:弱");
|
tvTenantGaps.setText("信号强度:弱");
|
||||||
} else if (gpsRssi == 2) {
|
} else if (gasRabi == 2) {
|
||||||
tvTenantGaps.setText("信号强度:中");
|
tvTenantGaps.setText("信号强度:中");
|
||||||
} else if (gpsRssi == 3) {
|
} else if (gasRabi == 3) {
|
||||||
tvTenantGaps.setText("信号强度:强");
|
tvTenantGaps.setText("信号强度:强");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1638,17 +1643,21 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (mapView != null) {
|
if (mapView != null) {
|
||||||
mapView.onDestroy();
|
mapView.onDestroy();
|
||||||
}
|
}
|
||||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (treasureBuilder != null) {
|
||||||
treasureBuilder.append("\r\n");
|
treasureBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
|
treasureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true);
|
||||||
|
}
|
||||||
//initLocation();
|
//initLocation();
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true);
|
|
||||||
if (bigMarker != null) {
|
if (bigMarker != null) {
|
||||||
bigMarker.remove();
|
bigMarker.remove();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < removableScreenMarker.size(); i++) {
|
if (removableScreenMarker != null) {
|
||||||
removableScreenMarker.get(i).remove();
|
for (int i = 0; i < removableScreenMarker.size(); i++) {
|
||||||
|
removableScreenMarker.get(i).remove();
|
||||||
|
}
|
||||||
|
removableScreenMarker.clear();
|
||||||
}
|
}
|
||||||
removableScreenMarker.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1671,8 +1680,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
case R.id.iv_location://定位:
|
case R.id.iv_location://定位:
|
||||||
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了定位的按钮,");
|
treasureBuilder.append(TimestampUtil.time()).append(",").append("点击了定位的按钮,");
|
||||||
if (Constant.currentLocation != null) {
|
if (Constant.currentLocation != null) {
|
||||||
CameraUpdate cameraSigma =
|
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
|
||||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()),//中心点坐标,地图目标经纬度
|
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()),//中心点坐标,地图目标经纬度
|
||||||
17,//目标缩放级别
|
17,//目标缩放级别
|
||||||
0,//目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
0,//目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ import java.util.regex.Pattern;
|
|||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实名认证
|
* 我的-用户资料-实名认证的fragment
|
||||||
*/
|
*/
|
||||||
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
|
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivAttestation2, ivAttestation1,ivAttestation3, ivHera1,ivHera2,ivHera3,useCamera;
|
private ImageView ivAttestation2, ivAttestation1, ivAttestation3, ivHera1, ivHera2, ivHera3, useCamera;
|
||||||
private EditText etAttestationName, etNamePhone;
|
private EditText etAttestationName, etNamePhone;
|
||||||
private TextView tvCard1, tvCard2, tvCard3;
|
private TextView tvCard1, tvCard2, tvCard3;
|
||||||
private File logFile;
|
private File logFile;
|
||||||
@@ -123,7 +123,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
Button btnAttestation = findViewById(R.id.btn_attestation);
|
Button btnAttestation = findViewById(R.id.btn_attestation);
|
||||||
btnAttestation.setOnClickListener(this);
|
btnAttestation.setOnClickListener(this);
|
||||||
LinearLayout linearHint = findViewById(R.id.linear_hint);
|
LinearLayout linearHint = findViewById(R.id.linear_hint);
|
||||||
etAttestationName = findViewById(R.id.et_attestationName);
|
etAttestationName = findViewById(R.id.et_attestationName);
|
||||||
etNamePhone = findViewById(R.id.et_namePhone);
|
etNamePhone = findViewById(R.id.et_namePhone);
|
||||||
ivHera1 = findViewById(R.id.iv_hera1);
|
ivHera1 = findViewById(R.id.iv_hera1);
|
||||||
tvCard1 = findViewById(R.id.tv_card1);
|
tvCard1 = findViewById(R.id.tv_card1);
|
||||||
@@ -220,15 +220,15 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
break;
|
break;
|
||||||
case R.id.btn_attestation:
|
case R.id.btn_attestation:
|
||||||
if (etAttestationName.getText().toString().equals("")) {
|
if (etAttestationName.getText().toString().equals("")) {
|
||||||
ToastUtils.Message(getActivity(),"姓名不能为空,请输入姓名");
|
ToastUtils.Message(getActivity(), "姓名不能为空,请输入姓名");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!chineseNameTest(etAttestationName.getText().toString())) {
|
if (!chineseNameTest(etAttestationName.getText().toString())) {
|
||||||
ToastUtils.Message(getActivity(),"请输入中文名字");
|
ToastUtils.Message(getActivity(), "请输入中文名字");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||||
ToastUtils.Message(getActivity(),"身份证号错误,请重新输入");
|
ToastUtils.Message(getActivity(), "身份证号错误,请重新输入");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nameAuthentication();
|
nameAuthentication();
|
||||||
@@ -263,23 +263,23 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
|
|
||||||
private void nameAuthentication() {
|
private void nameAuthentication() {
|
||||||
if (etAttestationName.getText().toString().equals("")) {
|
if (etAttestationName.getText().toString().equals("")) {
|
||||||
ToastUtils.Message(getActivity(),"姓名不能为空,请输入姓名");
|
ToastUtils.Message(getActivity(), "姓名不能为空,请输入姓名");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||||
ToastUtils.Message(getActivity(),"身份证错误,请重新输入");
|
ToastUtils.Message(getActivity(), "身份证错误,请重新输入");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tvCard1.getTag() == null) {
|
if (tvCard1.getTag() == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照 身份证人像面");
|
ToastUtils.Message(getActivity(), "请拍照 身份证人像面");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tvCard2.getTag() == null) {
|
if (tvCard2.getTag() == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照 身份证国徽面");
|
ToastUtils.Message(getActivity(), "请拍照 身份证国徽面");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tvCard3.getTag() == null) {
|
if (tvCard3.getTag() == null) {
|
||||||
ToastUtils.Message(getActivity(),"请拍照 手持身份证");
|
ToastUtils.Message(getActivity(), "请拍照 手持身份证");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ArrayList<File> takePhoneList = new ArrayList<>();
|
ArrayList<File> takePhoneList = new ArrayList<>();
|
||||||
@@ -326,7 +326,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"提交失败!");
|
ToastUtils.Message(getActivity(), "提交失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,9 +341,9 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.contains("timeout") || message.contains("Read time out")) {
|
if (message.contains("timeout") || message.contains("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: 失败" + e.getMessage() + "");
|
Log.d("TAG", "onSuccess: 失败" + e.getMessage() + "");
|
||||||
}
|
}
|
||||||
@@ -423,14 +423,14 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
IdCardNumberBean idCardNumberBean = new Gson().fromJson(inward, IdCardNumberBean.class);
|
IdCardNumberBean idCardNumberBean = new Gson().fromJson(inward, IdCardNumberBean.class);
|
||||||
if (idCardNumberBean == null) {
|
if (idCardNumberBean == null) {
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
} else {
|
} else {
|
||||||
if (idCardNumberBean.getWords_result().get公民身份号码() != null) {
|
if (idCardNumberBean.getWords_result().get公民身份号码() != null) {
|
||||||
String words = idCardNumberBean.getWords_result().get公民身份号码().getWords();
|
String words = idCardNumberBean.getWords_result().get公民身份号码().getWords();
|
||||||
etNamePhone.setText(words);
|
etNamePhone.setText(words);
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别成功 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别成功 ,");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"身份号识别失败,可以重新识别或则进行手动输入");
|
ToastUtils.Message(getActivity(), "身份号识别失败,可以重新识别或则进行手动输入");
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别失败,可以重新识别或则进行手动输入 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别失败,可以重新识别或则进行手动输入 ,");
|
||||||
}
|
}
|
||||||
if (idCardNumberBean.getWords_result().get姓名() != null) {
|
if (idCardNumberBean.getWords_result().get姓名() != null) {
|
||||||
@@ -438,18 +438,17 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
etAttestationName.setText(words);
|
etAttestationName.setText(words);
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别成功 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别成功 ,");
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"姓名识别失败,可以重新识别或则进行手动输入");
|
ToastUtils.Message(getActivity(), "姓名识别失败,可以重新识别或则进行手动输入");
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别失败,可以重新识别或则进行手动输入 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别失败,可以重新识别或则进行手动输入 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
|
userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
|
||||||
ToastUtils.Message(getActivity(),"识别失败,可以重新识别或则进行手动输入");
|
ToastUtils.Message(getActivity(), "识别失败,可以重新识别或则进行手动输入");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"请先拍照");
|
ToastUtils.Message(getActivity(), "请先拍照");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,9 +468,11 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
userAttestationBuilder.append(TimestampUtil.time()).append("onDestroy");
|
if (userAttestationBuilder != null) {
|
||||||
userAttestationBuilder.append("\r\n");
|
userAttestationBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), userAttestationBuilder.toString(), true);
|
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);
|
EventBus.getDefault().post(message);
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.tv_video_album_delete:
|
case R.id.tv_video_album_delete:
|
||||||
if (fileBeans != null) {
|
if (fileBeans != null) {
|
||||||
for (int i = 0; i < fileBeans.size(); i++) {
|
for (int i = 0; i < fileBeans.size(); i++) {
|
||||||
@@ -142,6 +143,7 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
ToastUtils.Message(getActivity(),"请选择要删除的数据后才可以删除");
|
ToastUtils.Message(getActivity(),"请选择要删除的数据后才可以删除");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import java.util.Date;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现页面的fragment
|
* 我的-提现页面的fragment
|
||||||
*/
|
*/
|
||||||
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
|
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView tvUnit, tvAlready, tvTotal, poiPushMoney, poiReportMoney, poiVideoPushMoney, poiVideoReportMoney, roadPushMoney, roadReportMoney, chargingPushMoney, chargingReportMoney, otherPushMoney, otherReportMoney;
|
private TextView tvUnit, tvAlready, tvTotal, poiPushMoney, poiReportMoney, poiVideoPushMoney, poiVideoReportMoney, roadPushMoney, roadReportMoney, chargingPushMoney, chargingReportMoney, otherPushMoney, otherReportMoney;
|
||||||
@@ -110,7 +110,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
if (Constant.BACKGROUND == null) {
|
if (Constant.BACKGROUND == null) {
|
||||||
ToastUtils.Message(getActivity(),"没有绑定银行卡,请先绑定银行卡");
|
ToastUtils.Message(getActivity(), "没有绑定银行卡,请先绑定银行卡");
|
||||||
checkBox.setChecked(false);
|
checkBox.setChecked(false);
|
||||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了银行卡的勾选,");
|
withdrawBuilder.append(TimestampUtil.time()).append(",").append("点击了银行卡的勾选,");
|
||||||
} else {
|
} else {
|
||||||
@@ -182,7 +182,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),response.getMessage());
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString());
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
@@ -192,10 +192,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -221,15 +221,15 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (!price.equals("")) {
|
if (!price.equals("")) {
|
||||||
double aDouble = Double.parseDouble(price);
|
double aDouble = Double.parseDouble(price);
|
||||||
if (aDouble < 10) {
|
if (aDouble < 10) {
|
||||||
ToastUtils.Message(getActivity(),"提现金额不能低于10元");
|
ToastUtils.Message(getActivity(), "提现金额不能低于10元");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"提现金额不能为空");
|
ToastUtils.Message(getActivity(), "提现金额不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!checkBox.isChecked()) {
|
if (!checkBox.isChecked()) {
|
||||||
ToastUtils.Message(getActivity(),"请勾选银行卡");
|
ToastUtils.Message(getActivity(), "请勾选银行卡");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Constant.BACKGROUND != null) {
|
if (Constant.BACKGROUND != null) {
|
||||||
@@ -243,7 +243,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),"请先绑定银行卡");
|
ToastUtils.Message(getActivity(), "请先绑定银行卡");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -288,7 +288,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("提现了失败 ,");
|
withdrawBuilder.append(TimestampUtil.time()).append(",").append("提现了失败 ,");
|
||||||
ToastUtils.Message(getActivity(),response.getMessage() );
|
ToastUtils.Message(getActivity(), response.getMessage());
|
||||||
}
|
}
|
||||||
etAllPrice.getText().clear();
|
etAllPrice.getText().clear();
|
||||||
Log.d("TAG", "onSuccess: " + response.getMessage() + response.getCode());
|
Log.d("TAG", "onSuccess: " + response.getMessage() + response.getCode());
|
||||||
@@ -299,10 +299,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时");
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -325,8 +325,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
if (withdrawBuilder != null) {
|
||||||
withdrawBuilder.append("\r\n");
|
withdrawBuilder.append(TimestampUtil.time()).append(",").append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true);
|
withdrawBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import java.util.Date;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现记录:
|
* 我的-去提现-提现记录的fragment:
|
||||||
*/
|
*/
|
||||||
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
|
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
super.initView();
|
super.initView();
|
||||||
ImageView ivWithdraw = findViewById(R.id.iv_withdraw);
|
ImageView ivWithdraw = findViewById(R.id.iv_withdraw);
|
||||||
ivWithdraw.setOnClickListener(this);
|
ivWithdraw.setOnClickListener(this);
|
||||||
rxlWithdraw = (XRecyclerView) findViewById(R.id.rxl_withdraw);
|
rxlWithdraw = findViewById(R.id.rxl_withdraw);
|
||||||
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
|
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
@@ -140,11 +140,11 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
} else if (withdrawalBean.getCode() == 230) {
|
} else if (withdrawalBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),withdrawalBean.getMessage() );
|
ToastUtils.Message(getActivity(), withdrawalBean.getMessage());
|
||||||
}
|
}
|
||||||
rxlWithdraw.loadMoreComplete();
|
rxlWithdraw.loadMoreComplete();
|
||||||
rxlWithdraw.refreshComplete();
|
rxlWithdraw.refreshComplete();
|
||||||
Log.d("TAG", "onSuccess: " + withdrawalBean.getMessage() + "");
|
Log.d("TAG", "onSuccess: " + withdrawalBean.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -154,10 +154,10 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.contains("timeout")||message.contains("Read time out")){
|
if (message.contains("timeout") || message.contains("Read time out")) {
|
||||||
ToastUtils.Message(getActivity(),"请求超时" );
|
ToastUtils.Message(getActivity(), "请求超时");
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.Message(getActivity(),message);
|
ToastUtils.Message(getActivity(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -186,8 +186,10 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onDestroy");
|
if (withdrawalRecordBuilder != null) {
|
||||||
withdrawalRecordBuilder.append("\r\n");
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawalRecordBuilder.toString(), true);
|
withdrawalRecordBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawalRecordBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.navinfo.outdoor.http;
|
package com.navinfo.outdoor.http;
|
||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
public static final String IP = "http://172.23.139.127:9999/m4";//测试接口
|
public static final String IP1 = "http://172.23.139.127:9999/m4";//测试接口
|
||||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||||
public static final String IP2 = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
|
||||||
public static final String USER_PATH = "/user/";//我的
|
public static final String USER_PATH = "/user/";//我的
|
||||||
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
||||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||||
@@ -40,9 +39,11 @@ public class HttpInterface {
|
|||||||
public static String USER_DETAIL_BY_USER_ID = null; //获取用户信息
|
public static String USER_DETAIL_BY_USER_ID = null; //获取用户信息
|
||||||
//172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
//172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
|
||||||
public static String INSERT_USER_GUIDE = null;//引导页完成接口
|
public static String INSERT_USER_GUIDE = null;//引导页完成接口
|
||||||
|
|
||||||
/* 发现
|
/* 发现
|
||||||
* Path=/m4/msgList/
|
* Path=/m4/msgList/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static String MSG_CONTENT = null;//发现 -富文本详情页请求
|
public static String MSG_CONTENT = null;//发现 -富文本详情页请求
|
||||||
public static String LIST_TASK = null;//任务专区
|
public static String LIST_TASK = null;//任务专区
|
||||||
public static String LIST_EVENT = 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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>
|
|
||||||
+12
@@ -24,6 +24,18 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:src="@drawable/ic_baseline_arrow"
|
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>
|
</LinearLayout>
|
||||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||||
android:id="@+id/task_explain2_recycler"
|
android:id="@+id/task_explain2_recycler"
|
||||||
Reference in New Issue
Block a user