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