修改bug
This commit is contained in:
parent
b480884205
commit
6cb40f1bcc
@ -31,6 +31,7 @@ public class AuthService {
|
||||
String clientSecret = "0d3yoIsrsrAspUMoyNkWeeqDTvxvg9QB";
|
||||
return getAuth(clientId, clientSecret);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取API访问token
|
||||
* 该token有一定的有效期,需要自行管理,当失效时需重新获取.
|
||||
@ -39,6 +40,7 @@ public class AuthService {
|
||||
* @return assess_token 示例:
|
||||
* "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567"
|
||||
*/
|
||||
|
||||
public static String getAuth(String ak, String sk) {
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
|
@ -173,8 +173,8 @@ public class Constant {
|
||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||
public static final String NAVIN_FO = "12.10";//版本日期
|
||||
//marker
|
||||
|
||||
//marker
|
||||
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_POI_VIDEO_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_show);
|
||||
@ -195,6 +195,7 @@ public class Constant {
|
||||
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 ICON_OPERATION = BitmapDescriptorFactory.fromResource(R.mipmap.icon_operation);
|
||||
|
||||
/*联系我们的QQ群名称和QQ群号*/
|
||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||
public static String REGION_JIG_PHONE = "9721810";
|
||||
|
@ -32,6 +32,6 @@ public class IdCard {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ public class UserApplication extends Application {
|
||||
public Notification getNotification(Context context, UMessage msg) {
|
||||
Log.i("TAGEE", "getNotification: "+msg.getRaw().toString());
|
||||
return super.getNotification(context, msg);
|
||||
|
||||
}
|
||||
|
||||
//处理透传消息
|
||||
@Override
|
||||
public void dealWithCustomMessage(Context context, UMessage msg) {
|
||||
|
@ -88,7 +88,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
alertDialog.setCancelable(false);
|
||||
alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
|
||||
return keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK;
|
||||
|
||||
});
|
||||
//loading样式
|
||||
View view = LayoutInflater.from(this).inflate(R.layout.loading, null);
|
||||
@ -97,7 +96,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
|
||||
public void setLoadingDialogText(String s) {
|
||||
//给loading 添加文字
|
||||
TextView view = alertDialog.findViewById(R.id.progressBar_tx);
|
||||
|
@ -46,11 +46,9 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "未开启定位服务", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
// else {
|
||||
// new GPSUtils(getActivity());
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,6 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mView = LayoutInflater.from(getActivity()).inflate(getLayout(), container, false);
|
||||
// homeActivity = (HomeActivity) getActivity();
|
||||
return mView;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.navinfo.outdoor.bean;
|
||||
import java.util.List;
|
||||
|
||||
public class FilterBatchBean {
|
||||
|
||||
/**
|
||||
* code : 200
|
||||
* message : 成功
|
||||
|
@ -58,12 +58,6 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
|
||||
Intent regardIntent = new Intent(getActivity(), RegardMapActivity.class);
|
||||
startActivity(regardIntent);
|
||||
break;
|
||||
case R.id.rl_serve:
|
||||
// intint2WebActivity(HttpInterface.MAP_AGREEMENT, null);
|
||||
break;
|
||||
case R.id.rl_privilege:
|
||||
// intint2WebActivity(HttpInterface.MAP_PRIVACY, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
.cls(MeasureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
|
||||
okGoBuilder.getRequest(new Callback<MeasureBean>() {
|
||||
@Override
|
||||
public void onSuccess(MeasureBean response, int id) {
|
||||
@ -294,6 +295,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
ToastUtils.Message(getActivity(), message);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -832,7 +832,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
setDList(dList);
|
||||
setEList(eList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,11 +106,10 @@ import okhttp3.Response;
|
||||
* 寻宝-上报-充电站的Fragment
|
||||
*/
|
||||
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private EditText editDescribe;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlElse, rlScutcheon, rlNull, linearExist;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivElse, ivScutcheon;
|
||||
private TextView tvExamine, tvPanorama, tvNamePic, tvInternal, tvElse, tvScutcheon;
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private EditText editDescribe, editNameContent, editSiteContent;
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal, btnUploading;
|
||||
private CheckBox checkBoxLife;
|
||||
|
@ -134,6 +134,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -184,7 +185,6 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
eventPage = 1;
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
initNetwork(false);
|
||||
|
@ -403,7 +403,6 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
obtains.what = Constant.JOB_WORD_MONITOR;
|
||||
obtains.obj = true;
|
||||
EventBus.getDefault().post(obtains);
|
||||
|
||||
onBackPressed();
|
||||
break;
|
||||
case R.id.cl_number:
|
||||
|
@ -108,7 +108,6 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
break;
|
||||
case R.id.linear_end:
|
||||
findBuilder.append(TimestampUtil.time()).append(",").append("点击了帮助中心:能力测评 ,");
|
||||
//Toast.makeText(getContext(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
Intent endIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
endIntent.putExtra("tag", 11);
|
||||
startActivity(endIntent);
|
||||
|
@ -197,9 +197,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadProgress(Progress progress) {
|
||||
|
||||
}
|
||||
public void uploadProgress(Progress progress) {}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
|
@ -236,10 +236,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
gatherGetBuilder.append(TimestampUtil.time()).append(",").append("点击了返回的按钮 ,");
|
||||
assert getArguments() != null;
|
||||
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.GATHER_GET_RETURN;
|
||||
obtain.obj = aBoolean;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.JOB_WORD_MONITOR;
|
||||
obtains.obj = true;
|
||||
@ -442,7 +444,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@ -537,7 +538,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
polygonEntity.setTaskStatus(1);
|
||||
}
|
||||
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -187,7 +187,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
bankAdapter.setBankPathBeans(jsonBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bankPathBeans.clear();
|
||||
@ -200,7 +199,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
bankAdapter.setBankPathBeans(bankPathBeans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
bankPathBeans.clear();
|
||||
@ -306,10 +304,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadProgress(Progress progress) {
|
||||
|
||||
|
||||
}
|
||||
public void uploadProgress(Progress progress) {}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
|
@ -58,4 +58,5 @@ public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -438,11 +438,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
startActivity(roadIntent);
|
||||
break;
|
||||
case R.id.cl_charging:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了charging item跳转到charging列表 ,");
|
||||
Intent chargingIntent = new Intent(getContext(), FragmentManagement.class);
|
||||
chargingIntent.putExtra("tag", 31);
|
||||
chargingIntent.putExtra("type", 2);
|
||||
startActivity(chargingIntent);
|
||||
|
||||
break;
|
||||
case R.id.cl_other:
|
||||
hasSubmitBuilder.append(TimestampUtil.time()).append(",").append("点击了other item跳转到other列表 ,");
|
||||
@ -484,4 +480,5 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -55,7 +55,6 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
||||
// issueWebView.loadUrl("http://www.navinfo.com");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_issueWeb_finish) {
|
||||
|
@ -158,6 +158,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
} else {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}
|
||||
|
||||
}
|
||||
messageBuilder = new StringBuilder();
|
||||
messageBuilder.append(TimestampUtil.time()).append(",").append("MessageFragment-onCreate-initData ,");
|
||||
|
@ -211,61 +211,41 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.image_heard:
|
||||
case R.id.tv_name://跳转到个人信息
|
||||
case R.id.image_heard: //跳转到个人信息
|
||||
case R.id.tv_name: //
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了头像和名字 跳转到个人信息 ,");
|
||||
Intent intentUser = new Intent(getActivity(), UserActivity.class);
|
||||
intentUser.putExtra("tag", 16);
|
||||
startActivity(intentUser);
|
||||
break;
|
||||
case R.id.image_share://分享
|
||||
case R.id.image_sign://签到
|
||||
case R.id.rl_set://设置
|
||||
case R.id.rl_issue://常见问题
|
||||
case R.id.rl_map://地图下载
|
||||
case R.id.rl_grade://我的等级
|
||||
case R.id.rl_privilege://我的特权
|
||||
/*mainBuilder.append("点击了item 跳转到我的特权,");
|
||||
Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentPrivilege.putExtra("tag", 18);
|
||||
startActivity(intentPrivilege);*/
|
||||
|
||||
/* mainBuilder.append("点击了item 跳转到我的等级 ,");
|
||||
Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentGrade.putExtra("tag", 17);
|
||||
startActivity(intentGrade);*/
|
||||
case R.id.image_share: //分享
|
||||
case R.id.image_sign: //签到
|
||||
case R.id.rl_set: //设置
|
||||
case R.id.rl_issue: //常见问题
|
||||
case R.id.rl_map: //地图下载
|
||||
case R.id.rl_grade: //我的等级
|
||||
case R.id.rl_privilege: //我的特权
|
||||
ToastUtils.Message(getActivity(), "该功能以后上新,敬请期待");
|
||||
break;
|
||||
|
||||
case R.id.btn_withdraw://提现页面
|
||||
case R.id.btn_withdraw: //提现页面
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了去提现的按钮 ,");
|
||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentWithdraw.putExtra("tag", 15);
|
||||
startActivity(intentWithdraw);
|
||||
break;
|
||||
/*Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentMap.putExtra("tag", 19);
|
||||
startActivity(intentMap);
|
||||
Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentIssue.putExtra("tag", 20);
|
||||
startActivity(intentIssue);
|
||||
Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentSet.putExtra("tag", 22);
|
||||
startActivity(intentSet);*/
|
||||
case R.id.rl_contact://联系我们
|
||||
case R.id.rl_contact: //联系我们
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了item 跳转到联系我们 ,");
|
||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentContact.putExtra("tag", 21);
|
||||
startActivity(intentContact);
|
||||
break;
|
||||
|
||||
case R.id.rl_about://关于
|
||||
case R.id.rl_about: //关于
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了item 跳转到关于页面 ,");
|
||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentAbout.putExtra("tag", 23);
|
||||
startActivity(intentAbout);
|
||||
break;
|
||||
case R.id.btn_quit://退出登录
|
||||
case R.id.btn_quit: //退出登录
|
||||
mainBuilder.append(TimestampUtil.time()).append(",").append("点击了退出登录的按钮 ,");
|
||||
Intent intent = new Intent(getContext(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
|
@ -329,11 +329,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
public void onNothingSelected(AdapterView<?> parent) {}
|
||||
});
|
||||
//数据展示
|
||||
initShowPoi();
|
||||
@ -502,12 +499,11 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
}
|
||||
//判断是否是已完成作业并保存成功
|
||||
assert showPoiEntity != null;
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,20 +6,16 @@ import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.PhotoAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -27,8 +23,6 @@ import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.FileBean;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.ImageUtils;
|
||||
import com.navinfo.outdoor.util.SearchUpdateTxt;
|
||||
import com.navinfo.outdoor.util.TimestampUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -38,7 +32,6 @@ import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
|
@ -589,7 +589,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -602,53 +601,51 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_PHONES)
|
||||
.params(new HttpParams("geo", encode))
|
||||
.cls(GetPhoneBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPhoneBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (getPhoneBean.getCode() == 200) {
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
if (!Constant.CODE.equals(code)) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength = telLength;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
.params(new HttpParams("geo", encode))
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<GetPhoneBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (getPhoneBean.getCode() == 200) {
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
if (!Constant.CODE.equals(code)) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength = telLength;
|
||||
return false;
|
||||
}
|
||||
} else if (getPhoneBean.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
ToastUtils.Message(getActivity(), getPhoneBean.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
ToastUtils.Message(getActivity(), "请求超时");
|
||||
} else {
|
||||
ToastUtils.Message(getActivity(), message);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (getPhoneBean.getCode() == 230) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
ToastUtils.Message(getActivity(), getPhoneBean.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
ToastUtils.Message(getActivity(), "请求超时");
|
||||
} else {
|
||||
ToastUtils.Message(getActivity(), message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//禁用所有可操作性控件
|
||||
public void disables() {
|
||||
checkBoxLife.setEnabled(false);
|
||||
@ -911,9 +908,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
@ -1020,7 +1014,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void poiSaveByNet(PoiEntity poiEntity) {
|
||||
|
@ -434,9 +434,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||
LatLng startLatLng = new LatLng(latitude, longitude);// 用户当前位置
|
||||
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
|
||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);//終點于用戶的距離
|
||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);// 終點于用戶的距離
|
||||
if (geometry > rearGeometry) {//用戶在终点开始作业
|
||||
if (rearGeometry > 5000) {
|
||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||
@ -910,7 +910,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ public class PrivilegeFragment extends BaseFragment implements View.OnClickListe
|
||||
ivPrivilege.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_privilege) {
|
||||
|
@ -83,10 +83,10 @@ public class RecordFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) { }
|
||||
public void onTabUnselected(TabLayout.Tab tab) {}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(TabLayout.Tab tab) { }
|
||||
public void onTabReselected(TabLayout.Tab tab) {}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
ToastUtils.Message(getActivity(), message);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -359,10 +359,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
fmRoadPic.setTag(fileListByUUID);
|
||||
}
|
||||
}
|
||||
assert showPoiEntity != null;
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -619,9 +618,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.ROAD_TASK_UPLOAD_PIC)
|
||||
.cls(OtherUploadPicBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.cls(OtherUploadPicBean.class);
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
if (getActivity() != null) {
|
||||
okGoBuilder.postRequest(UploadUtils.getInstance().getRoadUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||
getActivity().getSupportFragmentManager().popBackStack();//回退
|
||||
@ -781,8 +780,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
@ -834,6 +833,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (!roadName.equals("")) {
|
||||
poiEntity.setName(roadName);
|
||||
} else {
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
||||
Calendar calendars = Calendar.getInstance();
|
||||
calendars.setTimeInMillis(System.currentTimeMillis());
|
||||
@ -855,7 +855,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void run() {
|
||||
etRoadName.setText(sb);
|
||||
//etRoadName.setEnabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -864,6 +863,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (!desc.equals("")) {
|
||||
poiEntity.setMemo(desc);
|
||||
}
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
|
@ -195,7 +195,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,12 +72,8 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
ivFindTaskExplain.setOnClickListener(this);
|
||||
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
//下划线
|
||||
// taskExplainRecycle.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
taskExplainRecycle.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
taskExplainRecycle.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上啦加载下拉刷新
|
||||
// taskExplainRecycle.setPullRefreshEnabled(false);
|
||||
// taskExplainRecycle.setLoadingMoreEnabled(false);
|
||||
taskExplainAdapter = new TaskExplainAdapter(explainList, getActivity());
|
||||
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
||||
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
|
@ -66,12 +66,8 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
ivTaskExplain2.setOnClickListener(this);
|
||||
taskExplain2Recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
//下划线
|
||||
// taskExplain2Recycler.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
|
||||
taskExplain2Recycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
taskExplain2Recycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能。
|
||||
// taskExplain2Recycler.setPullRefreshEnabled(false);
|
||||
// taskExplain2Recycler.setLoadingMoreEnabled(false);
|
||||
taskExplainAdapter2 = new TaskExplainAdapter2(explainList, getActivity());
|
||||
taskExplain2Recycler.setAdapter(taskExplainAdapter2);
|
||||
taskExplain2Recycler.getDefaultFootView().setNoMoreHint("加载完毕");
|
||||
|
@ -80,7 +80,6 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
taskPage = 1;
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
initNetwork(false);
|
||||
|
@ -352,7 +352,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
initList(Constant.currentLocation); // 刷新筛选的网络数据
|
||||
} else {
|
||||
ToastUtils.Message(getActivity(), "未开启定位服务");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -14,11 +12,8 @@ import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
@ -41,7 +36,6 @@ import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.PhotoUtils;
|
||||
import com.navinfo.outdoor.util.TimestampUtil;
|
||||
import com.navinfo.outdoor.util.ToastUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -51,7 +45,6 @@ import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
/**
|
||||
* 我的-用户资料-实名认证的fragment
|
||||
@ -63,10 +56,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
private File logFile;
|
||||
private StringBuilder userAttestationBuilder;
|
||||
private SharedPreferences.Editor sharedPreEditor;
|
||||
/*private LinearLayout linearHint;
|
||||
private TextView tvTitle;
|
||||
private LinearLayout linearLayout;
|
||||
private View userAttestView;*/
|
||||
|
||||
public static UserAttestationFragment newInstance(Bundle bundle) {
|
||||
UserAttestationFragment fragment = new UserAttestationFragment();
|
||||
|
@ -92,9 +92,9 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
|
||||
}
|
||||
}
|
||||
}
|
||||
ImageView ivPhotoFinal = (ImageView) findViewById(R.id.iv_video_final);
|
||||
ImageView ivPhotoFinal = findViewById(R.id.iv_video_final);
|
||||
ivPhotoFinal.setOnClickListener(this);
|
||||
TextView tvPhotoAlbumDelete = (TextView) findViewById(R.id.tv_video_album_delete);
|
||||
TextView tvPhotoAlbumDelete = findViewById(R.id.tv_video_album_delete);
|
||||
tvPhotoAlbumDelete.setOnClickListener(this);
|
||||
RecyclerView videoRecycler = findViewById(R.id.video_album_recycler);
|
||||
videoRecycler.setLayoutManager(new GridLayoutManager(getContext(), 2));
|
||||
|
@ -69,13 +69,10 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能。
|
||||
// taskRecycler.setPullRefreshEnabled(false);
|
||||
// taskRecycler.setLoadingMoreEnabled(false);
|
||||
withdrawalAdapter = new WithdrawalAdapter(getContext());
|
||||
rxlWithdraw.setAdapter(withdrawalAdapter);
|
||||
rxlWithdraw.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
//设置下划线
|
||||
// rxlWithdraw.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
rxlWithdraw.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
@ -276,13 +276,13 @@ public class Base64 {
|
||||
*
|
||||
* @param message 带解密文本信息
|
||||
* @return 返回解密结果
|
||||
* @throws UnsupportedEncodingException
|
||||
* @throws NoSuchPaddingException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws InvalidAlgorithmParameterException
|
||||
* @throws InvalidKeyException
|
||||
* @throws BadPaddingException
|
||||
* @throws IllegalBlockSizeException
|
||||
* @throws UnsupportedEncodingException u
|
||||
* @throws NoSuchPaddingException n
|
||||
* @throws NoSuchAlgorithmException n
|
||||
* @throws InvalidAlgorithmParameterException i
|
||||
* @throws InvalidKeyException i
|
||||
* @throws BadPaddingException b
|
||||
* @throws IllegalBlockSizeException i
|
||||
*/
|
||||
public static String desDecrypt(String message) throws UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
|
||||
byte[] byteMi = Base64.decode_(message);
|
||||
@ -292,9 +292,4 @@ public class Base64 {
|
||||
cipher.init(Cipher.DECRYPT_MODE, key, iv);
|
||||
return new String(cipher.doFinal(byteMi), "UTF-8");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println(desDecrypt("eLWAo/Fv9CGJmywsP+j+m0s++56MUl6xCb3lykLFsfi7m4YHfxjjcyxJ8vH+ReTv"));
|
||||
// System.out.println(desEncrypt("1626945974657e10adc3949ba59abbe56e057f20f883e"));
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
/**
|
||||
* 检查图片是否损坏
|
||||
*/
|
||||
public class ImageUtils {
|
||||
/**
|
||||
*
|
||||
* @param filePath 图片的决对路径
|
||||
*/
|
||||
public static boolean checkImgDamage(String filePath) {
|
||||
BitmapFactory.Options options=new BitmapFactory.Options();
|
||||
|
||||
options.inJustDecodeBounds =true;
|
||||
BitmapFactory.decodeFile(filePath, options);
|
||||
if (options.mCancel || options.outWidth == -1 || options.outHeight == -1){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -65,7 +65,4 @@ public class Md5Util {
|
||||
return resultStr.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
System.out.println(toMD5("123456"));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ public class NoSlideViewPager extends ViewPager {
|
||||
public void setCanScroll(boolean canScroll) {
|
||||
isCanScroll = canScroll;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置没有滑动动画
|
||||
* @param noScrollAnim false 无动画
|
||||
|
@ -1,82 +0,0 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 获取图片的真实路径
|
||||
*/
|
||||
public class PhotoPathUtil {
|
||||
/**
|
||||
*
|
||||
* @param d 类型
|
||||
* @param chord 经纬度加密
|
||||
*/
|
||||
public static String getTakePhotoPath(Intent data,String d,String chord) {
|
||||
Bitmap photo = null;
|
||||
int angle=0;
|
||||
Uri uri = data.getData();
|
||||
if (uri != null) {
|
||||
photo = BitmapFactory.decodeFile(uri.getPath());
|
||||
angle = PictureUtil.readPictureDegree(uri.getPath());
|
||||
}
|
||||
if (photo == null) {
|
||||
Bundle bundle = data.getExtras();
|
||||
if (bundle != null) {
|
||||
photo = (Bitmap) bundle.get("data");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
FileOutputStream fileOutputStream = null;
|
||||
try {
|
||||
@SuppressLint("SimpleDateFormat") DateFormat formatter = new SimpleDateFormat("yyyy-MM-ddHHmmss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
long time=System.currentTimeMillis();
|
||||
//文件
|
||||
if (angle==0){
|
||||
angle=90;
|
||||
}
|
||||
File file = new File(Constant.PICTURE_FOLDER,d+time+"_p"+chord+"_a"+angle+".jpg");
|
||||
/*打开文件输出流*/
|
||||
fileOutputStream = new FileOutputStream(file);
|
||||
// 生成图片文件
|
||||
/*
|
||||
* 对应Bitmap的compress(Bitmap.CompressFormat format, int quality, OutputStream stream)方法中第一个参数。
|
||||
* CompressFormat类是个枚举,有三个取值:JPEG、PNG和WEBP。其中,
|
||||
* PNG是无损格式(忽略质量设置),会导致方法中的第二个参数压缩质量失效,
|
||||
* JPEG不解释,
|
||||
* 而WEBP格式是Google新推出的,据官方资料称“在质量相同的情况下,WEBP格式图像的体积要比JPEG格式图像小40%。
|
||||
*/
|
||||
photo.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream);
|
||||
/*相片的完整路径*/
|
||||
return file.getPath();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (fileOutputStream != null) {
|
||||
try {
|
||||
fileOutputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -109,5 +109,4 @@ public class PhotoUtils {
|
||||
}
|
||||
return degree;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,69 +0,0 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.media.ExifInterface;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class PictureUtil {
|
||||
//保存bitmap图片到本地
|
||||
public static void saveBitmap(Bitmap bitmap, Context context, String path, String saveName) {
|
||||
try {
|
||||
File dirFile = new File(path);
|
||||
if (!dirFile.exists()) { //如果不存在,那就建立这个文件夹
|
||||
dirFile.mkdirs();
|
||||
}
|
||||
File file = new File(path, saveName);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 把文件插入到系统图库
|
||||
// try {
|
||||
// MediaStore.Images.Media.insertImage(context.getContentResolver(),
|
||||
// file.getAbsolutePath(), fileName, null);
|
||||
// } catch (FileNotFoundException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// // 通知图库更新
|
||||
// context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
|
||||
// Uri.parse("file://" + "/sdcard/namecard/")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取图片属性:旋转的角度
|
||||
*
|
||||
* @param path 拍摄图片的完整路径
|
||||
* @return degree旋转的角度
|
||||
*/
|
||||
public static int readPictureDegree(String path) {
|
||||
int degree = 0;
|
||||
try {
|
||||
ExifInterface exifInterface = new ExifInterface(path);
|
||||
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
|
||||
switch (orientation) {
|
||||
case ExifInterface.ORIENTATION_ROTATE_90:
|
||||
degree = 90;
|
||||
break;
|
||||
case ExifInterface.ORIENTATION_ROTATE_180:
|
||||
degree = 180;
|
||||
break;
|
||||
case ExifInterface.ORIENTATION_ROTATE_270:
|
||||
degree = 270;
|
||||
break;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return degree;
|
||||
}
|
||||
return degree;
|
||||
}
|
||||
|
||||
}
|
@ -247,7 +247,6 @@ public class PreserveUtils {
|
||||
obtain1.obj = "其他:" + poiEntity.getName() + "保存本地失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,8 +21,7 @@ public class RegexUtil {
|
||||
//字母+数字。最少6位的正则表达式
|
||||
Pattern p = Pattern.compile("(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}");
|
||||
Matcher m = p.matcher(password);
|
||||
boolean isPassword = m.matches();
|
||||
return isPassword;
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -167,6 +167,7 @@
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -190,6 +191,7 @@
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -202,7 +204,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ganPhone"
|
||||
@ -210,8 +213,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -223,7 +228,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_suPhone"
|
||||
@ -231,8 +237,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -245,7 +253,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_luPhone"
|
||||
@ -253,8 +262,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -266,7 +277,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fuPhone"
|
||||
@ -274,8 +286,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -288,7 +302,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_guangPhone"
|
||||
@ -296,8 +311,11 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -309,7 +327,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ganzPhone"
|
||||
@ -317,8 +336,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -331,7 +352,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_yuePhone"
|
||||
@ -339,8 +361,10 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="120dp"
|
||||
android:text="QQ群号" />
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
@ -352,7 +376,8 @@
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ群名称" />
|
||||
android:text="QQ群名称"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_yunPhone"
|
||||
@ -363,6 +388,7 @@
|
||||
android:text="QQ群号"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
@ -18,16 +19,14 @@
|
||||
android:id="@+id/iv_grade"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_arrow"
|
||||
/>
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_grade"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="我的等级" />
|
||||
</LinearLayout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
@ -52,7 +51,7 @@
|
||||
android:text="等级更新"
|
||||
android:textColor="#000"
|
||||
android:textSize="20sp"
|
||||
/>
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -60,7 +59,8 @@
|
||||
android:text="50个任务为一个周期,累计提交50个及以上道路任务的当天24:00更新称号和特权"
|
||||
android:layout_marginStart="20sp"
|
||||
android:layout_marginEnd="20sp"
|
||||
android:textSize="18sp" />
|
||||
android:textSize="18sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
@ -68,7 +68,7 @@
|
||||
android:text="特权等级"
|
||||
android:textColor="#000"
|
||||
android:textSize="20sp"
|
||||
/>
|
||||
tools:ignore="HardcodedText" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
Loading…
x
Reference in New Issue
Block a user