用户直接进入,不用点击点登录界面,jpg 转成webp 图片格式的转换
This commit is contained in:
parent
3ede202a30
commit
ed379a7dc4
@ -139,5 +139,7 @@ dependencies {
|
|||||||
implementation 'cn.jzvd:jiaozivideoplayer:7.4.2'
|
implementation 'cn.jzvd:jiaozivideoplayer:7.4.2'
|
||||||
//图片压缩 https://github.com/Hu12037102/ImageCompress
|
//图片压缩 https://github.com/Hu12037102/ImageCompress
|
||||||
implementation 'com.github.Hu12037102:ImageCompress:2.3.0'
|
implementation 'com.github.Hu12037102:ImageCompress:2.3.0'
|
||||||
|
//webp 转换
|
||||||
|
implementation 'com.wanghong.webpnative:webpnative:0.1.0'
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,9 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -9,6 +12,8 @@ import android.view.View;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
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.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
@ -18,6 +23,11 @@ import com.navinfo.outdoor.http.Callback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 引导页
|
* 引导页
|
||||||
*/
|
*/
|
||||||
@ -79,6 +89,9 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder guidanceBuilder;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.activity_guidance;
|
return R.layout.activity_guidance;
|
||||||
@ -88,6 +101,29 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
frameLayout = findViewById(R.id.layout_frame);
|
frameLayout = findViewById(R.id.layout_frame);
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = this.getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
guidanceBuilder = new StringBuilder();
|
||||||
|
guidanceBuilder.append("GuidanceActivity-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
guidanceBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -109,16 +145,19 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
loginTaskItem.findViewById(R.id.btn_login).setOnClickListener(new View.OnClickListener() {
|
loginTaskItem.findViewById(R.id.btn_login).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了请查看APP使用说明 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x101;
|
message.what = 0x101;
|
||||||
handler.sendMessageDelayed(message, 1000);
|
handler.sendMessageDelayed(message, 1000);
|
||||||
v.setEnabled(false);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
taskItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
taskItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x102;
|
message.what = 0x102;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -128,6 +167,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -137,6 +177,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x104;
|
message.what = 0x104;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -146,6 +187,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x105;
|
message.what = 0x105;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -155,6 +197,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x106;
|
message.what = 0x106;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -164,6 +207,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x107;
|
message.what = 0x107;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -173,6 +217,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x108;
|
message.what = 0x108;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -182,6 +227,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x109;
|
message.what = 0x109;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -191,16 +237,17 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x110;
|
message.what = 0x110;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dataItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
dataItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x111;
|
message.what = 0x111;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -209,6 +256,8 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
withdrawItem.findViewById(R.id.btn_to_learn).setOnClickListener(new View.OnClickListener() {
|
withdrawItem.findViewById(R.id.btn_to_learn).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
v.setEnabled(false);
|
||||||
|
guidanceBuilder.append("点击了学会了,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x112;
|
message.what = 0x112;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
@ -231,13 +280,11 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
public void onSuccess(BaseBean<Integer> response, int id) {
|
public void onSuccess(BaseBean<Integer> response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
|
startActivity(new Intent(GuidanceActivity.this, HomeActivity.class));
|
||||||
|
GuidanceActivity.this.finish();
|
||||||
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_LONG).show();
|
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_LONG).show();
|
||||||
Intent intent = new Intent(GuidanceActivity.this, HomeActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -247,9 +294,24 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
guidanceBuilder.append("onPause,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
guidanceBuilder.append("onStop,");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
frameLayout.removeAllViews();
|
frameLayout.removeAllViews();
|
||||||
|
guidanceBuilder.append("onDestroy");
|
||||||
|
guidanceBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), guidanceBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
|
|
||||||
String name = etLoginName.getText().toString().trim();
|
String name = etLoginName.getText().toString().trim();
|
||||||
if (name.equals("")) {
|
if (name.equals("")) {
|
||||||
Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -31,10 +32,14 @@ import com.navinfo.outdoor.api.Constant;
|
|||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.navinfo.outdoor.bean.ApkVersionBean;
|
import com.navinfo.outdoor.bean.ApkVersionBean;
|
||||||
|
import com.navinfo.outdoor.bean.LoginOauthTokenBean;
|
||||||
|
import com.navinfo.outdoor.bean.UserDetailBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.util.APKVersionCodeUtils;
|
import com.navinfo.outdoor.util.APKVersionCodeUtils;
|
||||||
|
import com.navinfo.outdoor.util.Base64;
|
||||||
|
import com.navinfo.outdoor.util.Md5Util;
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -77,7 +82,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
private ProgressDialog pBar;
|
private ProgressDialog pBar;
|
||||||
private int progress;
|
private int progress;
|
||||||
private String user_id;
|
private SharedPreferences.Editor navInfoEditor;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -122,7 +127,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onGranted(List<String> permissions, boolean all) {
|
public void onGranted(List<String> permissions, boolean all) {
|
||||||
if (all) {
|
if (all) {
|
||||||
if (user_id!=null){
|
if (Constant.USHERED!=null){
|
||||||
initCheckVersion();
|
initCheckVersion();
|
||||||
}else {
|
}else {
|
||||||
initTime();
|
initTime();
|
||||||
@ -232,16 +237,139 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void initTime() {
|
public void initTime() {
|
||||||
|
if (Constant.ACCESS_TOKEN==null){
|
||||||
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}else {
|
||||||
|
initGetUserInfo();
|
||||||
|
}
|
||||||
|
/*
|
||||||
new CountDownTimer(3000, 1000) {
|
new CountDownTimer(3000, 1000) {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long l) {}
|
public void onTick(long l) {}
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
private void initGetUserInfo() {
|
||||||
|
OkGoBuilder.getInstance().Builder(this)
|
||||||
|
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
||||||
|
.token(Constant.ACCESS_TOKEN)
|
||||||
|
.params(new HttpParams())
|
||||||
|
.cls(UserDetailBean.class)
|
||||||
|
.getRequest(new Callback<UserDetailBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(UserDetailBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
if (response.getCode() == 200) {
|
||||||
|
UserDetailBean.BodyBean body = response.getBody();
|
||||||
|
if (body != null) {
|
||||||
|
navInfoEditor.putString("username", body.getUsername());
|
||||||
|
Constant.USER_NAME = body.getUsername();
|
||||||
|
navInfoEditor.putString("mobile", body.getMobile());
|
||||||
|
Constant.MOBILE = body.getMobile();
|
||||||
|
navInfoEditor.putInt("sex", body.getSex());//0:女 1:男
|
||||||
|
Constant.SEX = body.getSex();
|
||||||
|
navInfoEditor.putString("qq", body.getQq());
|
||||||
|
Constant.QQ = body.getQq();
|
||||||
|
navInfoEditor.putString("wechat", body.getWechat());
|
||||||
|
Constant.WCHAR = body.getWechat();
|
||||||
|
navInfoEditor.putInt("level", body.getLevel());
|
||||||
|
Constant.LEVEL = body.getLevel();
|
||||||
|
UserDetailBean.BodyBean.UserBankcardBean userBankcard = body.getUserBankcard();
|
||||||
|
if (userBankcard != null) {//存储银行卡信息
|
||||||
|
navInfoEditor.putString("bankAccount", userBankcard.getBankAccount());//银行卡编号
|
||||||
|
Constant.BACKGROUND = userBankcard.getBankAccount();
|
||||||
|
navInfoEditor.putString("idNumber", userBankcard.getIdNumber());//银行卡账号
|
||||||
|
Constant.ID_NUMBER = userBankcard.getIdNumber();
|
||||||
|
navInfoEditor.putString("bankName", userBankcard.getBankName());//銀行姓名
|
||||||
|
Constant.BACKGROUND_NAME = userBankcard.getBankName();
|
||||||
|
}
|
||||||
|
UserDetailBean.BodyBean.UserAuthBean userAuth = body.getUserAuth();
|
||||||
|
if (userAuth != null) {//存储身份证信息
|
||||||
|
navInfoEditor.putString("name", userAuth.getName());//身份证姓名
|
||||||
|
Constant.NAME = userAuth.getName();
|
||||||
|
navInfoEditor.putString("idnum", userAuth.getIdnum());//身份证号码
|
||||||
|
Constant.ID_NUM = userAuth.getIdnum();
|
||||||
|
navInfoEditor.putInt("auditstatus", userAuth.getAuditstatus());//审核状态
|
||||||
|
Constant.AUDIOTAPES = userAuth.getAuditstatus();
|
||||||
|
navInfoEditor.putString("auditmsg", userAuth.getAuditmsg());//审核信息
|
||||||
|
Constant.AUDITING = userAuth.getAuditmsg();
|
||||||
|
}
|
||||||
|
navInfoEditor.commit();
|
||||||
|
int needGuide = body.getNeedGuide();//0不需要 1需要
|
||||||
|
if (needGuide == 1) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, GuidanceActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
} else {
|
||||||
|
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
initLogIn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
private void initLogIn() {
|
||||||
|
try {
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
|
httpParams.put("grant_type", "refresh_token");
|
||||||
|
httpParams.put("datetime", time);
|
||||||
|
httpParams.put("refresh_token", Constant.REFRESH_TOKEN);
|
||||||
|
showLoadingDialog();
|
||||||
|
OkGoBuilder.getInstance()
|
||||||
|
.Builder(this)
|
||||||
|
.url(HttpInterface.USER_LOGIN_OAUTH_TOKEN)
|
||||||
|
.cls(LoginOauthTokenBean.class)
|
||||||
|
.params(httpParams)
|
||||||
|
.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(LoginOauthTokenBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
if (response.getCode() == 200) {
|
||||||
|
LoginOauthTokenBean.BodyBean body = response.getBody();
|
||||||
|
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
||||||
|
Constant.initRootFolder(body.getUserId());
|
||||||
|
HttpInterface.initHttpInter(body.getUserId());
|
||||||
|
}
|
||||||
|
navInfoEditor.putString("access_token", body.getAccess_token());
|
||||||
|
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
||||||
|
navInfoEditor.putString("user_id", body.getUserId());
|
||||||
|
navInfoEditor.commit();
|
||||||
|
Constant.ACCESS_TOKEN = body.getAccess_token();
|
||||||
|
Constant.REFRESH_TOKEN = body.getRefresh_token();
|
||||||
|
Constant.USHERED = body.getUserId();
|
||||||
|
initGetUserInfo();//获取用户信息
|
||||||
|
} else {
|
||||||
Intent intent = new Intent( MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent( MainActivity.this, LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}.start();
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Toast.makeText(MainActivity.this, e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -292,7 +420,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
if (fileOutputStream != null) {
|
if (fileOutputStream != null) {
|
||||||
fileOutputStream.flush();
|
fileOutputStream.flush();
|
||||||
fileOutputStream.close();
|
|
||||||
}
|
}
|
||||||
handler.sendEmptyMessage(0);//apk下载完成,使用Handler()通知安装apk
|
handler.sendEmptyMessage(0);//apk下载完成,使用Handler()通知安装apk
|
||||||
}
|
}
|
||||||
@ -304,13 +431,20 @@ public class MainActivity extends BaseActivity {
|
|||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CommitPrefEdits")
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
SharedPreferences navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
SharedPreferences navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||||
user_id = navInfo.getString("user_id", null);
|
navInfoEditor = navInfo.edit();
|
||||||
Constant.ACCESS_TOKEN= navInfo.getString("access_token", null);;
|
Constant.USHERED = navInfo.getString("user_id", null);
|
||||||
HttpInterface.initAppPath(user_id);
|
Constant.REFRESH_TOKEN = navInfo.getString("refresh_token", null);
|
||||||
|
Constant.ACCESS_TOKEN= navInfo.getString("access_token", null);
|
||||||
|
if (Constant.USHERED!=null){
|
||||||
|
HttpInterface.initAppPath(Constant.USHERED);
|
||||||
|
Constant.initRootFolder(Constant.USHERED);
|
||||||
|
HttpInterface.initHttpInter(Constant.USHERED);
|
||||||
|
}
|
||||||
initPermission();
|
initPermission();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -60,6 +60,7 @@ import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import com.wanghong.webpnative.WebPNative;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -166,12 +167,41 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
result.toFile(file, new FileCallback() {
|
result.toFile(file, new FileCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onFileReady(@Nullable File file) {
|
public void onFileReady(@Nullable File file) {
|
||||||
assert file != null && file.exists();
|
if (file.exists()) {
|
||||||
|
WebPNative webPNative = new WebPNative();
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||||
|
webPNative.encodeRGBA(bitmap, file.getPath(), 90);
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.putExtra("file", file.getPath());
|
intent.putExtra("file", file.getAbsolutePath());
|
||||||
setResult(0x104, intent);
|
setResult(0x104, intent);
|
||||||
SystemTTS.getInstance(PhotographActivity.this).stopSpeak();
|
SystemTTS.getInstance(PhotographActivity.this).stopSpeak();
|
||||||
PhotographActivity.this.finish();
|
PhotographActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* long start = System.currentTimeMillis();
|
||||||
|
long useTime = System.currentTimeMillis() - start;
|
||||||
|
Log.e("WebpUtil:", String.valueOf(useTime));
|
||||||
|
File file = new File(output.substring(0, output.length() - 5) + ".webp");
|
||||||
|
new File(output).renameTo(file);*/
|
||||||
|
if (!bitmap.isRecycled()) {
|
||||||
|
bitmap.recycle();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("output:", e.toString());
|
||||||
|
Toast.makeText(PhotographActivity.this, "文件转换失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(PhotographActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
/* CompressImageTask.get().compressImage(ImageConfig.getDefaultConfig(file.getAbsolutePath(), file.getAbsolutePath()), new AsyncImageTask.OnImageResult(){
|
/* CompressImageTask.get().compressImage(ImageConfig.getDefaultConfig(file.getAbsolutePath(), file.getAbsolutePath()), new AsyncImageTask.OnImageResult(){
|
||||||
@Override
|
@Override
|
||||||
public void startCompress() {
|
public void startCompress() {
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
@ -17,7 +15,6 @@ import android.os.Message;
|
|||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
@ -26,12 +23,10 @@ import android.widget.FrameLayout;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
|
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
@ -40,14 +35,12 @@ import com.navinfo.outdoor.util.MyTecentLocationSource;
|
|||||||
import com.otaliastudios.cameraview.CameraException;
|
import com.otaliastudios.cameraview.CameraException;
|
||||||
import com.otaliastudios.cameraview.CameraListener;
|
import com.otaliastudios.cameraview.CameraListener;
|
||||||
import com.otaliastudios.cameraview.CameraLogger;
|
import com.otaliastudios.cameraview.CameraLogger;
|
||||||
|
|
||||||
import com.otaliastudios.cameraview.CameraOptions;
|
import com.otaliastudios.cameraview.CameraOptions;
|
||||||
import com.otaliastudios.cameraview.CameraView;
|
import com.otaliastudios.cameraview.CameraView;
|
||||||
import com.otaliastudios.cameraview.FileCallback;
|
import com.otaliastudios.cameraview.FileCallback;
|
||||||
import com.otaliastudios.cameraview.PictureResult;
|
import com.otaliastudios.cameraview.PictureResult;
|
||||||
import com.otaliastudios.cameraview.VideoResult;
|
import com.otaliastudios.cameraview.VideoResult;
|
||||||
import com.otaliastudios.cameraview.controls.Mode;
|
import com.otaliastudios.cameraview.controls.Mode;
|
||||||
|
|
||||||
import com.otaliastudios.cameraview.size.Size;
|
import com.otaliastudios.cameraview.size.Size;
|
||||||
import com.tencent.map.geolocation.TencentLocation;
|
import com.tencent.map.geolocation.TencentLocation;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||||
@ -66,13 +59,10 @@ import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
@ -87,11 +77,9 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
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;
|
||||||
@ -192,7 +180,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
captureVideo.setText("暂停采集");
|
captureVideo.setText("暂停采集");
|
||||||
// stopVideo.setEnabled(false);// 开始采集视频后,禁用停止采集的按钮,必须暂停采集后才可点击停止采集
|
// stopVideo.setEnabled(false);// 开始采集视频后,禁用停止采集的按钮,必须暂停采集后才可点击停止采集
|
||||||
startTakenVideo(); // 开始采集视频
|
startTakenVideo(); // 开始采集视频
|
||||||
|
@ -65,6 +65,7 @@ import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import com.wanghong.webpnative.WebPNative;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -265,11 +266,21 @@ 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) {
|
||||||
assert file != null;
|
if (file.exists()) {
|
||||||
|
WebPNative webPNative = new WebPNative();
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
|
||||||
|
webPNative.encodeRGBA(bitmap, file.getPath(), 90);
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
initMarker();
|
initMarker();
|
||||||
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
||||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
|
||||||
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
if (poi_video_type == 2) {
|
if (poi_video_type == 2) {
|
||||||
@ -279,6 +290,25 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
/* long start = System.currentTimeMillis();
|
||||||
|
long useTime = System.currentTimeMillis() - start;
|
||||||
|
Log.e("WebpUtil:", String.valueOf(useTime));
|
||||||
|
File file = new File(output.substring(0, output.length() - 5) + ".webp");
|
||||||
|
new File(output).renameTo(file);*/
|
||||||
|
if (!bitmap.isRecycled()) {
|
||||||
|
bitmap.recycle();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("output:", e.toString());
|
||||||
|
Toast.makeText(PicturesActivity.this, "文件转换失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(PicturesActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
@ -308,10 +338,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
|
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions
|
PolylineOptions polylineOptions = new PolylineOptions().addAll(latLineString)
|
||||||
= new PolylineOptions().addAll(latLineString)
|
|
||||||
// 折线设置圆形线头
|
// 折线设置圆形线头
|
||||||
.lineCap(true)
|
.lineCap(true)
|
||||||
// 折线的颜色为绿色
|
// 折线的颜色为绿色
|
||||||
@ -366,7 +394,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
picturesBuilder.append("onClick 点击了结束采集 ,");
|
picturesBuilder.append("onClick 点击了结束采集 ,");
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".jpg";
|
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
|
||||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||||
intent.putExtra("type", poi_video_type);
|
intent.putExtra("type", poi_video_type);
|
||||||
setResult(0x111, intent);
|
setResult(0x111, intent);
|
||||||
|
@ -284,7 +284,6 @@ public class TestActivity extends BaseActivity {
|
|||||||
planarMarker.setClickable(true);
|
planarMarker.setClickable(true);
|
||||||
onMarker(geo, planarMarker);
|
onMarker(geo, planarMarker);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,7 +342,6 @@ public class TestActivity extends BaseActivity {
|
|||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||||
// initCluster();
|
// initCluster();
|
||||||
initNewMarker();
|
initNewMarker();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNewMarker() {
|
private void initNewMarker() {
|
||||||
|
@ -18,6 +18,7 @@ import android.widget.Toast;
|
|||||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||||
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
||||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||||
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
@ -321,7 +322,8 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
pvOptions.show();
|
pvOptions.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initJsonData() {//解析数据 (省市区三级联动)
|
private void initJsonData() {
|
||||||
|
//解析数据 (省市区三级联动)
|
||||||
/* 注意:assets 目录下的Json文件仅供参考,实际使用可自行替换文件
|
/* 注意:assets 目录下的Json文件仅供参考,实际使用可自行替换文件
|
||||||
* 关键逻辑在于循环体
|
* 关键逻辑在于循环体
|
||||||
*/
|
*/
|
||||||
@ -342,8 +344,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
ArrayList<CityBean> AreaList = new ArrayList<>();//该城市的所有地区列表
|
ArrayList<CityBean> AreaList = new ArrayList<>();//该城市的所有地区列表
|
||||||
ArrayList<String> City_AreaList = new ArrayList<>();//该城市的所有地区列表
|
ArrayList<String> City_AreaList = new ArrayList<>();//该城市的所有地区列表
|
||||||
//如果无地区数据,建议添加空字符串,防止数据为null 导致三个选项长度不匹配造成崩溃
|
//如果无地区数据,建议添加空字符串,防止数据为null 导致三个选项长度不匹配造成崩溃
|
||||||
if (jsonBean.get(i).getCitys().get(c).getCounties() == null
|
if (jsonBean.get(i).getCitys().get(c).getCounties() == null || jsonBean.get(i).getCitys().get(c).getCounties().size() == 0) {
|
||||||
|| jsonBean.get(i).getCitys().get(c).getCounties().size() == 0) {
|
|
||||||
AreaList.add(new CityBean("", ""));
|
AreaList.add(new CityBean("", ""));
|
||||||
City_AreaList.add("");
|
City_AreaList.add("");
|
||||||
} else {
|
} else {
|
||||||
@ -355,17 +356,16 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
Province_AreaList.add(City_AreaList);//添加该省所有地区数据
|
Province_AreaList.add(City_AreaList);//添加该省所有地区数据
|
||||||
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
||||||
}
|
}
|
||||||
/*添加城市数据
|
/*添加城市数据*/
|
||||||
*/
|
|
||||||
options2Items.add(CityList);
|
options2Items.add(CityList);
|
||||||
/* 添加地区数据
|
/*添加地区数据*/
|
||||||
*/
|
|
||||||
options3Items.add(Province_AreaList);
|
options3Items.add(Province_AreaList);
|
||||||
cityItems.add(city_AreaList);
|
cityItems.add(city_AreaList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<JsonBean> parseData(String result) {//GOON 解析
|
public ArrayList<JsonBean> parseData(String result) {
|
||||||
|
//GOON 解析
|
||||||
ArrayList<JsonBean> detail = new ArrayList<>();
|
ArrayList<JsonBean> detail = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
JSONArray data = new JSONArray(result);
|
JSONArray data = new JSONArray(result);
|
||||||
@ -395,6 +395,8 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
userBuilder.append("onDestroy ,");
|
userBuilder.append("onDestroy ");
|
||||||
|
userBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,8 +93,6 @@ public class PhotoAdapter extends RecyclerView.Adapter<PhotoAdapter.ViewHolder>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,11 +17,9 @@ import java.io.File;
|
|||||||
* 常量
|
* 常量
|
||||||
*/
|
*/
|
||||||
public class Constant {
|
public class Constant {
|
||||||
/*当前网络不可用
|
/*当前网络不可用*/
|
||||||
*/
|
|
||||||
public static final CharSequence NETWORK_UNAVAILABLE = "当前网络不可用,请检查网络设置";
|
public static final CharSequence NETWORK_UNAVAILABLE = "当前网络不可用,请检查网络设置";
|
||||||
/*位置权限
|
/*位置权限*/
|
||||||
*/
|
|
||||||
public static final String SET_LOCATION_PERMISSION = "请在“设置”中给予“TengXunMap”位置权限,否则当前功能将不可使用";
|
public static final String SET_LOCATION_PERMISSION = "请在“设置”中给予“TengXunMap”位置权限,否则当前功能将不可使用";
|
||||||
public static final String SET_LOCATION = "请在“设置”中给予权限否则当前功能将不可使用";
|
public static final String SET_LOCATION = "请在“设置”中给予权限否则当前功能将不可使用";
|
||||||
public static final String GET_ERR_MESSAGE1 = "设备缺少使用腾讯定位服务需要的基本条件";
|
public static final String GET_ERR_MESSAGE1 = "设备缺少使用腾讯定位服务需要的基本条件";
|
||||||
@ -65,11 +63,11 @@ public class Constant {
|
|||||||
//筛选
|
//筛选
|
||||||
public static final int FILTER_CODE = 0x200;
|
public static final int FILTER_CODE = 0x200;
|
||||||
/*
|
/*
|
||||||
* 存储用户信息
|
存储用户信息
|
||||||
* access_token 后续需求需要用到的key 过期时间8小时
|
access_token 后续需求需要用到的key 过期时间8小时
|
||||||
* refresh_token 刷新token用 过期时间1个月
|
refresh_token 刷新token用 过期时间1个月
|
||||||
* userId 用户id
|
userId 用户id
|
||||||
* username 用户编号
|
username 用户编号
|
||||||
*/
|
*/
|
||||||
public static String ACCESS_TOKEN = null;
|
public static String ACCESS_TOKEN = null;
|
||||||
public static String REFRESH_TOKEN = null;
|
public static String REFRESH_TOKEN = null;
|
||||||
@ -141,12 +139,11 @@ public class Constant {
|
|||||||
public static int TASK_TYPE = -1; // 任务类型
|
public static int TASK_TYPE = -1; // 任务类型
|
||||||
public static int TASK_STARTUP = -1; // 任务状态
|
public static int TASK_STARTUP = -1; // 任务状态
|
||||||
public static String CODE = ""; //区号
|
public static String CODE = ""; //区号
|
||||||
/**
|
/*用户当前位置*/
|
||||||
* 用户当前位置
|
|
||||||
*/
|
|
||||||
public static TencentLocation currentLocation;
|
public static TencentLocation currentLocation;
|
||||||
public static LatLng markerLacing;
|
public static LatLng markerLacing;
|
||||||
//marker 图标
|
//marker
|
||||||
|
|
||||||
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
||||||
public static final BitmapDescriptor MARKER_CHARGE_PILE_SHOW=BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_pile_show);
|
public static final BitmapDescriptor MARKER_CHARGE_PILE_SHOW=BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_pile_show);
|
||||||
@ -154,15 +151,13 @@ public class Constant {
|
|||||||
public static final BitmapDescriptor MARKER_ROOD_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_show);
|
public static final BitmapDescriptor MARKER_ROOD_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_show);
|
||||||
public static final BitmapDescriptor MARKER_OTHER_SHOW= BitmapDescriptorFactory.fromResource(R.drawable.marker_other_show);
|
public static final BitmapDescriptor MARKER_OTHER_SHOW= BitmapDescriptorFactory.fromResource(R.drawable.marker_other_show);
|
||||||
public static final BitmapDescriptor MARKER_FACET_SHOW= BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_show);
|
public static final BitmapDescriptor MARKER_FACET_SHOW= BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_show);
|
||||||
|
|
||||||
public static final BitmapDescriptor MARKER_POI = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi);
|
public static final BitmapDescriptor MARKER_POI = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi);
|
||||||
public static final BitmapDescriptor MARKER_CHARGE = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge);
|
|
||||||
public static final BitmapDescriptor MARKER_CHARGE_PILE=BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_pile);
|
public static final BitmapDescriptor MARKER_CHARGE_PILE=BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_pile);
|
||||||
public static final BitmapDescriptor MARKER_POI_VIDEO = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video);
|
public static final BitmapDescriptor MARKER_POI_VIDEO = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video);
|
||||||
public static final BitmapDescriptor MARKER_ROOD = BitmapDescriptorFactory.fromResource(R.drawable.marker_road);
|
public static final BitmapDescriptor MARKER_ROOD = BitmapDescriptorFactory.fromResource(R.drawable.marker_road);
|
||||||
public static final BitmapDescriptor MARKER_OTHER= BitmapDescriptorFactory.fromResource(R.drawable.marker_other);
|
public static final BitmapDescriptor MARKER_OTHER= BitmapDescriptorFactory.fromResource(R.drawable.marker_other);
|
||||||
public static final BitmapDescriptor MARKER_FACET= BitmapDescriptorFactory.fromResource(R.drawable.marker_facet);
|
public static final BitmapDescriptor MARKER_FACET= BitmapDescriptorFactory.fromResource(R.drawable.marker_facet);
|
||||||
|
|
||||||
public static final BitmapDescriptor GRAY_POI = BitmapDescriptorFactory.fromResource(R.drawable.graypoi);
|
public static final BitmapDescriptor GRAY_POI = BitmapDescriptorFactory.fromResource(R.drawable.graypoi);
|
||||||
public static final BitmapDescriptor GRAY_CHARGE = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
public static final BitmapDescriptor GRAY_CHARGE = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
||||||
public static final BitmapDescriptor GRAY_CHARGE_PILE=BitmapDescriptorFactory.fromResource(R.drawable.graychargepile);
|
public static final BitmapDescriptor GRAY_CHARGE_PILE=BitmapDescriptorFactory.fromResource(R.drawable.graychargepile);
|
||||||
@ -170,9 +165,7 @@ public class Constant {
|
|||||||
public static final BitmapDescriptor GRAY_ROOD = BitmapDescriptorFactory.fromResource(R.drawable.grayroad);
|
public static final BitmapDescriptor GRAY_ROOD = BitmapDescriptorFactory.fromResource(R.drawable.grayroad);
|
||||||
public static final BitmapDescriptor GRAY_OTHER= BitmapDescriptorFactory.fromResource(R.drawable.grayother);
|
public static final BitmapDescriptor GRAY_OTHER= BitmapDescriptorFactory.fromResource(R.drawable.grayother);
|
||||||
public static final BitmapDescriptor GRAY_FACET= BitmapDescriptorFactory.fromResource(R.drawable.grayfacet);
|
public static final BitmapDescriptor GRAY_FACET= BitmapDescriptorFactory.fromResource(R.drawable.grayfacet);
|
||||||
|
|
||||||
public static final BitmapDescriptor ICON_OPERATION=BitmapDescriptorFactory.fromResource(R.mipmap.icon_operation);
|
public static final BitmapDescriptor ICON_OPERATION=BitmapDescriptorFactory.fromResource(R.mipmap.icon_operation);
|
||||||
|
|
||||||
public static JobSearchBean jobSearchBean;//数
|
public static JobSearchBean jobSearchBean;//数
|
||||||
public static MapView treasureMap;
|
public static MapView treasureMap;
|
||||||
public static final String INTENT_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
public static final String INTENT_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||||
@ -183,7 +176,7 @@ public class Constant {
|
|||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||||
public static final String NAVIN_FO = "10.18";//版本日期
|
public static final String NAVIN_FO = "10.22";//版本日期
|
||||||
/*
|
/*
|
||||||
*联系我们的QQ群名称和QQ群号
|
*联系我们的QQ群名称和QQ群号
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
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;
|
||||||
@ -10,6 +13,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
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.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
@ -28,7 +32,11 @@ import com.umeng.umcrash.UMCrash;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -40,6 +48,8 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||||
private int capacityPage = 1;
|
private int capacityPage = 1;
|
||||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList ;
|
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList ;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder capacityEvaluationBuilder;
|
||||||
|
|
||||||
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
||||||
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
||||||
@ -81,6 +91,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
capacityEvaluationAdapter.setOnCapacityClick(new CapacityEvaluationAdapter.OnCapacityClick() {
|
capacityEvaluationAdapter.setOnCapacityClick(new CapacityEvaluationAdapter.OnCapacityClick() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(int id) {
|
public void onClick(int id) {
|
||||||
|
capacityEvaluationBuilder.append("点击了item ,");
|
||||||
Intent capacityEvaWeb = new Intent(getActivity(), FragmentManagement.class);
|
Intent capacityEvaWeb = new Intent(getActivity(), FragmentManagement.class);
|
||||||
capacityEvaWeb.putExtra("tag", 14);
|
capacityEvaWeb.putExtra("tag", 14);
|
||||||
capacityEvaWeb.putExtra("id",id+"");
|
capacityEvaWeb.putExtra("id",id+"");
|
||||||
@ -94,6 +105,29 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
super.initData();
|
super.initData();
|
||||||
capacityList=new ArrayList<>();
|
capacityList=new ArrayList<>();
|
||||||
initNewWork(true);
|
initNewWork(true);
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
capacityEvaluationBuilder = new StringBuilder();
|
||||||
|
capacityEvaluationBuilder.append("CapacityEvaluationFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
capacityEvaluationBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNewWork(boolean aNet) {
|
private void initNewWork(boolean aNet) {
|
||||||
@ -125,10 +159,8 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
/**
|
/* 友盟+
|
||||||
* 友盟+
|
* 返回自定义报错信息*/
|
||||||
* 返回自定义报错信息
|
|
||||||
*/
|
|
||||||
UMCrash.generateCustomLog("网络请求报错-位置:CapacityEvaluationFragment" + e.getMessage(), "UmengException");
|
UMCrash.generateCustomLog("网络请求报错-位置:CapacityEvaluationFragment" + e.getMessage(), "UmengException");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -166,6 +198,27 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_evaluation_task_finish) {
|
if (v.getId() == R.id.iv_evaluation_task_finish) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
capacityEvaluationBuilder.append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
capacityEvaluationBuilder.append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
capacityEvaluationBuilder.append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
capacityEvaluationBuilder.append("onDestroy ");
|
||||||
|
capacityEvaluationBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), capacityEvaluationBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,5 +1,8 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
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;
|
||||||
@ -11,6 +14,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
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.FileUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
@ -34,7 +38,11 @@ import com.kongzue.dialog.v3.MessageDialog;
|
|||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -51,7 +59,8 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
private ArrayList<ExamBean> examBeans;
|
private ArrayList<ExamBean> examBeans;
|
||||||
private String examId;
|
private String examId;
|
||||||
private Gson gson;
|
private Gson gson;
|
||||||
private Button btn;
|
private File logFile;
|
||||||
|
private StringBuilder capacityMeasureBuilder;
|
||||||
|
|
||||||
|
|
||||||
public static CapacityMeasurementFragment newInstance(Bundle bundle) {
|
public static CapacityMeasurementFragment newInstance(Bundle bundle) {
|
||||||
@ -74,7 +83,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
||||||
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
||||||
btn = findViewById(R.id.btn);
|
Button btn = findViewById(R.id.btn);
|
||||||
btn.setOnClickListener(this);
|
btn.setOnClickListener(this);
|
||||||
gson = new Gson();
|
gson = new Gson();
|
||||||
}
|
}
|
||||||
@ -85,6 +94,29 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
baleen = new ArrayList<>();
|
baleen = new ArrayList<>();
|
||||||
examBeans = new ArrayList<>();
|
examBeans = new ArrayList<>();
|
||||||
initNetWorks();
|
initNetWorks();
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
capacityMeasureBuilder = new StringBuilder();
|
||||||
|
capacityMeasureBuilder.append("CapacityMeasurementFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
capacityMeasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWorks() {
|
private void initNetWorks() {
|
||||||
@ -137,9 +169,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_measurement_finish:
|
case R.id.iv_measurement_finish:
|
||||||
|
capacityMeasureBuilder.append("点击了返回的按钮 ,");
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.btn:
|
case R.id.btn:
|
||||||
|
capacityMeasureBuilder.append("点击了提交的的按钮 ,");
|
||||||
if (baleen.size() != 0) {
|
if (baleen.size() != 0) {
|
||||||
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
||||||
for (int i = 0; i < baleen.size(); i++) {
|
for (int i = 0; i < baleen.size(); i++) {
|
||||||
@ -217,4 +251,24 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
capacityMeasureBuilder.append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
capacityMeasureBuilder.append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
capacityMeasureBuilder.append("onDestroy");
|
||||||
|
capacityMeasureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
@ -209,7 +209,9 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
markerPile.setIcon(pileDescriptor);
|
markerPile.setIcon(pileDescriptor);
|
||||||
checkBoxLife.setText("编辑");
|
checkBoxLife.setText("编辑");
|
||||||
checkBoxLife.setTextColor(Color.BLACK);
|
checkBoxLife.setTextColor(Color.BLACK);
|
||||||
|
if (screenPilePositions.x!=0||screenPilePositions.y!=0){
|
||||||
latLng = tencentMap.getProjection().fromScreenLocation(screenPilePositions);
|
latLng = tencentMap.getProjection().fromScreenLocation(screenPilePositions);
|
||||||
|
}
|
||||||
markerPile.setPosition(latLng);
|
markerPile.setPosition(latLng);
|
||||||
markerPile.setFixingPointEnable(false);
|
markerPile.setFixingPointEnable(false);
|
||||||
checkBoxLife.setChecked(false);
|
checkBoxLife.setChecked(false);
|
||||||
|
@ -302,7 +302,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
markerStation.setIcon(stationDescriptor);
|
markerStation.setIcon(stationDescriptor);
|
||||||
checkBoxLife.setText("编辑");
|
checkBoxLife.setText("编辑");
|
||||||
checkBoxLife.setTextColor(Color.BLACK);
|
checkBoxLife.setTextColor(Color.BLACK);
|
||||||
|
if (screenStationPositions.x!=0||screenStationPositions.y!=0){
|
||||||
latLng = tencentMap.getProjection().fromScreenLocation(screenStationPositions);
|
latLng = tencentMap.getProjection().fromScreenLocation(screenStationPositions);
|
||||||
|
}
|
||||||
markerStation.setPosition(latLng);
|
markerStation.setPosition(latLng);
|
||||||
markerStation.setFixingPointEnable(false);
|
markerStation.setFixingPointEnable(false);
|
||||||
checkBoxLife.setChecked(false);
|
checkBoxLife.setChecked(false);
|
||||||
@ -1116,7 +1118,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
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;
|
||||||
@ -10,6 +13,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
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.activity.WebActivity;
|
||||||
@ -27,7 +31,11 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -41,6 +49,8 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
||||||
private EventPrefectureAdapter eventPrefectureAdapter;
|
private EventPrefectureAdapter eventPrefectureAdapter;
|
||||||
private int eventPage = 1;
|
private int eventPage = 1;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder eventPrefectureBuilder;
|
||||||
|
|
||||||
public static EventPrefectureFragment newInstance(Bundle bundle) {
|
public static EventPrefectureFragment newInstance(Bundle bundle) {
|
||||||
EventPrefectureFragment fragment = new EventPrefectureFragment();
|
EventPrefectureFragment fragment = new EventPrefectureFragment();
|
||||||
@ -58,6 +68,28 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
super.initData();
|
super.initData();
|
||||||
taskExplainBean = new ArrayList<>();
|
taskExplainBean = new ArrayList<>();
|
||||||
initNetwork(true);
|
initNetwork(true);
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
eventPrefectureBuilder = new StringBuilder();
|
||||||
|
eventPrefectureBuilder.append("EventPrefectureFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
eventPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetwork(boolean aNet) {
|
private void initNetwork(boolean aNet) {
|
||||||
@ -137,6 +169,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
// eventRecycler.setLoadingMoreEnabled(false);
|
// eventRecycler.setLoadingMoreEnabled(false);
|
||||||
eventPrefectureAdapter = new EventPrefectureAdapter(taskExplainBean,getActivity());
|
eventPrefectureAdapter = new EventPrefectureAdapter(taskExplainBean,getActivity());
|
||||||
eventRecycler.setAdapter(eventPrefectureAdapter);
|
eventRecycler.setAdapter(eventPrefectureAdapter);
|
||||||
|
|
||||||
eventRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
eventRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh() {
|
public void onRefresh() {
|
||||||
@ -149,9 +182,11 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
initNetwork(false);
|
initNetwork(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
||||||
@Override
|
@Override
|
||||||
public void item(int aInt) {
|
public void item(int aInt) {
|
||||||
|
eventPrefectureBuilder.append("点击了item ,");
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id",aInt+"");
|
paramMap.put("id",aInt+"");
|
||||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||||
@ -163,6 +198,27 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_event_task) {
|
if (v.getId() == R.id.iv_event_task) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
eventPrefectureBuilder.append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
eventPrefectureBuilder.append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
eventPrefectureBuilder.append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
eventPrefectureBuilder.append("onDestroy ,");
|
||||||
|
eventPrefectureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
/**
|
/**
|
||||||
* 保存小数点后两位
|
* 保存小数点后两位
|
||||||
* @param value
|
* @param value
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static String format2(double value) {
|
public static String format2(double value) {
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
@ -282,9 +281,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
LatLng endLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
LatLng endLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
||||||
if (geometry > 5000) {
|
if (geometry > 5000) {
|
||||||
initGather();
|
|
||||||
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
||||||
// return;
|
return;
|
||||||
}else {
|
}else {
|
||||||
if (geometry>50){
|
if (geometry>50){
|
||||||
// Voice.sprat("注意在附近50米范围内进行采集",0);
|
// Voice.sprat("注意在附近50米范围内进行采集",0);
|
||||||
@ -572,10 +570,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @param url
|
* @param url
|
||||||
* 所以类型的结束领取
|
* 所以类型的结束领取
|
||||||
*/
|
*/
|
||||||
@ -629,7 +626,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -849,8 +845,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void senMessageMarker(int type, String y, String x) {
|
private void senMessageMarker(int type, String y, String x) {
|
||||||
Message markerMsg = Message.obtain();
|
Message markerMsg = Message.obtain();
|
||||||
markerMsg.what = Constant.EVENT_WHAT_CURRENT_MARKER;
|
markerMsg.what = Constant.EVENT_WHAT_CURRENT_MARKER;
|
||||||
@ -861,7 +855,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url 不同任务类型对应的url
|
* @param url
|
||||||
|
* 不同任务类型对应的url
|
||||||
*/
|
*/
|
||||||
private void taskByNet(String url, int taskId, boolean isSaver, int statusId) {
|
private void taskByNet(String url, int taskId, boolean isSaver, int statusId) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@ -958,7 +953,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -993,4 +987,5 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
gatherGetBuilder.append("\r\n");
|
gatherGetBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "5");
|
httpParams.put("type", "5");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
httpParams.put("pageNum", hasPage);
|
httpParams.put("pageNum", hasPage+"");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
@ -147,7 +147,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "2");
|
httpParams.put("type", "2");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
httpParams.put("pageNum", hasPage);
|
httpParams.put("pageNum", hasPage+"");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
@ -185,7 +185,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "4");
|
httpParams.put("type", "4");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
httpParams.put("pageNum", hasPage);
|
httpParams.put("pageNum", hasPage+"");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
@ -223,7 +223,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "3");
|
httpParams.put("type", "3");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
httpParams.put("pageNum", hasPage);
|
httpParams.put("pageNum", hasPage+"");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
@ -261,7 +261,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "1");
|
httpParams.put("type", "1");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
httpParams.put("pageNum", hasPage);
|
httpParams.put("pageNum", hasPage+"");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
|
@ -85,8 +85,6 @@ import java.util.Objects;
|
|||||||
* 寻宝-上报-其他的fragment
|
* 寻宝-上报-其他的fragment
|
||||||
*/
|
*/
|
||||||
public class OtherFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class OtherFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
private Spinner spinnerOther;
|
private Spinner spinnerOther;
|
||||||
String[] others = new String[]{"门牌", "公交", "情报"};// //门牌:7 公交:8 情报:9 现在其他任务类型里就这三种
|
String[] others = new String[]{"门牌", "公交", "情报"};// //门牌:7 公交:8 情报:9 现在其他任务类型里就这三种
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
@ -648,7 +646,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
initOtherSharePre();
|
initOtherSharePre();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 防止当页面崩溃后出现数据丢失
|
* 防止当页面崩溃后出现数据丢失
|
||||||
*/
|
*/
|
||||||
public void initOtherSharePre() {
|
public void initOtherSharePre() {
|
||||||
|
@ -32,8 +32,6 @@ import java.util.Objects;
|
|||||||
* 图片-fragment
|
* 图片-fragment
|
||||||
*/
|
*/
|
||||||
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 ArrayList<FileBean> deleteFiles;
|
private ArrayList<FileBean> deleteFiles;
|
||||||
private PhotoAdapter photoAdapter;
|
private PhotoAdapter photoAdapter;
|
||||||
@ -94,7 +92,7 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
if (fileListByUUID.size()>=2){
|
if (fileListByUUID.size()>=2){
|
||||||
File parentFile = fileListByUUID.get(0).getParentFile();
|
File parentFile = fileListByUUID.get(0).getParentFile();
|
||||||
for (int i = 0; i < fileListByUUID.size()-1; i++) {
|
for (int i = 0; i < fileListByUUID.size()-1; i++) {
|
||||||
File file = new File(parentFile+"/" + i + ".jpg");
|
File file = new File(parentFile+"/" + i + ".webp");
|
||||||
fileBeans.add(new FileBean(file, false));
|
fileBeans.add(new FileBean(file, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
checkBoxLife.setTextColor(Color.WHITE);
|
checkBoxLife.setTextColor(Color.WHITE);
|
||||||
checkBoxLife.setChecked(true);
|
checkBoxLife.setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancel() {
|
public void onCancel() {
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
@ -1105,6 +1104,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1112,7 +1112,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,7 +92,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
private File logFile;
|
private File logFile;
|
||||||
private StringBuilder poiVideoBuilder;
|
private StringBuilder poiVideoBuilder;
|
||||||
|
|
||||||
|
|
||||||
public static PoiVideoFragment newInstance(Bundle bundle) {
|
public static PoiVideoFragment newInstance(Bundle bundle) {
|
||||||
PoiVideoFragment fragment = new PoiVideoFragment();
|
PoiVideoFragment fragment = new PoiVideoFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -270,7 +269,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
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++) {
|
||||||
if (fileListByUUID.get(i).getPath().contains(".jpg") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
|
if (fileListByUUID.get(i).getPath().contains(".webp") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
|
||||||
if (fileListByUUID.get(i).exists() && !isImageLoad) {
|
if (fileListByUUID.get(i).exists() && !isImageLoad) {
|
||||||
// 使用glide加载视频的第一帧
|
// 使用glide加载视频的第一帧
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivPoiVideoPicture);
|
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivPoiVideoPicture);
|
||||||
@ -316,7 +315,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
File videoFile = fileListByUUID.get(i);
|
File videoFile = fileListByUUID.get(i);
|
||||||
if (videoFile.getPath().contains(".jpg") && !videoFile.getPath().contains("paper.txt")) {
|
if (videoFile.getPath().contains(".webp") && !videoFile.getPath().contains("paper.txt")) {
|
||||||
if (videoFile.exists() && !isImageLoad) {
|
if (videoFile.exists() && !isImageLoad) {
|
||||||
// 使用glide加载视频的第一帧
|
// 使用glide加载视频的第一帧
|
||||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
|
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
|
||||||
@ -350,7 +349,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
case R.id.tv_short://手动拍摄
|
case R.id.tv_short://手动拍摄
|
||||||
poiVideoBuilder.append("点击了手动拍摄的按钮 ,");
|
poiVideoBuilder.append("点击了手动拍摄的按钮 ,");
|
||||||
Intent intents = new Intent(getContext(), PicturesActivity.class);
|
Intent intents = new Intent(getContext(), PicturesActivity.class);
|
||||||
File filePath = AWMp4ParserHelper.getInstance().obtainJPGFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
||||||
intents.putExtra("poiEntity", showPoiEntity);
|
intents.putExtra("poiEntity", showPoiEntity);
|
||||||
intents.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
intents.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||||
@ -360,7 +359,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
case R.id.tv_combo://自动连拍:
|
case R.id.tv_combo://自动连拍:
|
||||||
poiVideoBuilder.append("点击了自动连拍的按钮 ,");
|
poiVideoBuilder.append("点击了自动连拍的按钮 ,");
|
||||||
Intent intent = new Intent(getContext(), PicturesActivity.class);
|
Intent intent = new Intent(getContext(), PicturesActivity.class);
|
||||||
File fileJpgPath = AWMp4ParserHelper.getInstance().obtainJPGFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
File fileJpgPath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
intent.putExtra(Constant.INTENT_JPG_PATH, fileJpgPath.getAbsolutePath());
|
intent.putExtra(Constant.INTENT_JPG_PATH, fileJpgPath.getAbsolutePath());
|
||||||
intent.putExtra("poiEntity", showPoiEntity);
|
intent.putExtra("poiEntity", showPoiEntity);
|
||||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||||
@ -541,8 +540,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
} else if (requestCode == 0x102 && resultCode == 0x111) {
|
} else if (requestCode == 0x102 && resultCode == 0x111) {
|
||||||
tvCombo.setEnabled(false);
|
tvCombo.setEnabled(false);
|
||||||
}
|
}
|
||||||
if (data != null && data.hasExtra(Constant.INTENT_VIDEO_PATH)) {
|
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||||
String videoPath = data.getStringExtra(Constant.INTENT_VIDEO_PATH);
|
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||||
assert videoPath != null;
|
assert videoPath != null;
|
||||||
File videoFile = new File(videoPath);
|
File videoFile = new File(videoPath);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
|
@ -294,6 +294,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
registerBuilder.append("onPause ,");
|
registerBuilder.append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -267,7 +266,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
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++) {
|
||||||
if (fileListByUUID.get(i).getPath().contains(".jpg") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
|
if (fileListByUUID.get(i).getPath().contains(".webp") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
|
||||||
if (fileListByUUID.get(i).exists() && !isImageLoad) {
|
if (fileListByUUID.get(i).exists() && !isImageLoad) {
|
||||||
// 使用glide加载视频的第一帧
|
// 使用glide加载视频的第一帧
|
||||||
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivRoadPicture);
|
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivRoadPicture);
|
||||||
@ -328,7 +327,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
File videoFile = fileListByUUID.get(i);
|
File videoFile = fileListByUUID.get(i);
|
||||||
if (videoFile.getPath().contains(".jpg") && !videoFile.getPath().contains("paper.txt")) {
|
if (videoFile.getPath().contains(".webp") && !videoFile.getPath().contains("paper.txt")) {
|
||||||
if (videoFile.exists() && !isImageLoad) {
|
if (videoFile.exists() && !isImageLoad) {
|
||||||
// 使用glide加载视频的第一帧
|
// 使用glide加载视频的第一帧
|
||||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
|
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
|
||||||
@ -362,7 +361,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
case R.id.tv_pictures:
|
case R.id.tv_pictures:
|
||||||
roadBuilder.append("点击了自动拍照的按钮 ,");
|
roadBuilder.append("点击了自动拍照的按钮 ,");
|
||||||
Intent intent = new Intent(getContext(), PicturesActivity.class);
|
Intent intent = new Intent(getContext(), PicturesActivity.class);
|
||||||
File finalFile = AWMp4ParserHelper.getInstance().obtainJPGFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
File finalFile = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
intent.putExtra(Constant.INTENT_JPG_PATH, finalFile.getAbsolutePath());
|
intent.putExtra(Constant.INTENT_JPG_PATH, finalFile.getAbsolutePath());
|
||||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||||
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 3);
|
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 3);
|
||||||
@ -543,9 +542,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode == 0x101) {
|
if (requestCode == 0x101) {
|
||||||
if (resultCode == 0x111) {
|
if (resultCode == 0x111) {
|
||||||
if (data != null && data.hasExtra(Constant.INTENT_VIDEO_PATH)) {
|
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||||
// 扫描照片目录中当前视频的所有视频文件
|
// 扫描照片目录中当前视频的所有视频文件
|
||||||
String videoPath = data.getStringExtra(Constant.INTENT_VIDEO_PATH);
|
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||||
assert videoPath != null;
|
assert videoPath != null;
|
||||||
File videoFile = new File(videoPath);
|
File videoFile = new File(videoPath);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
@ -762,13 +761,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ChargingPileEntity initChargingPileEntityByUI(ChargingPileEntity entity) {
|
protected ChargingPileEntity initChargingPileEntityByUI(ChargingPileEntity entity) {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected PoiCheckResult checkChargingPileEntity(ChargingPileEntity entity) {
|
protected PoiCheckResult checkChargingPileEntity(ChargingPileEntity entity) {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -130,6 +130,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
});
|
});
|
||||||
if (Constant.currentLocation!=null){
|
if (Constant.currentLocation!=null){
|
||||||
if (Constant.USHERED!=null){
|
if (Constant.USHERED!=null){
|
||||||
|
cbSelect.setChecked(false);
|
||||||
refreshData();
|
refreshData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,6 +169,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
cbSelect.setChecked(false);
|
cbSelect.setChecked(false);
|
||||||
if (Constant.currentLocation!=null){
|
if (Constant.currentLocation!=null){
|
||||||
if (Constant.USHERED!=null){
|
if (Constant.USHERED!=null){
|
||||||
|
cbSelect.setChecked(false);
|
||||||
refreshData();
|
refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +356,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void refreshData() {
|
public void refreshData() {
|
||||||
cbSelect.setChecked(false);
|
|
||||||
if (roadEntities == null) {
|
if (roadEntities == null) {
|
||||||
roadEntities = new ArrayList<>();
|
roadEntities = new ArrayList<>();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
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;
|
||||||
@ -10,6 +13,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
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.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
@ -27,7 +31,11 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -40,6 +48,8 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
private TaskExplainAdapter taskExplainAdapter;
|
private TaskExplainAdapter taskExplainAdapter;
|
||||||
private int taskPage = 1;
|
private int taskPage = 1;
|
||||||
private List<TaskPrefectureBean.BodyBean.ListBean> explainList;
|
private List<TaskPrefectureBean.BodyBean.ListBean> explainList;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder taskExplainBuilder;
|
||||||
|
|
||||||
|
|
||||||
public static TaskExplainFragment newInstance(Bundle bundle) {
|
public static TaskExplainFragment newInstance(Bundle bundle) {
|
||||||
@ -88,12 +98,11 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(int pos) {
|
public void onClick(int pos) {
|
||||||
|
taskExplainBuilder.append("点击了item ,");
|
||||||
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
itemIntent.putExtra("tag", 10);
|
itemIntent.putExtra("tag", 10);
|
||||||
itemIntent.putExtra("id",pos+"");
|
itemIntent.putExtra("id",pos+"");
|
||||||
startActivity(itemIntent);
|
startActivity(itemIntent);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -103,6 +112,28 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
super.initData();
|
super.initData();
|
||||||
explainList = new ArrayList<>();
|
explainList = new ArrayList<>();
|
||||||
initNetWork(true);
|
initNetWork(true);
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
taskExplainBuilder = new StringBuilder();
|
||||||
|
taskExplainBuilder.append("TaskExplainFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
taskExplainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWork(boolean aNet) {
|
private void initNetWork(boolean aNet) {
|
||||||
@ -171,6 +202,27 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_find_task_explain) {
|
if (v.getId() == R.id.iv_find_task_explain) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
taskExplainBuilder.append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
taskExplainBuilder.append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
taskExplainBuilder.append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
taskExplainBuilder.append("onDestroy ");
|
||||||
|
taskExplainBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
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;
|
||||||
@ -10,6 +13,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
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.activity.WebActivity;
|
||||||
@ -27,7 +31,11 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -41,6 +49,8 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||||
private int taskPage = 1;
|
private int taskPage = 1;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder taskPrefectureBuilder;
|
||||||
|
|
||||||
|
|
||||||
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
||||||
@ -79,6 +89,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||||
@Override
|
@Override
|
||||||
public void item(int id) {
|
public void item(int id) {
|
||||||
|
taskPrefectureBuilder.append("点击了item ,");
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id",id+"");
|
paramMap.put("id",id+"");
|
||||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||||
@ -91,6 +102,28 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
super.initData();
|
super.initData();
|
||||||
dataBeanList = new ArrayList<>();
|
dataBeanList = new ArrayList<>();
|
||||||
initNetwork(true);
|
initNetwork(true);
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
taskPrefectureBuilder = new StringBuilder();
|
||||||
|
taskPrefectureBuilder.append("TaskPrefectureFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
taskPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetwork(boolean aNet) {
|
private void initNetwork(boolean aNet) {
|
||||||
@ -193,6 +226,27 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_find_task) {
|
if (v.getId() == R.id.iv_find_task) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
taskPrefectureBuilder.append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
taskPrefectureBuilder.append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
taskPrefectureBuilder.append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
taskPrefectureBuilder.append("onDestroy");
|
||||||
|
taskPrefectureBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), taskPrefectureBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ public class AWMp4ParserHelper {
|
|||||||
/**
|
/**
|
||||||
* 根据文件夹路径生成最新的视频文件路径
|
* 根据文件夹路径生成最新的视频文件路径
|
||||||
* */
|
* */
|
||||||
public File obtainJPGFilePath(String folderPath) {
|
public File obtainWebpFilePath(String folderPath) {
|
||||||
if (folderPath == null) {
|
if (folderPath == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -270,26 +270,26 @@ public class AWMp4ParserHelper {
|
|||||||
File[] fileList = folderFile.listFiles(new FileFilter() {
|
File[] fileList = folderFile.listFiles(new FileFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File pathname) {
|
public boolean accept(File pathname) {
|
||||||
if (pathname.getName().endsWith(".jpg")){
|
if (pathname.getName().endsWith(".webp")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (fileList == null || fileList.length==0) {
|
if (fileList == null || fileList.length==0) {
|
||||||
return new File(folderPath+"/0.jpg");
|
return new File(folderPath+"/0.webp");
|
||||||
}
|
}
|
||||||
int maxIndex = 0;
|
int maxIndex = 0;
|
||||||
for (int i = 0; i < fileList.length; i++) {
|
for (int i = 0; i < fileList.length; i++) {
|
||||||
File file = fileList[i];
|
File file = fileList[i];
|
||||||
if (file!=null) {
|
if (file!=null) {
|
||||||
int index = Integer.parseInt(file.getName().replace(".jpg", ""));
|
int index = Integer.parseInt(file.getName().replace(".webp", ""));
|
||||||
if (index>=maxIndex) {
|
if (index>=maxIndex) {
|
||||||
maxIndex = index;
|
maxIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new File(folderPath+"/"+(maxIndex+1)+".jpg");
|
return new File(folderPath+"/"+(maxIndex+1)+".webp");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,7 @@ public class PhotoUtils {
|
|||||||
lat= initEncode(latLng);
|
lat= initEncode(latLng);
|
||||||
}
|
}
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
return new File(Constant.PICTURE_FOLDER, d + time + "_p" + lat + "_a" + 0 + ".jpg");
|
return new File(Constant.PICTURE_FOLDER, d + time + "_p" + lat + "_a" + 0 + ".webp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,8 +51,7 @@ public class UploadUtils {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
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++) {
|
||||||
@ -113,8 +112,7 @@ public class UploadUtils {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
for (int i = 0; i < poiPicList.size(); i++) {
|
for (int i = 0; i < poiPicList.size(); i++) {
|
||||||
poiPicList.get(i).delete();
|
poiPicList.get(i).delete();
|
||||||
}
|
}
|
||||||
@ -169,8 +167,7 @@ public class UploadUtils {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
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++) {
|
||||||
@ -231,8 +228,7 @@ public class UploadUtils {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
for (int i = 0; i < otherUploadList.size(); i++) {
|
for (int i = 0; i < otherUploadList.size(); i++) {
|
||||||
otherUploadList.get(i).delete();
|
otherUploadList.get(i).delete();
|
||||||
}
|
}
|
||||||
@ -288,8 +284,7 @@ public class UploadUtils {
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
for (int i = 0; i < chargingStationList.size(); i++) {
|
for (int i = 0; i < chargingStationList.size(); i++) {
|
||||||
chargingStationList.get(i).delete();
|
chargingStationList.get(i).delete();
|
||||||
}
|
}
|
||||||
|
47
app/src/main/java/com/navinfo/outdoor/util/WebpUtil.java
Normal file
47
app/src/main/java/com/navinfo/outdoor/util/WebpUtil.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package com.navinfo.outdoor.util;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.wanghong.webpnative.WebPNative;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
||||||
|
|
||||||
|
public class WebpUtil {
|
||||||
|
|
||||||
|
public static void performEncodeImage(Context context, File imgFile, float quFloat) {
|
||||||
|
if (imgFile.exists()) {
|
||||||
|
WebPNative webPNative = new WebPNative();
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
Bitmap bitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
|
||||||
|
String[] split = imgFile.getName().split(".jpg");
|
||||||
|
String output = imgFile.getParent() + File.separator + split[0] + ".webp";
|
||||||
|
webPNative.encodeRGBA(bitmap, output, quFloat);
|
||||||
|
imgFile.delete();
|
||||||
|
/*long start = System.currentTimeMillis();
|
||||||
|
long useTime = System.currentTimeMillis() - start;
|
||||||
|
Log.e("WebpUtil:", String.valueOf(useTime));
|
||||||
|
File file = new File(output.substring(0, output.length() - 5) + ".webp");
|
||||||
|
new File(output).renameTo(file);*/
|
||||||
|
if (!bitmap.isRecycled()) {
|
||||||
|
bitmap.recycle();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("output:", e.toString());
|
||||||
|
Toast.makeText(context, "文件转换失败", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(context, "源文件不存在", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@
|
|||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="42dp"
|
||||||
android:background="@drawable/other_text">
|
android:background="@drawable/other_text">
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<!--设置系统的取消预览(空白窗口)为true -->
|
<!--设置系统的取消预览(空白窗口)为true -->
|
||||||
<item name="android:windowDisablePreview">true</item>
|
<item name="android:windowDisablePreview">true</item>
|
||||||
<!--设置背景为透明-->
|
<!--设置背景为透明-->
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:windowIsTranslucent">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.NoActionBar">
|
<style name="AppTheme.NoActionBar">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user