修改bug
This commit is contained in:
parent
f241b5e877
commit
6f196154d8
@ -108,7 +108,7 @@ public class MainActivity extends BaseActivity {
|
||||
// 申请多个权限
|
||||
//.permission(Permission.Group.CALENDAR)
|
||||
// 申请读写外部存储卡
|
||||
.permission(Permission.MANAGE_EXTERNAL_STORAGE/*, Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE*/)
|
||||
.permission(Permission.MANAGE_EXTERNAL_STORAGE /*, Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE*/)
|
||||
// 申请相机权限
|
||||
.permission(Permission.CAMERA)
|
||||
.permission(Permission.REQUEST_INSTALL_PACKAGES)
|
||||
@ -167,7 +167,7 @@ public class MainActivity extends BaseActivity {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
int version = response.getBody().getVersion();
|
||||
if (versionCode <version) {//TODO 改成<
|
||||
if (versionCode <version) {//TODO 改成
|
||||
//升级
|
||||
ApkVersionBean.bodyBean body = response.getBody();
|
||||
showUpdateDialog(body);
|
||||
@ -239,7 +239,7 @@ public class MainActivity extends BaseActivity {
|
||||
public void onFinish() {
|
||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
MainActivity.this.finish();
|
||||
finish();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
@ -400,6 +400,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
tencentMap.setMyLocationStyle(locationStyle);
|
||||
}
|
||||
|
||||
|
||||
public void benSwitch() {
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
|
||||
int heightMap = ivMap.getMeasuredHeight();
|
||||
@ -542,7 +543,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
sb.append("\r\n");
|
||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||
|
||||
/*float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||
if (speed != 0) {
|
||||
float a = (speed * 3600 / 1000);//km/h
|
||||
@ -574,7 +574,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
oldCurrentLocation = Constant.currentLocation;
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -199,7 +199,7 @@ public class Constant {
|
||||
|
||||
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
||||
|
||||
public static final String NAVIN_FO="9.28";//版本
|
||||
public static final String NAVIN_FO="9.29";//版本
|
||||
/*联系我们的QQ群名称和QQ群号
|
||||
*/
|
||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||
|
@ -48,6 +48,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.issue_fragment;
|
||||
@ -131,10 +132,8 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_issue_finish:
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_issue_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
@ -800,7 +801,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
poiEntity.setPhotoInfo(arrayList);
|
||||
poiEntity.setStation_type(station_type);
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@SuppressLint("SimpleDateFormat") DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
@ -111,7 +112,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private Marker markerPoi;
|
||||
private Point screenPoiPositions;
|
||||
|
||||
|
||||
public static PoiFragment newInstance(Bundle bundle) {
|
||||
PoiFragment fragment = new PoiFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -1118,7 +1118,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
infoPhoto.add(new Info(tagCard));
|
||||
}
|
||||
poiEntity.setPhotoInfo(infoPhoto);
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@SuppressLint("SimpleDateFormat") DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
|
@ -22,10 +22,8 @@ import java.util.Date;
|
||||
public class PhotoPathUtil {
|
||||
/**
|
||||
*
|
||||
* @param data
|
||||
* @param d 类型
|
||||
* @param chord 经纬度加密
|
||||
* @return
|
||||
*/
|
||||
public static String getTakePhotoPath(Intent data,String d,String chord) {
|
||||
Bitmap photo = null;
|
||||
@ -56,10 +54,10 @@ public class PhotoPathUtil {
|
||||
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是无损格式(忽略质量设置),会导致方法中的第二个参数压缩质量失效,
|
||||
@ -67,7 +65,7 @@ public class PhotoPathUtil {
|
||||
* 而WEBP格式是Google新推出的,据官方资料称“在质量相同的情况下,WEBP格式图像的体积要比JPEG格式图像小40%。
|
||||
*/
|
||||
photo.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream);
|
||||
/***相片的完整路径*/
|
||||
/*相片的完整路径*/
|
||||
return file.getPath();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user