修改录像功能,添加拍照。修改bug
This commit is contained in:
parent
d63b66eedf
commit
647dd87934
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
ndkVersion '23.0.7123448'
|
||||
// ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -45,11 +45,14 @@
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.WhiteScreen">
|
||||
<activity android:name=".activity.LinkActivity"></activity>
|
||||
android:theme="@style/Theme.WhiteScreen"
|
||||
tools:targetApi="n">
|
||||
<activity android:name=".activity.LinkActivity" />
|
||||
<activity android:name=".activity.RegardMapActivity" />
|
||||
<activity android:name=".activity.StatementActivity" />
|
||||
<activity android:name=".activity.PicturesActivity" />
|
||||
<activity android:name=".activity.PicturesActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|navigation"
|
||||
android:launchMode="singleTop"/>
|
||||
<activity
|
||||
android:name=".activity.PictureActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|navigation"
|
||||
|
@ -12,9 +12,9 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
* 引导页
|
||||
*/
|
||||
public class GuidanceActivity extends BaseActivity {
|
||||
|
||||
private FrameLayout frameLayout;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_guidance;
|
||||
@ -24,13 +24,11 @@ public class GuidanceActivity extends BaseActivity {
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
frameLayout = findViewById(R.id.layout_frame);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
|
||||
View firstItem = LayoutInflater.from(this).inflate(R.layout.guidance_first_item, null);
|
||||
View secondItem = LayoutInflater.from(this).inflate(R.layout.guidance_second_item, null);
|
||||
View thirdItem = LayoutInflater.from(this).inflate(R.layout.guidance_third_item, null);
|
||||
@ -57,7 +55,6 @@ public class GuidanceActivity extends BaseActivity {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -65,4 +62,5 @@ public class GuidanceActivity extends BaseActivity {
|
||||
super.onDestroy();
|
||||
frameLayout.removeAllViews();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,15 +34,16 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 首页
|
||||
*/
|
||||
public class HomeActivity extends BaseActivity{
|
||||
private boolean isExit=false;//标识是否退出
|
||||
private NoSlideViewPager mViewPager;
|
||||
private TabLayout mTab;
|
||||
private final String[] names = {"寻宝", "记录", "发现", "我的"};
|
||||
private final int[] pic = {R.drawable.selector_map,R.drawable.selector_task,R.drawable.selector_article,R.drawable.selector_mine};
|
||||
@ -76,7 +77,7 @@ public class HomeActivity extends BaseActivity{
|
||||
//原理:如果当前设备支持状态栏字体变色,会设置状态栏字体为黑色,如果当前设备不支持状态栏字体变色,会使当前状态栏加上透明度,否则不执行透明度
|
||||
.init();
|
||||
mTab=findViewById(R.id.tab_layout);
|
||||
mViewPager=findViewById(R.id.no_slide_view_pager);
|
||||
NoSlideViewPager mViewPager = findViewById(R.id.no_slide_view_pager);
|
||||
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||
fragments.add(new TreasureFragment());
|
||||
recordFragment = new RecordFragment();
|
||||
@ -86,6 +87,7 @@ public class HomeActivity extends BaseActivity{
|
||||
mViewPager.setOffscreenPageLimit(3);
|
||||
|
||||
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@NotNull
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return fragments.get(i);
|
||||
@ -117,11 +119,11 @@ public class HomeActivity extends BaseActivity{
|
||||
mViewPager.setCanScroll(true);
|
||||
mViewPager.setNoScrollAnim(false);
|
||||
mTab.setupWithViewPager(mViewPager);
|
||||
mTab.getTabAt(0).setText(names[0]).setIcon(pic[0]);
|
||||
mTab.getTabAt(1).setText(names[1]).setIcon(pic[1]);
|
||||
mTab.getTabAt(2).setText(names[2]).setIcon(pic[2]);
|
||||
mTab.getTabAt(3).setText(names[3]).setIcon(pic[3]);
|
||||
mTab.getTabAt(0).select();
|
||||
Objects.requireNonNull(mTab.getTabAt(0)).setText(names[0]).setIcon(pic[0]);
|
||||
Objects.requireNonNull(mTab.getTabAt(1)).setText(names[1]).setIcon(pic[1]);
|
||||
Objects.requireNonNull(mTab.getTabAt(2)).setText(names[2]).setIcon(pic[2]);
|
||||
Objects.requireNonNull(mTab.getTabAt(3)).setText(names[3]).setIcon(pic[3]);
|
||||
Objects.requireNonNull(mTab.getTabAt(0)).select();
|
||||
mTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
//禁止table layout效果
|
||||
@Override
|
||||
@ -155,7 +157,7 @@ public class HomeActivity extends BaseActivity{
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.EVENT_WORK_HOME) {
|
||||
if ((boolean)data.obj){
|
||||
mTab.getTabAt(0).select();
|
||||
Objects.requireNonNull(mTab.getTabAt(0)).select();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,9 +19,8 @@ import java.util.ArrayList;
|
||||
public class ImageShowActivity extends BaseActivity implements View.OnClickListener {
|
||||
private ViewPager image_pager;
|
||||
private TextView page_number;
|
||||
private ImageView download;
|
||||
private ArrayList<String> imgUrl;
|
||||
private ImagePagerAdapter mAdapter;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_image_show;
|
||||
@ -40,7 +39,7 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
||||
super.initView();
|
||||
image_pager = (ViewPager) findViewById(R.id.image_pager);
|
||||
page_number = (TextView) findViewById(R.id.page_number);
|
||||
download = (ImageView) findViewById(R.id.download);
|
||||
ImageView download = (ImageView) findViewById(R.id.download);
|
||||
download.setOnClickListener(this);
|
||||
initViewPager();
|
||||
}
|
||||
@ -48,17 +47,13 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
||||
|
||||
private void initViewPager() {
|
||||
if (imgUrl != null && imgUrl.size() != 0) {
|
||||
mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
||||
ImagePagerAdapter mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
||||
image_pager.setAdapter(mAdapter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.download:
|
||||
|
||||
break;
|
||||
}
|
||||
v.getId();
|
||||
}
|
||||
}
|
||||
|
@ -14,9 +14,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
|
||||
public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private android.widget.ImageView ivIcon;
|
||||
private android.webkit.WebView linkWeb;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_link;
|
||||
@ -26,25 +23,21 @@ public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
String url = getIntent().getStringExtra("url");
|
||||
ivIcon = (ImageView) findViewById(R.id.iv_icon);
|
||||
ivIcon.setOnClickListener(this::onClick);
|
||||
linkWeb = (WebView) findViewById(R.id.link_web);
|
||||
ImageView ivIcon = findViewById(R.id.iv_icon);
|
||||
ivIcon.setOnClickListener(this);
|
||||
WebView linkWeb = findViewById(R.id.link_web);
|
||||
linkWeb.getSettings().setBlockNetworkImage(false);
|
||||
WebSettings settings = linkWeb.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
linkWeb.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
linkWeb.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
settings.setBuiltInZoomControls(false);
|
||||
linkWeb.loadUrl(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.iv_icon:
|
||||
finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_icon) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
@ -36,14 +36,9 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
* 登录页
|
||||
*/
|
||||
public class LoginActivity extends BaseActivity implements View.OnClickListener {
|
||||
private TextView tvRegister;
|
||||
private android.widget.EditText etLoginName;
|
||||
private android.widget.EditText etLoginPaw;
|
||||
private TextView tvForgetPaw;
|
||||
private Button btnLogin;
|
||||
private SharedPreferences navInfo;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
private TextView tvStatement;
|
||||
private CheckBox cbStatement;
|
||||
|
||||
@Override
|
||||
@ -79,19 +74,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
||||
navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
tvRegister = findViewById(R.id.tv_register);
|
||||
SharedPreferences navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
TextView tvRegister = findViewById(R.id.tv_register);
|
||||
etLoginName = findViewById(R.id.et_login_name);
|
||||
etLoginPaw = findViewById(R.id.et_login_paw);
|
||||
tvForgetPaw = findViewById(R.id.tv_forget_paw);
|
||||
TextView tvForgetPaw = findViewById(R.id.tv_forget_paw);
|
||||
cbStatement = findViewById(R.id.iv_login_check);
|
||||
btnLogin = findViewById(R.id.btn_login);
|
||||
btnLogin.setOnClickListener(this::onClick);
|
||||
tvStatement = findViewById(R.id.tv_statement);
|
||||
tvStatement.setOnClickListener(this::onClick);
|
||||
Button btnLogin = findViewById(R.id.btn_login);
|
||||
btnLogin.setOnClickListener(this);
|
||||
TextView tvStatement = findViewById(R.id.tv_statement);
|
||||
tvStatement.setOnClickListener(this);
|
||||
tvRegister.setOnClickListener(this);
|
||||
tvForgetPaw.setOnClickListener(this);
|
||||
if (navInfo!=null){
|
||||
if (navInfo !=null){
|
||||
String user_name = navInfo.getString("user_name", null);
|
||||
if (user_name!=null&&!user_name.equals("")){
|
||||
etLoginName.setText(user_name);
|
||||
@ -119,12 +114,12 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
break;
|
||||
case R.id.btn_login:
|
||||
String name = etLoginName.getText().toString().trim();
|
||||
if (name == null || name.equals("")) {
|
||||
if (name.equals("")) {
|
||||
Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
String paw = etLoginPaw.getText().toString().trim();
|
||||
if (paw == null || paw.equals("")) {
|
||||
if (paw.equals("")) {
|
||||
Toast.makeText(this, "请输入密码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -239,7 +234,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
}
|
||||
navInfoEditor.commit();
|
||||
}
|
||||
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
|
||||
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}else {
|
||||
|
@ -315,8 +315,6 @@ public class MainActivity extends BaseActivity {
|
||||
}.start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
@ -3,21 +3,14 @@ package com.navinfo.outdoor.activity;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.location.Location;
|
||||
import android.media.MediaMetadataRetriever;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -25,14 +18,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.Chronometer;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.github.lazylibrary.util.DensityUtil;
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -41,7 +32,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.navinfo.outdoor.util.MapManager;
|
||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||
import com.otaliastudios.cameraview.CameraException;
|
||||
import com.otaliastudios.cameraview.CameraListener;
|
||||
@ -52,16 +42,8 @@ import com.otaliastudios.cameraview.CameraView;
|
||||
import com.otaliastudios.cameraview.FileCallback;
|
||||
import com.otaliastudios.cameraview.PictureResult;
|
||||
import com.otaliastudios.cameraview.VideoResult;
|
||||
import com.otaliastudios.cameraview.controls.Engine;
|
||||
import com.otaliastudios.cameraview.controls.Mode;
|
||||
|
||||
import com.otaliastudios.cameraview.frame.Frame;
|
||||
import com.otaliastudios.cameraview.frame.FrameProcessor;
|
||||
import com.otaliastudios.cameraview.size.AspectRatio;
|
||||
import com.otaliastudios.cameraview.size.Size;
|
||||
import com.otaliastudios.cameraview.size.SizeSelector;
|
||||
import com.otaliastudios.cameraview.size.SizeSelectorParser;
|
||||
import com.otaliastudios.cameraview.size.SizeSelectors;
|
||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
|
||||
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
|
||||
@ -75,8 +57,6 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.Marker;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.Polygon;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.PolygonOptions;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
@ -89,16 +69,15 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@ -156,39 +135,33 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
if (getIntent() != null) {
|
||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
|
||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
||||
oratation = getIntent().getIntExtra(Constant.INTENT_VIDEO_ORATATION, -1);
|
||||
oratation = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
|
||||
}
|
||||
videoChronometer = findViewById(R.id.video_chronometer);
|
||||
// if (finalVideoPath == null) {
|
||||
// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
|
||||
// }
|
||||
|
||||
|
||||
layerChange = findViewById(R.id.layer_change);
|
||||
|
||||
|
||||
timer = new Timer();
|
||||
|
||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
||||
|
||||
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
||||
btnSwitch.setOnClickListener(this::onClick);
|
||||
btnSwitch.setOnClickListener(this);
|
||||
// capturePicture = (ImageButton) findViewById(R.id.capturePicture);
|
||||
// capturePicture.setOnClickListener(this::onClick);
|
||||
ivPic = findViewById(R.id.iv_pic);
|
||||
//相机记录器
|
||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||
camera = findViewById(R.id.camera);
|
||||
camera.setOnClickListener(this::onClick);
|
||||
camera.setOnClickListener(this);
|
||||
captureVideo = findViewById(R.id.capuretVideo);
|
||||
captureVideo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) { // 开始采集,设置按钮文字内容为“结束采集”
|
||||
if (oratation == 0) { // oratation为0时,拍摄视频必须为横屏
|
||||
if (oratation == 0) { // oblation为0时,拍摄视频必须为横屏
|
||||
// 如果当前手机是竖向,则不允许拍摄
|
||||
if (camera.getVideoSize().getWidth() < camera.getVideoSize().getHeight()) {
|
||||
if (Objects.requireNonNull(camera.getVideoSize()).getWidth() < camera.getVideoSize().getHeight()) {
|
||||
Toast.makeText(PictureActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -206,7 +179,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
});
|
||||
|
||||
stopVideo = findViewById(R.id.btn_stop_video);
|
||||
stopVideo.setOnClickListener(this::onClick);
|
||||
stopVideo.setOnClickListener(this);
|
||||
/**
|
||||
* camera.setVideoBitRate(2000000);
|
||||
* 设置帧率
|
||||
@ -214,11 +187,12 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
* app:cameraVideoSizeMaxWidth="2000"
|
||||
* app:cameraVideoSizeMaxArea="2000000"
|
||||
*/
|
||||
camera.setVideoBitRate(2000000);
|
||||
|
||||
camera.setVideoBitRate(2100000);
|
||||
//获取地图
|
||||
tencentMap = ivMap.getMap();
|
||||
|
||||
//tencentMap.setOnMapLoadedCallback();
|
||||
//tenementMap.setOnMapLoadedCallback();
|
||||
//获取地图UI 设置对象
|
||||
UiSettings uiSettings = tencentMap.getUiSettings();
|
||||
//设置logo的大小
|
||||
@ -275,11 +249,12 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
result.toFile(file, new FileCallback() {
|
||||
@Override
|
||||
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
||||
assert file != null;
|
||||
Toast.makeText(PictureActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
if (camera.isTakingVideo()) {
|
||||
message("Captured while taking video. Size=" + result.getSize(), false);
|
||||
message("Captured while taking video. Size=" + result.getSize());
|
||||
}
|
||||
long callbackTime = System.currentTimeMillis();
|
||||
captureTime = callbackTime - 300;
|
||||
@ -354,7 +329,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
/**
|
||||
* 获取当前视频的时间,记录csv文件时使用
|
||||
* */
|
||||
// long currentTime = AWMp4ParserHelper.getInstance().getVedioTotalTime(new File(finalVideoPath));
|
||||
// long currentTime = AWMp4ParserHelper.getInstance().getVedasTotalTime(new File(finalVideoPath));
|
||||
timerTask = new CsvTimerTask(new File(finalVideoPath + ".txt"));
|
||||
timer.schedule(timerTask, 0, period * 1000);
|
||||
// // 开始采集,每隔2秒实时记录位置信息、视频时间以及设备时间
|
||||
@ -372,14 +347,13 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
super.onVideoRecordingEnd();
|
||||
if (timerTask != null) {
|
||||
timerTask.cancel();
|
||||
} else {
|
||||
// Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} // Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// 一段视频拍摄完成自动将当前拍摄路径加1
|
||||
File finalVideoFile = new File(finalVideoPath);
|
||||
if (finalVideoFile.exists()) {
|
||||
int videoIndex = Integer.parseInt(finalVideoFile.getName().replace(".mp4", ""));
|
||||
finalVideoPath = finalVideoFile.getParentFile().getAbsolutePath() + "/" + (videoIndex + 1) + ".mp4";
|
||||
finalVideoPath = Objects.requireNonNull(finalVideoFile.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".mp4";
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -405,7 +379,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||
}
|
||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||
// 构造 PolylineOpitons
|
||||
// 构造 PolylineOnions
|
||||
PolylineOptions polylineOptions = new PolylineOptions()
|
||||
.addAll(latLineString)
|
||||
// 折线设置圆形线头
|
||||
@ -433,14 +407,9 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
return hh + ":" + mm + ":" + ss;
|
||||
}
|
||||
|
||||
private void message(String content, Boolean important) {
|
||||
if (important) {
|
||||
LOG.w(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
LOG.i(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
private void message(String content) {
|
||||
LOG.i(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
@ -465,9 +434,9 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
case R.id.btn_switch:
|
||||
v.setEnabled(false);
|
||||
handler.sendEmptyMessageDelayed(0, 2000); // 利用handler延迟发送更改状态信息
|
||||
btnSwich();
|
||||
benSwitch();
|
||||
break;
|
||||
// case R.id.capuretVideo:
|
||||
// case R.id.capuletVideo:
|
||||
// startTakenVideo(); // 开始拍摄视频
|
||||
// break;
|
||||
case R.id.btn_stop_video:
|
||||
@ -514,8 +483,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
FileOutputStream fo = new FileOutputStream(file);
|
||||
FileDescriptor fileDescriptor = fo.getFD();
|
||||
camera.takeVideo(fileDescriptor);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -535,8 +502,8 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
|
||||
private Bitmap getBitMap(int resourceId) {
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourceId);
|
||||
private Bitmap getBitMap() {
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.location);
|
||||
int width = bitmap.getWidth();
|
||||
int height = bitmap.getHeight();
|
||||
int newWidth = 55;
|
||||
@ -559,7 +526,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
locationStyle = new MyLocationStyle();
|
||||
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
//创建图标
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(R.drawable.location));
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap());
|
||||
locationStyle.icon(bitmapDescriptor);
|
||||
//设置定位圆形区域的边框宽度;
|
||||
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
||||
@ -567,7 +534,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
tencentMap.setMyLocationStyle(locationStyle);
|
||||
}
|
||||
|
||||
public void btnSwich() {
|
||||
public void benSwitch() {
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
System.out.println("width-display :" + dm.widthPixels);
|
||||
@ -609,10 +576,20 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
camera.open();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
super.onRestart();
|
||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
captureVideo.setChecked(false);
|
||||
captureVideo.setText("继续采集");
|
||||
}
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
camera.close();
|
||||
stopTakenVideo();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -635,18 +612,16 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMessageMainThread(Message msg) {
|
||||
switch (msg.what) {
|
||||
case Constant.EVENT_WHAT_LOCATION_CHANGE: // 用户位置更新
|
||||
if (tencentMap != null) {
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
16, //目标缩放级别
|
||||
0, //目标倾斜角
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
}
|
||||
break;
|
||||
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||
if (tencentMap != null) {
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
16, //目标缩放级别
|
||||
0, //目标倾斜角
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -671,7 +646,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
@Override
|
||||
public void run() {
|
||||
// 记录当前时间、视频时间、以及当前经纬度信息
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(formatter.format(new Date())); // 记录当前时间
|
||||
sb.append(",");
|
||||
sb.append(currentVideoTime);// 记录视频时间
|
||||
|
@ -2,15 +2,12 @@ package com.navinfo.outdoor.activity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.DisplayMetrics;
|
||||
@ -23,13 +20,11 @@ import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.github.lazylibrary.util.DensityUtil;
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||
import com.otaliastudios.cameraview.CameraException;
|
||||
@ -39,14 +34,9 @@ import com.otaliastudios.cameraview.CameraView;
|
||||
import com.otaliastudios.cameraview.FileCallback;
|
||||
import com.otaliastudios.cameraview.PictureResult;
|
||||
import com.otaliastudios.cameraview.VideoResult;
|
||||
import com.otaliastudios.cameraview.controls.Engine;
|
||||
import com.otaliastudios.cameraview.controls.Mode;
|
||||
import com.otaliastudios.cameraview.size.AspectRatio;
|
||||
import com.otaliastudios.cameraview.size.SizeSelector;
|
||||
import com.otaliastudios.cameraview.size.SizeSelectors;
|
||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
|
||||
import com.tencent.tencentmap.mapsdk.maps.MapView;
|
||||
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
|
||||
import com.tencent.tencentmap.mapsdk.maps.TextureMapView;
|
||||
import com.tencent.tencentmap.mapsdk.maps.UiSettings;
|
||||
@ -68,20 +58,12 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.navinfo.outdoor.R.drawable.location;
|
||||
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
|
||||
|
||||
public class PicturesActivity extends BaseActivity implements View.OnClickListener {
|
||||
@ -90,32 +72,27 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
private long captureTime = 0;
|
||||
private android.widget.Button btnSwitch;
|
||||
private TencentMap tencentMap;
|
||||
private MyLocationStyle locationStyle;
|
||||
private TextureMapView ivMap;
|
||||
private Button stopPicture;
|
||||
private List<Removable> removables;
|
||||
private PoiEntity poiEntity;
|
||||
private Polyline polyline;
|
||||
private String finalVideoPath; // 摄像后最终保存的文件名
|
||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||
private CheckBox capturePicture;//拍照
|
||||
private ArrayList<File> pictureList;
|
||||
private Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
public boolean handleMessage(@NonNull Message msg) {
|
||||
if (msg.what == 0x101 && listenerPicture) {
|
||||
File file = (File) msg.obj;
|
||||
pictureList.add(file);
|
||||
camera.takePicture();
|
||||
} else if (msg.what == 0x102) {
|
||||
if (btnSwitch != null) {
|
||||
btnSwitch.setEnabled(true);
|
||||
}
|
||||
} else if (msg.what == 0x103) {
|
||||
File file = (File) msg.obj;
|
||||
pictureList.add(file);
|
||||
listenerPicture = false;
|
||||
capturePicture.setText("开始采集");
|
||||
if (type!=3){
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
capturePicture.setChecked(false);
|
||||
}
|
||||
return false;
|
||||
@ -137,44 +114,55 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
pictureList = new ArrayList<>();
|
||||
removables = new ArrayList<>();//存储轨迹的marker
|
||||
layerChange = findViewById(R.id.layer_change);
|
||||
if (getIntent() != null) {
|
||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
||||
type = getIntent().getIntExtra("type", 0);
|
||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
|
||||
assert finalVideoPath != null;
|
||||
File file = new File(finalVideoPath);
|
||||
paperFile = new File(file.getParentFile().getAbsoluteFile() + "/" + "paper.txt");
|
||||
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
|
||||
}
|
||||
|
||||
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
||||
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
||||
btnSwitch.setOnClickListener(this::onClick);
|
||||
btnSwitch.setOnClickListener(this);
|
||||
//相机记录器
|
||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||
camera = findViewById(R.id.camera);
|
||||
camera.setOnClickListener(this::onClick);
|
||||
capturePicture = findViewById(R.id.capuret_picture);
|
||||
camera.setOnClickListener(this);
|
||||
capturePicture = findViewById(R.id.capture_picture);
|
||||
if (type==3){
|
||||
capturePicture.setText("拍摄");
|
||||
}else {
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
capturePicture.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) { // 开始采集,设置按钮文字内容为“结束采集”
|
||||
capturePicture.setText("暂停采集");
|
||||
if (type!=3){
|
||||
capturePicture.setText("暂停采集");
|
||||
}
|
||||
listenerPicture = true;
|
||||
camera.takePicture();
|
||||
} else {
|
||||
listenerPicture = false;
|
||||
capturePicture.setText("开始采集");
|
||||
|
||||
if (type!=3){
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
stopPicture = findViewById(R.id.btn_stop_picture);
|
||||
stopPicture.setOnClickListener(this::onClick);
|
||||
Button stopPicture = findViewById(R.id.btn_stop_picture);
|
||||
stopPicture.setOnClickListener(this);
|
||||
//获取地图
|
||||
tencentMap = ivMap.getMap();
|
||||
|
||||
//获取地图UI 设置对象
|
||||
UiSettings uiSettings = tencentMap.getUiSettings();
|
||||
//设置logo的大小
|
||||
@ -193,20 +181,19 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
@Override
|
||||
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
||||
if (listenerPicture) {
|
||||
assert file != null;
|
||||
if (file.exists()) {
|
||||
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
||||
finalVideoPath = file.getParentFile().getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
||||
}
|
||||
initMarkerPaper();
|
||||
Message message = new Message();
|
||||
if (type == 3) {
|
||||
message.what = 0x103;
|
||||
message.obj = file;
|
||||
handler.sendMessageDelayed(message, 0);
|
||||
Toast.makeText(PicturesActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
message.what = 0x101;
|
||||
message.obj = file;
|
||||
Toast.makeText(PicturesActivity.this, "保存成功" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||
handler.sendMessageDelayed(message, 2000);
|
||||
}
|
||||
@ -217,7 +204,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
});
|
||||
if (camera.isTakingVideo()) {
|
||||
message("Captured while taking video. Size=" + result.getSize(), false);
|
||||
message("Captured while taking video. Size=" + result.getSize());
|
||||
}
|
||||
long callbackTime = System.currentTimeMillis();
|
||||
captureTime = callbackTime - 300;
|
||||
@ -245,24 +232,18 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
});
|
||||
|
||||
// 修改相机的宽高为屏幕宽高的1/3
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//相机的宽高
|
||||
layoutParamsMap.height = dm.heightPixels / 3;
|
||||
layoutParamsMap.width = dm.widthPixels / 3;
|
||||
layoutParamsMap.height = dm.widthPixels / 3;
|
||||
layoutParamsMap.width = dm.heightPixels / 3;
|
||||
ivMap.setLayoutParams(layoutParamsMap);
|
||||
|
||||
}
|
||||
|
||||
private void message(String content, Boolean important) {
|
||||
if (important) {
|
||||
LOG.w(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
LOG.i(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
private void message(String content) {
|
||||
LOG.i(content);
|
||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private void initLine() {
|
||||
@ -277,7 +258,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||
}
|
||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||
// 构造 PolylineOpitons
|
||||
// 构造 PolylineOnions
|
||||
PolylineOptions polylineOptions = new PolylineOptions()
|
||||
.addAll(latLineString)
|
||||
// 折线设置圆形线头
|
||||
@ -308,8 +289,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
case R.id.btn_stop_picture:
|
||||
listenerPicture = false;
|
||||
Intent intent = new Intent();
|
||||
finalVideoPath = paperFile.getParentFile().getAbsolutePath() + "/" +videoIndex+ ".jpg";
|
||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" +videoIndex+ ".jpg";
|
||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||
intent.putExtra("type",type);
|
||||
setResult(0x102, intent);
|
||||
finish();
|
||||
break;
|
||||
@ -317,13 +299,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
case R.id.btn_switch:
|
||||
v.setEnabled(false);
|
||||
handler.sendEmptyMessageDelayed(0x102, 2000); // 利用handler延迟发送更改状态信息
|
||||
btnSwich();
|
||||
benSwitch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private Bitmap getBitMap(int resourceId) {
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourceId);
|
||||
private Bitmap getBitMap() {
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.location);
|
||||
int width = bitmap.getWidth();
|
||||
int height = bitmap.getHeight();
|
||||
int newWidth = 55;
|
||||
@ -343,10 +325,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
tencentMap.setLocationSource(new MyTecentLocationSource(this));
|
||||
tencentMap.setMyLocationEnabled(true);
|
||||
|
||||
locationStyle = new MyLocationStyle();
|
||||
MyLocationStyle locationStyle = new MyLocationStyle();
|
||||
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
//创建图标
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(location));
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap());
|
||||
locationStyle.icon(bitmapDescriptor);
|
||||
//设置定位圆形区域的边框宽度;
|
||||
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
||||
@ -355,11 +337,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
|
||||
public void btnSwich() {
|
||||
public void benSwitch() {
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
System.out.println("width-display :" + dm.widthPixels);
|
||||
System.out.println("heigth-display :" + dm.heightPixels);
|
||||
System.out.println("height-display :" + dm.heightPixels);
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
|
||||
int heightMap = ivMap.getMeasuredHeight();
|
||||
int widthMap = ivMap.getMeasuredWidth();
|
||||
@ -369,7 +351,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
layerChange.removeAllViews();
|
||||
if (widthMap > widthCamera) {
|
||||
|
||||
layoutParamsCamera.width = dm.widthPixels;
|
||||
layoutParamsCamera.height = dm.heightPixels;
|
||||
layoutParamsMap.height = heightCamera;
|
||||
@ -379,7 +360,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
layerChange.addView(camera);
|
||||
layerChange.addView(ivMap);
|
||||
} else {
|
||||
|
||||
layoutParamsMap.height = dm.heightPixels;
|
||||
layoutParamsMap.width = dm.widthPixels;
|
||||
layoutParamsCamera.height = heightMap;
|
||||
@ -399,11 +379,24 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
super.onRestart();
|
||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
if (type!=3){
|
||||
capturePicture.setChecked(false);
|
||||
capturePicture.setText("继续采集");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
camera.close();
|
||||
if (type!=3){
|
||||
listenerPicture = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -428,24 +421,22 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEventMessageMainThread(Message msg) {
|
||||
switch (msg.what) {
|
||||
case Constant.EVENT_WHAT_LOCATION_CHANGE: // 用户位置更新
|
||||
if (tencentMap != null) {
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
16, //目标缩放级别
|
||||
0, //目标倾斜角
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
}
|
||||
break;
|
||||
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||
if (tencentMap != null) {
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
16, //目标缩放级别
|
||||
0, //目标倾斜角
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void initMarkerPaper() {
|
||||
// 记录当前时间、视频时间、以及当前经纬度信息
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(formatter.format(new Date())); // 记录当前时
|
||||
sb.append(",");
|
||||
sb.append(videoIndex);//個數
|
||||
|
@ -12,11 +12,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
* */
|
||||
public class RegardMapActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private ImageView ivFilterFinal;
|
||||
private TextView tvPhone;
|
||||
private TextView tvMapLink;
|
||||
private TextView tvOfficialLink;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@ -26,13 +21,13 @@ public class RegardMapActivity extends BaseActivity implements View.OnClickLis
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivFilterFinal = (ImageView) findViewById(R.id.iv_filter_final);
|
||||
ivFilterFinal.setOnClickListener(this::onClick);
|
||||
tvPhone = findViewById(R.id.tv_phone);
|
||||
tvMapLink = (TextView) findViewById(R.id.tv_map_link);
|
||||
tvMapLink.setOnClickListener(this::onClick);
|
||||
tvOfficialLink = (TextView) findViewById(R.id.tv_official_link);
|
||||
tvOfficialLink.setOnClickListener(this::onClick);
|
||||
ImageView ivFilterFinal =findViewById(R.id.iv_filter_final);
|
||||
ivFilterFinal.setOnClickListener(this);
|
||||
TextView tvPhone = findViewById(R.id.tv_phone);
|
||||
TextView tvMapLink =findViewById(R.id.tv_map_link);
|
||||
tvMapLink.setOnClickListener(this);
|
||||
TextView tvOfficialLink =findViewById(R.id.tv_official_link);
|
||||
tvOfficialLink.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,9 +11,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
public class StatementActivity extends BaseActivity {
|
||||
|
||||
|
||||
private android.widget.TextView tvTextStatement;
|
||||
private android.widget.ImageView ivStatement;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_statement;
|
||||
@ -22,9 +19,8 @@ public class StatementActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
tvTextStatement = (TextView) findViewById(R.id.tv_textStatement);
|
||||
|
||||
ivStatement = (ImageView) findViewById(R.id.iv_statement);
|
||||
TextView tvTextStatement =findViewById(R.id.tv_textStatement);
|
||||
ImageView ivStatement =findViewById(R.id.iv_statement);
|
||||
ivStatement.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -89,25 +89,25 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
||||
ivUser = findViewById(R.id.iv_user);
|
||||
ivUser.setOnClickListener(this::onClick);
|
||||
ivUser.setOnClickListener(this);
|
||||
btnAttestation = findViewById(R.id.btn_attestations);
|
||||
btnAttestation.setOnClickListener(this::onClick);
|
||||
btnAttestation.setOnClickListener(this);
|
||||
btnGathering = findViewById(R.id.btn_gathering);
|
||||
btnGathering.setOnClickListener(this::onClick);
|
||||
btnGathering.setOnClickListener(this);
|
||||
region = findViewById(R.id.region);
|
||||
region.setOnClickListener(this::onClick);
|
||||
region.setOnClickListener(this);
|
||||
llRegion = findViewById(R.id.ll_region);
|
||||
llRegion.setOnClickListener(this::onClick);
|
||||
llRegion.setOnClickListener(this);
|
||||
etPhone = findViewById(R.id.et_phone);
|
||||
etPhone.setOnClickListener(this::onClick);
|
||||
etPhone.setOnClickListener(this);
|
||||
etQq = findViewById(R.id.edit_qq);
|
||||
etQq.setOnClickListener(this::onClick);
|
||||
etQq.setOnClickListener(this);
|
||||
etMailbox = findViewById(R.id.edit_mailbox);
|
||||
etMailbox.setOnClickListener(this::onClick);
|
||||
etMailbox.setOnClickListener(this);
|
||||
userSave = findViewById(R.id.btn_save);
|
||||
userSave.setOnClickListener(this::onClick);
|
||||
userSave.setOnClickListener(this);
|
||||
btnWeChat = findViewById(R.id.btn_weChat_binding);
|
||||
btnWeChat.setOnClickListener(this::onClick);
|
||||
btnWeChat.setOnClickListener(this);
|
||||
if (Constant.MOBILE!=null){
|
||||
etPhone.setText(Constant.MOBILE);
|
||||
}
|
||||
@ -194,7 +194,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}else {
|
||||
httpParams.put("mobile",userphone);
|
||||
}
|
||||
if (!userqq.equals("")&&userqq!=null) {
|
||||
if (!userqq.equals("")) {
|
||||
if (!isQQNum_matcher) {
|
||||
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -202,7 +202,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
httpParams.put("qq",userqq);
|
||||
}
|
||||
}
|
||||
if (!usermailbox.equals("")&&usermailbox!=null){
|
||||
if (!usermailbox.equals("")){
|
||||
if (!isEmail_matcher) {
|
||||
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
|
@ -24,7 +24,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private ImageView ivIcon;
|
||||
private WebView nWebView;
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@ -38,17 +37,16 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
nWebView.getSettings().setBlockNetworkImage(false);
|
||||
WebSettings settings = nWebView.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
nWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
ivIcon = findViewById(R.id.iv_icon);
|
||||
ivIcon.setOnClickListener(this::onClick);
|
||||
nWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
ImageView ivIcon = findViewById(R.id.iv_icon);
|
||||
ivIcon.setOnClickListener(this);
|
||||
initWebWork();
|
||||
}
|
||||
|
||||
private void initWebWork() {
|
||||
showLoadingDialog();
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
assert bundle != null;
|
||||
String url = bundle.getString("url");
|
||||
HttpParams httpParams = new HttpParams();
|
||||
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
||||
@ -96,7 +94,7 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
|
||||
// 监听
|
||||
private class MyWebViewClient extends WebViewClient {
|
||||
private static class MyWebViewClient extends WebViewClient {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.navinfo.outdoor.bean.BankPathBean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
||||
@ -26,6 +25,7 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
|
||||
View inflate = LayoutInflater.from(context).inflate(R.layout.bankadapteritem, parent, false);
|
||||
@ -34,7 +34,7 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull @NotNull ViewHolder holder, int position) {
|
||||
holder.tvitem.setText(bankPathBeans.get(position).getLabel());
|
||||
holder.titer.setText(bankPathBeans.get(position).getLabel());
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -48,12 +48,12 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
||||
return bankPathBeans.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvitem;
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView titer;
|
||||
|
||||
public ViewHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
tvitem = itemView.findViewById(R.id.tv_bank);
|
||||
titer = itemView.findViewById(R.id.tv_bank);
|
||||
}
|
||||
}
|
||||
public interface OnBankClick {
|
||||
|
@ -58,7 +58,7 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
||||
}
|
||||
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView ivCapacity;
|
||||
TextView tvCapacity;
|
||||
TextView tvResults;
|
||||
|
@ -14,7 +14,6 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -43,7 +42,7 @@ public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapte
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.tvCapItem.setText(capItemList.get(position).getTitle());
|
||||
holder.tvReaus.setText(capItemList.get(position).getStatus()+"");
|
||||
holder.tvReams.setText(capItemList.get(position).getStatus()+"");
|
||||
Glide.with(context).load(capItemList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapItem);
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -61,15 +60,15 @@ public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapte
|
||||
return capItemList.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView ivCapItem;
|
||||
TextView tvCapItem;
|
||||
TextView tvReaus;
|
||||
TextView tvReams;
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
ivCapItem = itemView.findViewById(R.id.iv_tas_capacity);
|
||||
tvCapItem = itemView.findViewById(R.id.tas_capacity_title);
|
||||
tvReaus = itemView.findViewById(R.id.tv_capacity_through);
|
||||
tvReams = itemView.findViewById(R.id.tv_capacity_through);
|
||||
}
|
||||
}
|
||||
public interface setOnClick{
|
||||
|
@ -136,7 +136,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
||||
}
|
||||
}
|
||||
|
||||
//indext内容
|
||||
//indent内容
|
||||
private String getOptionIndex(int index) {
|
||||
char A = (char) (65 + index);
|
||||
return A + ":";
|
||||
@ -149,7 +149,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
||||
return measureList.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvMeasure;
|
||||
LinearLayout llOption;
|
||||
|
||||
@ -170,7 +170,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
||||
resultStr = new StringBuilder("");
|
||||
List<CompoundButton> resultList = new ArrayList<>();
|
||||
getCompoundButton(group, resultList);
|
||||
if (resultList != null && !resultList.isEmpty()) {
|
||||
if (!resultList.isEmpty()) {
|
||||
for (int i = 0; i < resultList.size(); i++) {
|
||||
if (((CompoundButton) resultList.get(i)).isChecked()) {
|
||||
resultStr.append(i).append(",");
|
||||
|
@ -63,7 +63,7 @@ public class ChargingPileAdapter extends RecyclerView.Adapter<ChargingPileAdapte
|
||||
return chargingPileEntities.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView imageView;
|
||||
RelativeLayout rlItem;
|
||||
TextView textView;
|
||||
|
@ -53,7 +53,7 @@ public class EventPrefectureAdapter extends RecyclerView.Adapter<EventPrefecture
|
||||
return dataBeans.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvTitle;
|
||||
TextView tvDest;
|
||||
TextView tvTime;
|
||||
|
@ -109,7 +109,7 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
||||
return allPoi.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvName, tvForm, tvTaskId, tvMoney, tvDistance, tvTaskStatus;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
@ -135,9 +135,6 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
||||
|
||||
/**
|
||||
* 保存小数点后两位
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String format2(double value) {
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
|
@ -12,6 +12,8 @@ import androidx.viewpager.widget.ViewPager;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.navinfo.outdoor.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
@ -23,16 +25,16 @@ public class ImagePagerAdapter extends PagerAdapter {
|
||||
LayoutInflater inflater = null;
|
||||
|
||||
ImageView full_image;
|
||||
public ImagePagerAdapter(Context context, ArrayList<String> imgsUrl) {
|
||||
public ImagePagerAdapter(Context context, ArrayList<String> imusUrl) {
|
||||
this.context = context;
|
||||
this.imgsUrl = imgsUrl;
|
||||
this.imgsUrl = imusUrl;
|
||||
inflater = LayoutInflater.from(context);
|
||||
|
||||
}
|
||||
|
||||
/** 动态加载数据 */
|
||||
@Override
|
||||
public void setPrimaryItem(ViewGroup container, int position, Object object) {
|
||||
public void setPrimaryItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
|
||||
super.setPrimaryItem(container, position, object);
|
||||
}
|
||||
|
||||
@ -42,19 +44,20 @@ public class ImagePagerAdapter extends PagerAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewFromObject(View arg0, Object arg1) {
|
||||
public boolean isViewFromObject(@NotNull View arg0, @NotNull Object arg1) {
|
||||
return arg0 == arg1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemPosition(Object object) {
|
||||
public int getItemPosition(@NotNull Object object) {
|
||||
// TODO Auto-generated method stub
|
||||
return super.getItemPosition(object);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object instantiateItem(ViewGroup container, int position) {
|
||||
View view = inflater.from(context).inflate(R.layout.details_imageshow_item, null);
|
||||
public Object instantiateItem(@NotNull ViewGroup container, int position) {
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.details_imageshow_item, null);
|
||||
full_image = (ImageView)view.findViewById(R.id.full_image);
|
||||
Glide.with(context).load(imgsUrl.get(position)).into(full_image);
|
||||
|
||||
@ -63,7 +66,7 @@ public class ImagePagerAdapter extends PagerAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||
public void destroyItem(@NotNull ViewGroup container, int position, @NotNull Object object) {
|
||||
((ViewPager) container).removeView((View) object);
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class IssueProblemAdapter extends RecyclerView.Adapter<IssueProblemAdapte
|
||||
return issueList.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvIssue;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
|
@ -59,7 +59,7 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
|
||||
return messageList.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private TextView tvMessageTitle;
|
||||
private TextView tvMessageDest;
|
||||
|
@ -16,6 +16,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.bean.PhoneBean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -76,16 +78,16 @@ public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.My
|
||||
return a;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
MyViewHolder holder = new MyViewHolder(LayoutInflater.from(
|
||||
public MyViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType) {
|
||||
return new MyViewHolder(LayoutInflater.from(
|
||||
context).inflate(R.layout.item_poi, parent,
|
||||
false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final MyViewHolder holder, final int position) {
|
||||
public void onBindViewHolder(@NotNull final MyViewHolder holder, final int position) {
|
||||
PhoneBean poiBean = list.get(position);
|
||||
if(poiBean.getPhone().startsWith("1")){
|
||||
holder.llPoi.setVisibility(View.GONE);
|
||||
@ -176,7 +178,7 @@ public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.My
|
||||
/**
|
||||
* ViewHolder的类,用于缓存控件
|
||||
*/
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
static class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvPhone;
|
||||
EditText editAreaCode, editPhoneNumber;
|
||||
ImageView image;
|
||||
|
@ -56,7 +56,7 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
||||
return listBeans.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvnName, tvTime, tvMany, tvMassage ,tvAuditStatus;
|
||||
|
||||
public ViewHolder(@NonNull @NotNull View itemView) {
|
||||
|
@ -111,7 +111,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
||||
return allRoad.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView tvName;
|
||||
private TextView tvDay;
|
||||
private CheckBox cbUnSubmit;
|
||||
|
@ -57,7 +57,7 @@ public class TaskExplainAdapter extends RecyclerView.Adapter<TaskExplainAdapter.
|
||||
return explainList.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView ivExplain;
|
||||
TextView tvExplain;
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class TaskExplainAdapter2 extends RecyclerView.Adapter<TaskExplainAdapter
|
||||
return explainList2.size();
|
||||
}
|
||||
|
||||
class ViewHolder2 extends RecyclerView.ViewHolder {
|
||||
static class ViewHolder2 extends RecyclerView.ViewHolder {
|
||||
TextView tvText;
|
||||
|
||||
public ViewHolder2(@NonNull View itemView) {
|
||||
|
@ -29,12 +29,11 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View mView = LayoutInflater.from(context).inflate(R.layout.task_prefecture_item, parent, false);
|
||||
ViewHolder viewHolder = new ViewHolder(mView);
|
||||
// int parentHeight= parent.getHeight();
|
||||
// int parentHeight= parent.getHeight();
|
||||
// parent.getWidth();
|
||||
// ViewGroup.LayoutParams layoutParams = viewHolder.itemView.getLayoutParams();
|
||||
// layoutParams.height = (parentHeight/ 6);
|
||||
return viewHolder;
|
||||
return new ViewHolder(mView);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,7 +57,7 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
||||
return dataBeans.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvTitle;
|
||||
TextView tvDest;
|
||||
TextView tvTime;
|
||||
|
@ -60,7 +60,7 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
|
||||
return dataBeans.size();
|
||||
}
|
||||
|
||||
public class OnViewHolder extends RecyclerView.ViewHolder {
|
||||
public static class OnViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView tvTitle, tvDec, tvTime;
|
||||
|
||||
public OnViewHolder(@NonNull @NotNull View itemView) {
|
||||
|
@ -110,7 +110,7 @@ public class Constant {
|
||||
public static final int FILTER_LIST_ITEM = 5;//点击筛选的item
|
||||
public static final int GATHER_GET = 6;//点击开始采集
|
||||
public static final int TREASURE_GATHER_GET_WORD = 7;//领取采集页面其他marker 的回传
|
||||
public static final int MAIN_BUTTON_VISIABLE = 8; // 控制主界面各个按钮显隐状态的what值
|
||||
public static final int MAIN_BUTTON_VISITABLE = 8; // 控制主界面各个按钮显隐状态的what值
|
||||
public static final int POI_DRAWER = 10; //设置每个页面显示屏幕的位置
|
||||
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
||||
public static final int MAIN_CHARGING_STATION = 13;//充电站的Fragment 对地图页面marker 的一个展示 编辑
|
||||
@ -145,15 +145,15 @@ public class Constant {
|
||||
public static final int REGISTER_WORD = 46; //注册的返回
|
||||
|
||||
public static int NUMBER = 200; //任务个数
|
||||
public static int LIMIT_TTPE = -1; //权限类型,普通任务-0,专属任务-1
|
||||
public static int LIMIT_TYPE = -1; //权限类型,普通任务-0,专属任务-1
|
||||
public static int TASK_TYPE = -1; // 任务类型
|
||||
public static int TASK_STASTUS = -1; // 任务状态
|
||||
public static int TASK_STARTUP = -1; // 任务状态
|
||||
public static String CODE = ""; //区号
|
||||
/**
|
||||
* 用户当前位置
|
||||
*/
|
||||
public static TencentLocation currentLocation;
|
||||
public static LatLng markerLatlng;
|
||||
public static LatLng markerLacing;
|
||||
//marker 图标
|
||||
|
||||
// public static final BitmapDescriptor POI_ICON = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
||||
@ -168,7 +168,7 @@ public class Constant {
|
||||
public static final String INTENT_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||
public static final String INTENT_JPG_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的图片保存位置
|
||||
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||
public static final String INTENT_VIDEO_ORATATION = "INTENT_VIDEO_ORATATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
||||
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
||||
|
||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||
|
||||
@ -181,16 +181,16 @@ public class Constant {
|
||||
/**
|
||||
* 联系我们的QQ群名称和QQ群号
|
||||
* */
|
||||
public static String REGION_JING_NAME = "京津冀晋蒙-地图寻宝群";
|
||||
public static String REGION_JING_PHONE = "9721810";
|
||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||
public static String REGION_JIG_PHONE = "9721810";
|
||||
public static String REGION_HEI_NAME = "黑吉辽-地图寻宝群";
|
||||
public static String REGION_HEI_PHONE = "549321657";
|
||||
public static String REGION_SHAN_NAME = "山东-地图寻宝群";
|
||||
public static String REGION_SHAN_PHONE = "581827297";
|
||||
public static String REGION_SAN_NAME = "山东-地图寻宝群";
|
||||
public static String REGION_SAN_PHONE = "581827297";
|
||||
public static String REGION_YU_NAME = "豫陕-地图寻宝群";
|
||||
public static String REGION_YU_PHONE = "344192497";
|
||||
public static String REGION_CHUAN_NAME = "川渝藏-地图寻宝";
|
||||
public static String REGION_CHUAN_PHONE = "741373102";
|
||||
public static String REGION_CHAN_NAME = "川渝藏-地图寻宝";
|
||||
public static String REGION_CHAN_PHONE = "741373102";
|
||||
public static String REGION_GAN_NAME = "甘青宁新蒙-地图寻宝群";
|
||||
public static String REGION_GAN_PHONE = "343620420";
|
||||
public static String REGION_SU_NAME = "苏皖-地图寻宝群";
|
||||
@ -199,8 +199,8 @@ public class Constant {
|
||||
public static String REGION_LU_PHONE = "590815485";
|
||||
public static String REGION_FU_NAME = "福建-地图寻宝群";
|
||||
public static String REGION_FU_PHONE = "662056094";
|
||||
public static String REGION_GUANG_NAME = "广西海南-地图寻宝群";
|
||||
public static String REGION_GUANG_PHONE = "139376252";
|
||||
public static String REGION_GANG_NAME = "广西海南-地图寻宝群";
|
||||
public static String REGION_GANG_PHONE = "139376252";
|
||||
public static String REGION_GANZ_NAME = "赣湘鄂-地图寻宝群";
|
||||
public static String REGION_GANZ_PHONE = "229231160";
|
||||
public static String REGION_YUE_NAME = "粤港澳-地图寻宝群";
|
||||
|
@ -2,23 +2,16 @@ package com.navinfo.outdoor.base;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.FragmentBackHandler;
|
||||
import com.navinfo.outdoor.util.GPSUtils;
|
||||
import com.navinfo.outdoor.util.MapManager;
|
||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||
@ -57,7 +50,7 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
super.initEvent();
|
||||
isSliding = true;
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.MAIN_BUTTON_VISIABLE;
|
||||
obtain.what = Constant.MAIN_BUTTON_VISITABLE;
|
||||
obtain.obj = View.GONE;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
|
@ -14,14 +14,12 @@ import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 关于页面的fragment
|
||||
*/
|
||||
public class AboutFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivAboutFinish;
|
||||
private RelativeLayout rlAbout;
|
||||
private RelativeLayout rlServe;
|
||||
private RelativeLayout rlPrivilege;
|
||||
|
||||
public static AboutFragment newInstance(Bundle bundle) {
|
||||
AboutFragment fragment = new AboutFragment();
|
||||
@ -41,21 +39,21 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
rlAbout = findViewById(R.id.rl_about);
|
||||
rlAbout.setOnClickListener(this::onClick);
|
||||
rlServe = findViewById(R.id.rl_serve);
|
||||
rlServe.setOnClickListener(this::onClick);
|
||||
rlPrivilege = findViewById(R.id.rl_privilege);
|
||||
rlPrivilege.setOnClickListener(this::onClick);
|
||||
ivAboutFinish =findViewById(R.id.iv_about_finish);
|
||||
ivAboutFinish.setOnClickListener(this::onClick);
|
||||
RelativeLayout rlAbout = findViewById(R.id.rl_about);
|
||||
rlAbout.setOnClickListener(this);
|
||||
RelativeLayout rlServe = findViewById(R.id.rl_serve);
|
||||
rlServe.setOnClickListener(this);
|
||||
RelativeLayout rlPrivilege = findViewById(R.id.rl_privilege);
|
||||
rlPrivilege.setOnClickListener(this);
|
||||
ImageView ivAboutFinish = findViewById(R.id.iv_about_finish);
|
||||
ivAboutFinish.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_about_finish:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.rl_about:
|
||||
Intent regardIntent = new Intent(getActivity(), RegardMapActivity.class);
|
||||
|
@ -30,12 +30,12 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发现-能力测评
|
||||
*/
|
||||
public class CapacityEvaluationFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivEvaluationTaskFinish;
|
||||
private XRecyclerView capacityEvaluationRecycler;
|
||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||
private int capacityPage = 1;
|
||||
@ -56,9 +56,9 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
ivEvaluationTaskFinish = findViewById(R.id.iv_evaluation_task_finish);
|
||||
ImageView ivEvaluationTaskFinish = findViewById(R.id.iv_evaluation_task_finish);
|
||||
capacityEvaluationRecycler = findViewById(R.id.capacity_evaluation_recycler);
|
||||
ivEvaluationTaskFinish.setOnClickListener(this::onClick);
|
||||
ivEvaluationTaskFinish.setOnClickListener(this);
|
||||
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
capacityEvaluationRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
capacityEvaluationRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
@ -122,7 +122,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
}
|
||||
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafrases");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -169,10 +169,8 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_evaluation_task_finish:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_evaluation_task_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
@ -23,13 +23,13 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 能力测评的第二个页面
|
||||
*/
|
||||
public class CapacityEvaluationFragment2 extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivCapItemFinish;
|
||||
private XRecyclerView capacityRlv;
|
||||
private CapacityItemAdapter capacityItemAdapter;
|
||||
|
||||
|
||||
@ -47,11 +47,11 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivCapItemFinish = findViewById(R.id.iv_task_capacity2_finish);
|
||||
capacityRlv = findViewById(R.id.task_capacity2_recycler);
|
||||
ivCapItemFinish.setOnClickListener(this::onClick);
|
||||
ImageView ivCapItemFinish = findViewById(R.id.iv_task_capacity2_finish);
|
||||
XRecyclerView capacityRlv = findViewById(R.id.task_capacity2_recycler);
|
||||
ivCapItemFinish.setOnClickListener(this);
|
||||
capacityRlv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
capacityRlv.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
capacityRlv.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
|
||||
capacityRlv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
capacityRlv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
capacityRlv.setPullRefreshEnabled(false);
|
||||
@ -85,7 +85,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
initNetWorks(true);
|
||||
}
|
||||
|
||||
private void initNetWorks(boolean b) {
|
||||
private void initNetWorks(boolean aBoolean) {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
@ -102,8 +102,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's"+aBoolean);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -118,10 +117,8 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_task_capacity2_finish:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_task_capacity2_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
@ -44,11 +44,8 @@ import okhttp3.MediaType;
|
||||
* 发现-能力测评条目点击进入测试页面
|
||||
*/
|
||||
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivMeasurementFinish;
|
||||
private RecyclerView capacityMeasurementRel;
|
||||
private CapacityMeasureAdapter capacityMeasureAdapter;
|
||||
private ArrayList<BolBean> bolbean;
|
||||
private Button btn;
|
||||
private ArrayList<BolBean> baleen;
|
||||
private ArrayList<ExamBean> examBeans;
|
||||
|
||||
private String examId;
|
||||
@ -68,21 +65,21 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivMeasurementFinish = (ImageView) findViewById(R.id.iv_measurement_finish);
|
||||
capacityMeasurementRel = (RecyclerView) findViewById(R.id.capacity_measurementRel);
|
||||
ivMeasurementFinish.setOnClickListener(this::onClick);
|
||||
ImageView ivMeasurementFinish = (ImageView) findViewById(R.id.iv_measurement_finish);
|
||||
RecyclerView capacityMeasurementRel = (RecyclerView) findViewById(R.id.capacity_measurementRel);
|
||||
ivMeasurementFinish.setOnClickListener(this);
|
||||
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
||||
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
||||
btn = findViewById(R.id.btn);
|
||||
btn.setOnClickListener(this::onClick);
|
||||
Button btn = findViewById(R.id.btn);
|
||||
btn.setOnClickListener(this);
|
||||
gson = new Gson();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
bolbean = new ArrayList<>();
|
||||
baleen = new ArrayList<>();
|
||||
examBeans = new ArrayList<>();
|
||||
|
||||
initNetWorks(true);
|
||||
@ -111,20 +108,20 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
|
||||
if (multiChoice != null) {
|
||||
for (int i = 0; i < multiChoice.size(); i++) {
|
||||
bolbean.add(new BolBean(multiChoice.get(i).getId(), multiChoice.get(i).getQuestion(), multiChoice.get(i).getOption(), true));
|
||||
baleen.add(new BolBean(multiChoice.get(i).getId(), multiChoice.get(i).getQuestion(), multiChoice.get(i).getOption(), true));
|
||||
examId = multiChoice.get(i).getExamId();
|
||||
}
|
||||
}
|
||||
|
||||
if (singleChoice1 != null) {
|
||||
for (int i = 0; i < singleChoice1.size(); i++) {
|
||||
bolbean.add(new BolBean(singleChoice1.get(i).getId(), singleChoice1.get(i).getQuestion(), singleChoice1.get(i).getOption(), false));
|
||||
baleen.add(new BolBean(singleChoice1.get(i).getId(), singleChoice1.get(i).getQuestion(), singleChoice1.get(i).getOption(), false));
|
||||
examId = singleChoice1.get(i).getExamId();
|
||||
}
|
||||
}
|
||||
|
||||
if (bolbean != null) {
|
||||
capacityMeasureAdapter.setMeasureList(bolbean);
|
||||
if (baleen != null) {
|
||||
capacityMeasureAdapter.setMeasureList(baleen);
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
||||
@ -148,10 +145,10 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
break;
|
||||
case R.id.btn:
|
||||
try {
|
||||
if (bolbean != null) {
|
||||
if (baleen != null) {
|
||||
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
||||
for (int i = 0; i < bolbean.size(); i++) {
|
||||
final String id = bolbean.get(i).getId();
|
||||
for (int i = 0; i < baleen.size(); i++) {
|
||||
final String id = baleen.get(i).getId();
|
||||
if (!checkedMap.containsKey(id) || checkedMap.get(id) == null || ("").equals(checkedMap.get(id))) {
|
||||
Toast.makeText(getActivity(), "有题目未填写答案,请仔细检查!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -161,13 +158,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
ExamBean examBean = new ExamBean();
|
||||
examBean.setId(entry.getKey());
|
||||
String value = entry.getValue();
|
||||
String[] valus = value.split(",");
|
||||
String[] values = value.split(",");
|
||||
List<String> answerList = new ArrayList<>();
|
||||
if (valus!=null) {
|
||||
for (int i = 0; i < valus.length; i++) {
|
||||
if (valus[i]!=null&&!valus[i].equals("")) {
|
||||
answerList.add(valus[i]);
|
||||
}
|
||||
for (String s : values) {
|
||||
if (s != null && !s.equals("")) {
|
||||
answerList.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
@ -91,17 +92,14 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private EditText editDescribe;
|
||||
private TextView tvNameContent;
|
||||
private Button btnSaveLocal;
|
||||
private PoiDatabase poiDatabase;
|
||||
private CheckBox checkBoxLife, checkBoxRight;
|
||||
private CheckBox checkBoxLife;
|
||||
private Spinner spinnerType, spinnerScutcheon, spinnerStake;
|
||||
String[] type = new String[]{"地上五层", "地上四层", "地上三层", "地上二层", "地上一层", "地下一层", "地下二层", "地下三层", "地下四层", "地下五层"};
|
||||
String[] scutcheon = new String[]{"存在", "不存在"};
|
||||
String[] stake = new String[]{"可以使用", "不可使用", "维修中", "建设中", "规划中"};
|
||||
private ArrayAdapter<String> adapterType, adapterScutcheon, adapterStake;
|
||||
private RelativeLayout rlPanorama, rlCoding, rlEquipment, rlFacility, rlUsable, rlAvailable, rlParking, rlNumber, rlScutcheon, rlDevice;
|
||||
private ImageView ivPanorama, ivCoding, ivEquipment, ivFacility, ivUsable, ivAvailable, ivParking, ivNumber, ivScutcheon, ivDevice;
|
||||
private TextView tvPanorama, tvCoding, tvEquipment, tvFacility, tvUsable, tvAvailable, tvParking, tvNumber, tvScutcheon, tvDevice;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
private int cp_floor = 1;
|
||||
private int sign_exist = 0;
|
||||
private int cp_availableState = 0;
|
||||
@ -112,7 +110,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private String station;
|
||||
private LatLng latLng;
|
||||
private File file;
|
||||
private NestedScrollView nestedScrollView;
|
||||
private Marker markerPile;
|
||||
private Point screenPilePositions;
|
||||
private ChargingPileEntity chargingPileEntity;
|
||||
@ -146,7 +143,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
||||
Log.d("TAG", "onCaress's: " + isSliding);
|
||||
}
|
||||
if (isSliding) {
|
||||
// 监听到返回按钮点击事件
|
||||
@ -177,10 +174,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
ChargingPileDao chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -289,7 +286,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
});
|
||||
spinnerType = findViewById(R.id.spinner_type);
|
||||
adapterType = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, type);
|
||||
ArrayAdapter<String> adapterType = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, type);
|
||||
adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerType.setAdapter(adapterType);
|
||||
spinnerType.setSelection(4, true);
|
||||
@ -336,7 +333,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
});
|
||||
spinnerScutcheon = findViewById(R.id.spinner_scutcheon);
|
||||
adapterScutcheon = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, scutcheon);
|
||||
ArrayAdapter<String> adapterScutcheon = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, scutcheon);
|
||||
adapterScutcheon.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerScutcheon.setAdapter(adapterScutcheon);
|
||||
spinnerScutcheon.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@ -364,7 +361,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
});
|
||||
spinnerStake = findViewById(R.id.spinner_stake);
|
||||
adapterStake = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, stake);
|
||||
ArrayAdapter<String> adapterStake = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, stake);
|
||||
adapterStake.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerStake.setAdapter(adapterStake);
|
||||
spinnerStake.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@ -395,53 +392,53 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
});
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
if (slidingPaneLayout != null) {
|
||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||
}
|
||||
rlPanorama = findViewById(R.id.rl_panorama);
|
||||
rlPanorama.setOnClickListener(this::onClick);
|
||||
rlPanorama.setOnClickListener(this);
|
||||
ivPanorama = findViewById(R.id.iv_panorama);
|
||||
tvPanorama = findViewById(R.id.tv_panorama);
|
||||
rlCoding = findViewById(R.id.rl_coding);
|
||||
rlCoding.setOnClickListener(this::onClick);
|
||||
rlCoding.setOnClickListener(this);
|
||||
ivCoding = findViewById(R.id.iv_coding);
|
||||
tvCoding = findViewById(R.id.tv_coding);
|
||||
rlEquipment = findViewById(R.id.rl_equipment);
|
||||
rlEquipment.setOnClickListener(this::onClick);
|
||||
rlEquipment.setOnClickListener(this);
|
||||
ivEquipment = findViewById(R.id.iv_equipment);
|
||||
tvEquipment = findViewById(R.id.tv_equipment);
|
||||
rlFacility = findViewById(R.id.rl_facility);
|
||||
rlFacility.setOnClickListener(this::onClick);
|
||||
rlFacility.setOnClickListener(this);
|
||||
ivFacility = findViewById(R.id.iv_facility);
|
||||
tvFacility = findViewById(R.id.tv_facility);
|
||||
rlUsable = findViewById(R.id.rl_usable);
|
||||
rlUsable.setOnClickListener(this::onClick);
|
||||
rlUsable.setOnClickListener(this);
|
||||
ivUsable = findViewById(R.id.iv_usable);
|
||||
tvUsable = findViewById(R.id.tv_usable);
|
||||
rlAvailable = findViewById(R.id.rl_available);
|
||||
rlAvailable.setOnClickListener(this::onClick);
|
||||
rlAvailable.setOnClickListener(this);
|
||||
ivAvailable = findViewById(R.id.iv_available);
|
||||
tvAvailable = findViewById(R.id.tv_available);
|
||||
rlParking = findViewById(R.id.rl_parking);
|
||||
rlParking.setOnClickListener(this::onClick);
|
||||
rlParking.setOnClickListener(this);
|
||||
ivParking = findViewById(R.id.iv_parking);
|
||||
tvParking = findViewById(R.id.tv_parking);
|
||||
rlNumber = findViewById(R.id.rl_number);
|
||||
rlNumber.setOnClickListener(this::onClick);
|
||||
rlNumber.setOnClickListener(this);
|
||||
ivNumber = findViewById(R.id.iv_number);
|
||||
tvNumber = findViewById(R.id.tv_number);
|
||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||
rlScutcheon.setOnClickListener(this::onClick);
|
||||
rlScutcheon.setOnClickListener(this);
|
||||
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
||||
tvScutcheon = findViewById(R.id.tv_scutcheon);
|
||||
rlDevice = findViewById(R.id.rl_device);
|
||||
rlDevice.setOnClickListener(this::onClick);
|
||||
rlDevice.setOnClickListener(this);
|
||||
ivDevice = findViewById(R.id.iv_device);
|
||||
tvDevice = findViewById(R.id.tv_device);
|
||||
editDescribe = findViewById(R.id.edit_describe);
|
||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||
btnSaveLocal.setOnClickListener(this::onClick);
|
||||
btnSaveLocal.setOnClickListener(this);
|
||||
//展示数据
|
||||
initShowPileSharePre();
|
||||
onLongDelPic();
|
||||
@ -452,7 +449,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivAvailable.setImageDrawable(null);
|
||||
@ -466,7 +463,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivUsable.setImageDrawable(null);
|
||||
@ -480,7 +477,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivScutcheon.setImageDrawable(null);
|
||||
@ -494,7 +491,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivParking.setImageDrawable(null);
|
||||
@ -508,7 +505,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivPanorama.setImageDrawable(null);
|
||||
@ -522,7 +519,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivNumber.setImageDrawable(null);
|
||||
@ -536,7 +533,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivFacility.setImageDrawable(null);
|
||||
@ -550,7 +547,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivEquipment.setImageDrawable(null);
|
||||
@ -564,7 +561,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivDevice.setImageDrawable(null);
|
||||
@ -578,7 +575,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivCoding.setImageDrawable(null);
|
||||
@ -591,6 +588,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
|
||||
private void initShowPileSharePre() {
|
||||
assert getArguments() != null;
|
||||
station = getArguments().getString("station");
|
||||
if (station != null) {
|
||||
PoiEntity showPoiEntity = new Gson().fromJson(station, PoiEntity.class);
|
||||
@ -601,7 +599,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
if (chargingPileEntity != null) {
|
||||
String name = chargingPileEntity.getName();//名称
|
||||
if (name != null) {
|
||||
tvNameContent.setText(name + "");
|
||||
tvNameContent.setText(name);
|
||||
}
|
||||
String p = chargingPileEntity.getP();
|
||||
if (p != null) {
|
||||
@ -637,16 +635,16 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
String cp_openType = chargingPileEntity.getCp_openType();
|
||||
if (cp_openType!=null&&!cp_openType.equals("")){
|
||||
String[] split = cp_openType.split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
if (Integer.valueOf(split[i])==1){
|
||||
for (String s : split) {
|
||||
if (Integer.parseInt(s) == 1) {
|
||||
checkButton1.setChecked(true);
|
||||
}else if (Integer.valueOf(split[i])==2){
|
||||
} else if (Integer.parseInt(s) == 2) {
|
||||
checkButton2.setChecked(true);
|
||||
}else if (Integer.valueOf(split[i])==3){
|
||||
} else if (Integer.parseInt(s) == 3) {
|
||||
checkButton3.setChecked(true);
|
||||
}else if (Integer.valueOf(split[i])==4){
|
||||
} else if (Integer.parseInt(s) == 4) {
|
||||
checkButton4.setChecked(true);
|
||||
}else if (Integer.valueOf(split[i])==5){
|
||||
} else if (Integer.parseInt(s) == 5) {
|
||||
checkButton5.setChecked(true);
|
||||
}
|
||||
}
|
||||
@ -684,10 +682,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
String photo = chargingPileEntity.getPhotos().get(i);
|
||||
String[] split = photo.split("/");
|
||||
if (split[split.length - 1].startsWith("a")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivPanorama);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPanorama);
|
||||
tvPanorama.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("b")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivCoding);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCoding);
|
||||
tvCoding.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("c")) {
|
||||
cList.add(photo);
|
||||
@ -750,17 +748,17 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void setCList(ArrayList<String> list) {
|
||||
switch (list.size()) {
|
||||
case 1:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivEquipment);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivEquipment);
|
||||
tvEquipment.setTag(list.get(0));
|
||||
break;
|
||||
case 2:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivEquipment);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivEquipment);
|
||||
tvEquipment.setTag(list.get(0));
|
||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||
tvFacility.setTag(list.get(1));
|
||||
break;
|
||||
case 3:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivEquipment);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivEquipment);
|
||||
tvEquipment.setTag(list.get(0));
|
||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||
tvFacility.setTag(list.get(1));
|
||||
@ -768,7 +766,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvScutcheon.setTag(list.get(2));
|
||||
break;
|
||||
case 4:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivEquipment);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivEquipment);
|
||||
tvEquipment.setTag(list.get(0));
|
||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||
tvFacility.setTag(list.get(1));
|
||||
@ -783,11 +781,11 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void setDList(ArrayList<String> list) {
|
||||
switch (list.size()) {
|
||||
case 1:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivUsable);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivUsable);
|
||||
tvUsable.setTag(list.get(0));
|
||||
break;
|
||||
case 2:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivUsable);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivUsable);
|
||||
tvUsable.setTag(list.get(0));
|
||||
Glide.with(getActivity()).load(list.get(1)).into(ivAvailable);
|
||||
tvAvailable.setTag(list.get(1));
|
||||
@ -798,11 +796,11 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void setEList(ArrayList<String> list) {
|
||||
switch (list.size()) {
|
||||
case 1:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivParking);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivParking);
|
||||
tvParking.setTag(list.get(0));
|
||||
break;
|
||||
case 2:
|
||||
Glide.with(getActivity()).load(list.get(0)).into(ivParking);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(list.get(0)).into(ivParking);
|
||||
tvParking.setTag(list.get(0));
|
||||
Glide.with(getActivity()).load(list.get(1)).into(ivNumber);
|
||||
tvNumber.setTag(list.get(1));
|
||||
@ -870,7 +868,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
@Override
|
||||
public void run() {
|
||||
long[] result = InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (result[0] != 0) {
|
||||
@ -906,7 +904,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
if (never) {
|
||||
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予权限", Toast.LENGTH_SHORT).show();
|
||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||
XXPermissions.startPermissionActivity(getActivity(), permissions);
|
||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1042,7 +1040,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
||||
//一个以该参数命名的.xml文件。第二个mode表示创建的模式,通过查看
|
||||
//方法注释得知,建议以0或者MODE_PRIVATE为默认值。
|
||||
SharedPreferences poi = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
|
||||
SharedPreferences poi = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
|
||||
//获取Editor对象
|
||||
SharedPreferences.Editor edit = poi.edit();
|
||||
//根据要保存的数据的类型,调用对应的put方法,
|
||||
@ -1054,7 +1052,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
edit.putString("poiEntity", station);
|
||||
}
|
||||
//提交新值。必须执行,否则前面的操作都无效。
|
||||
edit.commit();
|
||||
edit.apply();
|
||||
Log.d("TAG", "initPileSharePre: " + newChargingPileEntity);
|
||||
}
|
||||
|
||||
@ -1192,7 +1190,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
chargingPileEntity.setP(encode);
|
||||
}
|
||||
String name = tvNameContent.getText().toString().trim();//名称
|
||||
if (name != null && !name.equals("")) {
|
||||
if (!name.equals("")) {
|
||||
chargingPileEntity.setName(name);
|
||||
}
|
||||
if (cp_floor != 0) {
|
||||
@ -1242,7 +1240,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
chargingPileEntity.setSign_exist(sign_exist);
|
||||
chargingPileEntity.setCp_availableState(cp_availableState);
|
||||
String describe = editDescribe.getText().toString().trim();
|
||||
if (describe != null && !describe.equals("")) {
|
||||
if (!describe.equals("")) {
|
||||
chargingPileEntity.setMemo(describe);
|
||||
}
|
||||
if (pid != null) {
|
||||
@ -1256,7 +1254,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
openType.append(buffer3);
|
||||
openType.append(buffer4);
|
||||
openType.append(buffer5);
|
||||
if (openType != null && !"".equals(openType) && openType.length() > 0) {
|
||||
if (openType != null && !"".contentEquals(openType) && openType.length() > 0) {
|
||||
String charAt = openType.deleteCharAt(openType.length() - 1).toString();
|
||||
chargingPileEntity.setCp_openType(charAt);
|
||||
} else {
|
||||
|
@ -105,17 +105,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal, btnUploading;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private CheckBox checkBoxLife,checkBoxRight;
|
||||
private CheckBox checkBoxLife;
|
||||
private Spinner spinnerType;
|
||||
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||
|
||||
private int existence = 0;
|
||||
private ArrayAdapter<String> adapter;
|
||||
private LinearLayout linearChargingPile;
|
||||
private RecyclerView recyclerStation;
|
||||
private ChargingPileAdapter chargingPileAdapter;
|
||||
private int station_type = 0;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
@ -166,7 +163,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
||||
Log.d("TAG", "onCaresses: " + isSliding);
|
||||
}
|
||||
if (isSliding) {
|
||||
// 监听到返回按钮点击事件
|
||||
@ -207,11 +204,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
removablesLocality=new ArrayList<>();
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
@ -220,15 +217,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
//添加桩
|
||||
linearChargingPile = findViewById(R.id.linear_charging_pile);
|
||||
linearChargingPile.setOnClickListener(this::onClick);
|
||||
linearChargingPile.setOnClickListener(this);
|
||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||
btnSaveLocal.setOnClickListener(this::onClick);
|
||||
btnSaveLocal.setOnClickListener(this);
|
||||
btnUploading = findViewById(R.id.btn_uploading);
|
||||
btnUploading.setOnClickListener(this::onClick);
|
||||
btnUploading.setOnClickListener(this);
|
||||
editNameContent = findViewById(R.id.tv_name_content);
|
||||
editSiteContent = findViewById(R.id.tv_site_content);
|
||||
tvExamine = findViewById(R.id.tv_station_examine);
|
||||
tvExamine.setOnClickListener(this::onClick);
|
||||
tvExamine.setOnClickListener(this);
|
||||
editDescribe = findViewById(R.id.edit_describe);
|
||||
ivPanorama = findViewById(R.id.iv_panorama);
|
||||
ivName = findViewById(R.id.iv_name);
|
||||
@ -237,16 +234,16 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
ivElse = findViewById(R.id.iv_else);
|
||||
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
||||
rlPanorama = findViewById(R.id.rl_panorama);
|
||||
rlPanorama.setOnClickListener(this::onClick);
|
||||
rlPanorama.setOnClickListener(this);
|
||||
rlName = findViewById(R.id.rl_name);
|
||||
rlName.setOnClickListener(this::onClick);
|
||||
rlName.setOnClickListener(this);
|
||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
||||
rlInternalPhotos.setOnClickListener(this);
|
||||
rlNull = findViewById(R.id.rl_null);
|
||||
rlElse = findViewById(R.id.rl_else);
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlElse.setOnClickListener(this);
|
||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||
rlScutcheon.setOnClickListener(this::onClick);
|
||||
rlScutcheon.setOnClickListener(this);
|
||||
tvPanorama = findViewById(R.id.tv_panorama);
|
||||
tvElse = findViewById(R.id.tv_else);
|
||||
tvInternal = findViewById(R.id.tv_internal);
|
||||
@ -257,7 +254,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||
poiRecycleAdapter = new PoiRecycleAdapter(getContext());
|
||||
recyclerPhone.setAdapter(poiRecycleAdapter);*/
|
||||
recyclerStation = findViewById(R.id.recycler_station);
|
||||
RecyclerView recyclerStation = findViewById(R.id.recycler_station);
|
||||
recyclerStation.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||
chargingPileAdapter = new ChargingPileAdapter(getContext());
|
||||
recyclerStation.setAdapter(chargingPileAdapter);
|
||||
@ -315,7 +312,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
});
|
||||
checkBoxRight.setVisibility(View.GONE);
|
||||
spinnerType = findViewById(R.id.spinner_type);
|
||||
adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, ctype);
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, ctype);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerType.setAdapter(adapter);
|
||||
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@ -456,7 +453,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
|
||||
private void initShowPoi() {
|
||||
// 添加信息:
|
||||
assert getArguments() != null;
|
||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||
assert showPoiEntity != null;
|
||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||
tvExamine.setVisibility(View.GONE);
|
||||
} else {
|
||||
@ -518,24 +517,20 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split != null && split.length > 1) {
|
||||
if (split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
} else {
|
||||
if (phones[i] != null) {
|
||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split != null && split.length > 1) {
|
||||
if (split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||
@ -735,6 +730,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
currentChargingPileList.add(chargingPileEntity);
|
||||
} else {
|
||||
assert currentChargingPileList != null;
|
||||
currentChargingPileList.add(chargingPileEntity);
|
||||
}
|
||||
chargingPileAdapter.notifyDataSetChanged();
|
||||
@ -774,7 +770,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
obtain.obj = false;
|
||||
EventBus.getDefault().post(obtain);
|
||||
String name = editNameContent.getText().toString().trim();//名称
|
||||
if (name == null || name.equals("")) {
|
||||
if (name.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入充电站 名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -938,6 +934,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(chargingPileFileList).postFileSynchronization();
|
||||
if(execute!=null){
|
||||
assert execute.body() != null;
|
||||
String pileUpLoadResultStr = execute.body().string();
|
||||
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||
if (uploadBeanResult != null) {
|
||||
@ -1322,21 +1319,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivPanorama);
|
||||
tvPanorama.setTag(photoPath);
|
||||
photoFile = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||
if (photoFile == null || !photoFile.exists()) {
|
||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||
@ -1345,21 +1327,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivName);
|
||||
tvNamePic.setTag(photoPath);
|
||||
photoFile = null;
|
||||
/*int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 102);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||
if (photoFile == null || !photoFile.exists()) {
|
||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||
@ -1368,21 +1335,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivInternal);
|
||||
tvInternal.setTag(photoPath);
|
||||
photoFile = null;
|
||||
/*int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 103);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||
if (photoFile == null || !photoFile.exists()) {
|
||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||
@ -1391,21 +1343,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivElse);
|
||||
tvElse.setTag(photoPath);
|
||||
photoFile = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 104);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||
if (photoFile == null || !photoFile.exists()) {
|
||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||
@ -1414,22 +1351,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivScutcheon);
|
||||
tvScutcheon.setTag(photoPath);
|
||||
photoFile = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 105);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1456,44 +1377,18 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
.params(httpParams).getSynchronization();
|
||||
if(execute!=null){
|
||||
String responseBodyStr = execute.body().string();
|
||||
if (responseBodyStr != null) {
|
||||
Gson gson = new Gson();
|
||||
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
||||
if (chargingPileSaveBean.getCode() != 200) {
|
||||
return;
|
||||
}
|
||||
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity); // 更新当前充电桩的bodyId
|
||||
Gson gson = new Gson();
|
||||
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
||||
if (chargingPileSaveBean.getCode() != 200) {
|
||||
return;
|
||||
}
|
||||
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity); // 更新当前充电桩的bodyId
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// OkGoBuilder.getInstance()
|
||||
// .Builder(getActivity())
|
||||
// .url(HttpInterface.SUBMIT_CSTASK)
|
||||
// .method(OkGoBuilder.GET)
|
||||
// .cls(ChargingPileSaveBean.class)
|
||||
// .params(httpParams)
|
||||
// .callback(new Callback<ChargingPileSaveBean>() {
|
||||
// @Override
|
||||
// public void onSuccess(ChargingPileSaveBean chargingPileSaveBean, int id) {
|
||||
// dismissLoadingDialog();
|
||||
// chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||
// Toast.makeText(getActivity(), "服务保存成功", Toast.LENGTH_SHORT).show();
|
||||
// // 更新数据状态
|
||||
// PoiDatabase.getInstance(getActivity()).getChargingPileDao().updateChargingPileEntity(chargingPileEntity);
|
||||
// Log.d("TAG", "onSuccess: " + chargingPileSaveBean.getBody());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e, int id) {
|
||||
// dismissLoadingDialog();
|
||||
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
// Log.d("TAG", "onError: " + e.getMessage());
|
||||
// }
|
||||
// }).build();
|
||||
}
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
@ -1570,11 +1465,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
List<Info> infoPhoto = new ArrayList<>();
|
||||
String name = editNameContent.getText().toString().trim();//名称
|
||||
if (name != null && !name.equals("")) {
|
||||
if (!name.equals("")) {
|
||||
poiEntity.setName(name);
|
||||
}
|
||||
String site = editSiteContent.getText().toString().trim();
|
||||
if (site != null && !site.equals("")) {
|
||||
if (!site.equals("")) {
|
||||
poiEntity.setAddress(site);
|
||||
}
|
||||
if (latLng != null) {
|
||||
@ -1584,7 +1479,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
poiEntity.setY(String.valueOf(latLng.latitude));
|
||||
}
|
||||
String describe = editDescribe.getText().toString().trim();
|
||||
if (describe != null && !describe.equals("")) {
|
||||
if (!describe.equals("")) {
|
||||
poiEntity.setMemo(describe);
|
||||
}
|
||||
boolean phoneBean = contactView.getPhoneBean();
|
||||
|
@ -14,34 +14,6 @@ import com.navinfo.outdoor.base.BaseFragment;
|
||||
*/
|
||||
public class ContactFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivContact;
|
||||
private TextView tvJingName;
|
||||
private TextView tvJingPhone;
|
||||
private TextView tvHeiName;
|
||||
private TextView tvHeiPhone;
|
||||
private TextView tvShanName;
|
||||
private TextView tvShanPhone;
|
||||
private TextView tvYuName;
|
||||
private TextView tvYuPhone;
|
||||
private TextView tvChuanName;
|
||||
private TextView tvChuanPhone;
|
||||
private TextView tvGanName;
|
||||
private TextView tvGanPhone;
|
||||
private TextView tvSuName;
|
||||
private TextView tvSuPhone;
|
||||
private TextView tvLuName;
|
||||
private TextView tvLuPhone;
|
||||
private TextView tvFuName;
|
||||
private TextView tvFuPhone;
|
||||
private TextView tvGuangName;
|
||||
private TextView tvGuangPhone;
|
||||
private TextView tvGanzName;
|
||||
private TextView tvGanzPhone;
|
||||
private TextView tvYueName;
|
||||
private TextView tvYuePhone;
|
||||
private TextView tvYunName;
|
||||
private TextView tvYunPhone;
|
||||
|
||||
|
||||
public static ContactFragment newInstance(Bundle bundle) {
|
||||
ContactFragment fragment = new ContactFragment();
|
||||
@ -62,70 +34,68 @@ public class ContactFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivContact = findViewById(R.id.iv_contact);
|
||||
ImageView ivContact = findViewById(R.id.iv_contact);
|
||||
ivContact.setOnClickListener(this);
|
||||
|
||||
tvJingName = (TextView) findViewById(R.id.tv_jingName);
|
||||
tvJingName.setText(Constant.REGION_JING_NAME);
|
||||
tvJingPhone = (TextView) findViewById(R.id.tv_jingPhone);
|
||||
tvJingPhone.setText(Constant.REGION_JING_PHONE);
|
||||
tvHeiName = (TextView) findViewById(R.id.tv_heiName);
|
||||
TextView tvJigName = (TextView) findViewById(R.id.tv_jingName);
|
||||
tvJigName.setText(Constant.REGION_JIG_NAME);
|
||||
TextView tvJigPhone = (TextView) findViewById(R.id.tv_jingPhone);
|
||||
tvJigPhone.setText(Constant.REGION_JIG_PHONE);
|
||||
TextView tvHeiName = (TextView) findViewById(R.id.tv_heiName);
|
||||
tvHeiName.setText(Constant.REGION_HEI_NAME);
|
||||
tvHeiPhone = (TextView) findViewById(R.id.tv_heiPhone);
|
||||
TextView tvHeiPhone = (TextView) findViewById(R.id.tv_heiPhone);
|
||||
tvHeiPhone.setText(Constant.REGION_HEI_PHONE);
|
||||
tvShanName = (TextView) findViewById(R.id.tv_shanName);
|
||||
tvShanName.setText(Constant.REGION_SHAN_NAME);
|
||||
tvShanPhone = (TextView) findViewById(R.id.tv_shanPhone);
|
||||
tvShanPhone.setText(Constant.REGION_SHAN_PHONE);
|
||||
tvYuName = (TextView) findViewById(R.id.tv_yuName);
|
||||
TextView tvSanName = (TextView) findViewById(R.id.tv_shanName);
|
||||
tvSanName.setText(Constant.REGION_SAN_NAME);
|
||||
TextView tvSanPhone = (TextView) findViewById(R.id.tv_shanPhone);
|
||||
tvSanPhone.setText(Constant.REGION_SAN_PHONE);
|
||||
TextView tvYuName = (TextView) findViewById(R.id.tv_yuName);
|
||||
tvYuName.setText(Constant.REGION_YU_NAME);
|
||||
tvYuPhone = (TextView) findViewById(R.id.tv_yuPhone);
|
||||
TextView tvYuPhone = (TextView) findViewById(R.id.tv_yuPhone);
|
||||
tvYuPhone.setText(Constant.REGION_YU_PHONE);
|
||||
tvChuanName = (TextView) findViewById(R.id.tv_chuanName);
|
||||
tvChuanName.setText(Constant.REGION_CHUAN_NAME);
|
||||
tvChuanPhone = (TextView) findViewById(R.id.tv_chuanPhone);
|
||||
tvChuanPhone.setText(Constant.REGION_CHUAN_PHONE);
|
||||
tvGanName = (TextView) findViewById(R.id.tv_ganName);
|
||||
TextView tvChanName = (TextView) findViewById(R.id.tv_chuanName);
|
||||
tvChanName.setText(Constant.REGION_CHAN_NAME);
|
||||
TextView tvChanPhone = (TextView) findViewById(R.id.tv_chuanPhone);
|
||||
tvChanPhone.setText(Constant.REGION_CHAN_PHONE);
|
||||
TextView tvGanName = (TextView) findViewById(R.id.tv_ganName);
|
||||
tvGanName.setText(Constant.REGION_GAN_NAME);
|
||||
tvGanPhone = (TextView) findViewById(R.id.tv_ganPhone);
|
||||
TextView tvGanPhone = (TextView) findViewById(R.id.tv_ganPhone);
|
||||
tvGanPhone.setText(Constant.REGION_GAN_PHONE);
|
||||
tvSuName = (TextView) findViewById(R.id.tv_suName);
|
||||
TextView tvSuName = (TextView) findViewById(R.id.tv_suName);
|
||||
tvSuName.setText(Constant.REGION_SU_NAME);
|
||||
tvSuPhone = (TextView) findViewById(R.id.tv_suPhone);
|
||||
TextView tvSuPhone = (TextView) findViewById(R.id.tv_suPhone);
|
||||
tvSuPhone.setText(Constant.REGION_SU_PHONE);
|
||||
tvLuName = (TextView) findViewById(R.id.tv_luName);
|
||||
TextView tvLuName = (TextView) findViewById(R.id.tv_luName);
|
||||
tvLuName.setText(Constant.REGION_LU_NAME);
|
||||
tvLuPhone = (TextView) findViewById(R.id.tv_luPhone);
|
||||
TextView tvLuPhone = (TextView) findViewById(R.id.tv_luPhone);
|
||||
tvLuPhone.setText(Constant.REGION_LU_PHONE);
|
||||
tvFuName = (TextView) findViewById(R.id.tv_fuName);
|
||||
TextView tvFuName = (TextView) findViewById(R.id.tv_fuName);
|
||||
tvFuName.setText(Constant.REGION_FU_NAME);
|
||||
tvFuPhone = (TextView) findViewById(R.id.tv_fuPhone);
|
||||
TextView tvFuPhone = (TextView) findViewById(R.id.tv_fuPhone);
|
||||
tvFuPhone.setText(Constant.REGION_FU_PHONE);
|
||||
tvGuangName = (TextView) findViewById(R.id.tv_guangName);
|
||||
tvGuangName.setText(Constant.REGION_GUANG_NAME);
|
||||
tvGuangPhone = (TextView) findViewById(R.id.tv_guangPhone);
|
||||
tvGuangPhone.setText(Constant.REGION_GUANG_PHONE);
|
||||
tvGanzName = (TextView) findViewById(R.id.tv_ganzName);
|
||||
tvGanzName.setText(Constant.REGION_GANZ_NAME);
|
||||
tvGanzPhone = (TextView) findViewById(R.id.tv_ganzPhone);
|
||||
tvGanzPhone.setText(Constant.REGION_GANZ_PHONE);
|
||||
tvYueName = (TextView) findViewById(R.id.tv_yueName);
|
||||
TextView tvGangName = (TextView) findViewById(R.id.tv_guangName);
|
||||
tvGangName.setText(Constant.REGION_GANG_NAME);
|
||||
TextView tvGangPhone = (TextView) findViewById(R.id.tv_guangPhone);
|
||||
tvGangPhone.setText(Constant.REGION_GANG_PHONE);
|
||||
TextView tvGabeName = (TextView) findViewById(R.id.tv_ganzName);
|
||||
tvGabeName.setText(Constant.REGION_GANZ_NAME);
|
||||
TextView tvGabePhone = (TextView) findViewById(R.id.tv_ganzPhone);
|
||||
tvGabePhone.setText(Constant.REGION_GANZ_PHONE);
|
||||
TextView tvYueName = (TextView) findViewById(R.id.tv_yueName);
|
||||
tvYueName.setText(Constant.REGION_YUE_NAME);
|
||||
tvYuePhone = (TextView) findViewById(R.id.tv_yuePhone);
|
||||
TextView tvYuePhone = (TextView) findViewById(R.id.tv_yuePhone);
|
||||
tvYuePhone.setText(Constant.REGION_YUE_PHONE);
|
||||
tvYunName = (TextView) findViewById(R.id.tv_yunName);
|
||||
TextView tvYunName = (TextView) findViewById(R.id.tv_yunName);
|
||||
tvYunName.setText(Constant.REGION_YUN_NAME);
|
||||
tvYunPhone = (TextView) findViewById(R.id.tv_yunPhone);
|
||||
TextView tvYunPhone = (TextView) findViewById(R.id.tv_yunPhone);
|
||||
tvYunPhone.setText(Constant.REGION_YUN_PHONE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_contact:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_contact) {
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ import java.util.List;
|
||||
*/
|
||||
public class EventPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivEventTask;
|
||||
private XRecyclerView eventRecycler;
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
||||
private EventPrefectureAdapter eventPrefectureAdapter;
|
||||
@ -132,7 +131,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivEventTask = findViewById(R.id.iv_event_task);
|
||||
ImageView ivEventTask = findViewById(R.id.iv_event_task);
|
||||
ivEventTask.setOnClickListener(this::onClick);
|
||||
eventRecycler = findViewById(R.id.event_recycler);
|
||||
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@ -167,10 +166,8 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_event_task:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_event_task) {
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,18 +3,14 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.slidingpanelayout.widget.SlidingPaneLayout;
|
||||
|
||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
@ -24,14 +20,12 @@ import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.FilterAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
@ -39,7 +33,6 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -180,7 +173,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
poiEntity.setTelPhone(list.get(i).getTelephone() + "");
|
||||
poiEntity.setPrecision(list.get(i).getPrice()+"");
|
||||
poiEntity.setDist(list.get(i).getDist()+"");
|
||||
poiEntity.setType(Integer.valueOf(list.get(i).getType()));
|
||||
poiEntity.setType(list.get(i).getType());
|
||||
String geo = list.get(i).getGeo();
|
||||
poiEntity.setGeoWkt(geo);
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
@ -213,21 +206,21 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
poiEntities = new ArrayList<>();
|
||||
clNumber = findViewById(R.id.cl_number);
|
||||
clNumber.setOnClickListener(this::onClick);
|
||||
clNumber.setOnClickListener(this);
|
||||
tvNumber = findViewById(R.id.tv_number);
|
||||
tvNumber.setText(Constant.NUMBER + "");
|
||||
clPhotograph = findViewById(R.id.cl_photograph);
|
||||
clPhotograph.setOnClickListener(this::onClick);
|
||||
clPhotograph.setOnClickListener(this);
|
||||
tvPhotograph = findViewById(R.id.tv_photograph);
|
||||
if (Constant.LIMIT_TTPE == -1) {//"全部", "普通任务", "专属任务"
|
||||
if (Constant.LIMIT_TYPE == -1) {//"全部", "普通任务", "专属任务"
|
||||
tvPhotograph.setText("全部");
|
||||
} else if (Constant.LIMIT_TTPE == 0) {
|
||||
} else if (Constant.LIMIT_TYPE == 0) {
|
||||
tvPhotograph.setText("普通任务");
|
||||
} else if (Constant.LIMIT_TTPE == 1) {
|
||||
} else if (Constant.LIMIT_TYPE == 1) {
|
||||
tvPhotograph.setText("专属任务");
|
||||
}
|
||||
clExclusive = findViewById(R.id.cl_exclusive);
|
||||
clExclusive.setOnClickListener(this::onClick);
|
||||
clExclusive.setOnClickListener(this);
|
||||
tvExclusive = findViewById(R.id.tv_exclusive);
|
||||
if (Constant.TASK_TYPE == -1) {//"全部", "poi", "充电站", "POI录像", "道路录像", "其他", "面状任务"
|
||||
tvExclusive.setText("全部");
|
||||
@ -245,22 +238,22 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
tvExclusive.setText("面状任务");
|
||||
}
|
||||
clType = findViewById(R.id.cl_type);
|
||||
clType.setOnClickListener(this::onClick);
|
||||
clType.setOnClickListener(this);
|
||||
tvType = findViewById(R.id.tv_type);
|
||||
if (Constant.TASK_STASTUS == -1) {//"未领取", "已领取", "未保存", "已保存"
|
||||
if (Constant.TASK_STARTUP == -1) {//"未领取", "已领取", "未保存", "已保存"
|
||||
tvType.setText("全部");
|
||||
} else if (Constant.TASK_STASTUS == 0) {
|
||||
} else if (Constant.TASK_STARTUP == 0) {
|
||||
tvType.setText("未领取");
|
||||
} else if (Constant.TASK_STASTUS == 1) {
|
||||
} else if (Constant.TASK_STARTUP == 1) {
|
||||
tvType.setText("已领取");
|
||||
}/* else if (Constant.TASK_STASTUS == 2) {
|
||||
}/* else if (Constant.TASK_STATUS == 2) {
|
||||
tvType.setText("未保存");
|
||||
} else if (Constant.TASK_STASTUS == 3) {
|
||||
} else if (Constant.TASK_STATUS == 3) {
|
||||
tvType.setText("已保存");
|
||||
}*/
|
||||
|
||||
btnFilter = findViewById(R.id.btn_filter);
|
||||
btnFilter.setOnClickListener(this::onClick);
|
||||
btnFilter.setOnClickListener(this);
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
recyclerFilter = findViewById(R.id.recycler_filter);
|
||||
if (slidingPaneLayout!=null) {
|
||||
@ -360,13 +353,13 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
tvPhotograph.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
Constant.LIMIT_TTPE = -1;
|
||||
Constant.LIMIT_TYPE = -1;
|
||||
break;
|
||||
case 1:
|
||||
Constant.LIMIT_TTPE = 0;
|
||||
Constant.LIMIT_TYPE = 0;
|
||||
break;
|
||||
case 2:
|
||||
Constant.LIMIT_TTPE = 1;
|
||||
Constant.LIMIT_TYPE = 1;
|
||||
break;
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
@ -378,7 +371,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
break;
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
1 "POI"
|
||||
2 "充电站"
|
||||
3 "POI录像"
|
||||
@ -430,19 +423,19 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
tvType.setText(text);
|
||||
switch (index) {
|
||||
case 0:
|
||||
Constant.TASK_STASTUS = -1;
|
||||
Constant.TASK_STARTUP = -1;
|
||||
break;
|
||||
case 1:
|
||||
Constant.TASK_STASTUS = 0;
|
||||
Constant.TASK_STARTUP = 0;
|
||||
break;
|
||||
case 2:
|
||||
Constant.TASK_STASTUS = 1;
|
||||
Constant.TASK_STARTUP = 1;
|
||||
break;
|
||||
/* case 3:
|
||||
Constant.TASK_STASTUS = 2;
|
||||
Constant.TASK_STATUS = 2;
|
||||
break;
|
||||
case 4:
|
||||
Constant.TASK_STASTUS = 3;
|
||||
Constant.TASK_STATUS = 3;
|
||||
break;*/
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
|
@ -17,11 +17,6 @@ import com.navinfo.outdoor.base.BaseFragment;
|
||||
*/
|
||||
public class FindFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private LinearLayout linear_task_prefecture;//任务专区
|
||||
private LinearLayout linear_task_explain;//任务说明
|
||||
private LinearLayout linearEnd;
|
||||
private LinearLayout linear_event_prefecture;
|
||||
|
||||
public static FindFragment newInstance(Bundle bundle) {
|
||||
FindFragment fragment = new FindFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -34,14 +29,16 @@ public class FindFragment extends BaseFragment implements View.OnClickListener{
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
linear_event_prefecture = findViewById(R.id.linear_event_prefecture);
|
||||
linear_event_prefecture.setOnClickListener(this::onClick);
|
||||
linear_task_prefecture =findViewById(R.id.linear_task_prefecture);
|
||||
linear_task_prefecture.setOnClickListener(this::onClick);
|
||||
linear_task_explain =findViewById(R.id.linear_task_explain);
|
||||
linear_task_explain.setOnClickListener(this::onClick);
|
||||
linearEnd = findViewById(R.id.linear_end);
|
||||
linearEnd.setOnClickListener(this::onClick);
|
||||
LinearLayout linear_event_prefecture = findViewById(R.id.linear_event_prefecture);
|
||||
linear_event_prefecture.setOnClickListener(this);
|
||||
//任务专区
|
||||
LinearLayout linear_task_prefecture = findViewById(R.id.linear_task_prefecture);
|
||||
linear_task_prefecture.setOnClickListener(this);
|
||||
//任务说明
|
||||
LinearLayout linear_task_explain = findViewById(R.id.linear_task_explain);
|
||||
linear_task_explain.setOnClickListener(this);
|
||||
LinearLayout linearEnd = findViewById(R.id.linear_end);
|
||||
linearEnd.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,14 +27,14 @@ import com.navinfo.outdoor.util.RegexUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 忘记密码页面
|
||||
*/
|
||||
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivFinish;
|
||||
private TextView forgetPawGetNote;
|
||||
private EditText etForgetPawPhone, etForgetPawNote, etForgetPawPaw, etForgetPawConfirmPaw;
|
||||
private Button btnForgetPaw;
|
||||
private String sessionId;
|
||||
private CountDownTimer timer;
|
||||
|
||||
@ -52,7 +52,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivFinish = findViewById(R.id.iv_forgePaw_finish);
|
||||
ImageView ivFinish = findViewById(R.id.iv_forgePaw_finish);
|
||||
ivFinish.setOnClickListener(this);
|
||||
etForgetPawPhone = findViewById(R.id.et_forgetPaw_phone);
|
||||
etForgetPawNote = findViewById(R.id.et_forgetPaw_note);
|
||||
@ -60,15 +60,15 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
etForgetPawConfirmPaw = findViewById(R.id.et_forgetPaw_confirm_paw);
|
||||
forgetPawGetNote = findViewById(R.id.forgetPaw_get_note);
|
||||
forgetPawGetNote.setOnClickListener(this);
|
||||
btnForgetPaw = findViewById(R.id.btn_forgetPaw);
|
||||
btnForgetPaw.setOnClickListener(this::onClick);
|
||||
Button btnForgetPaw = findViewById(R.id.btn_forgetPaw);
|
||||
btnForgetPaw.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_forgePaw_finish:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.forgetPaw_get_note:
|
||||
if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())){
|
||||
@ -94,14 +94,14 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("mobile", mobile);
|
||||
}
|
||||
String code = etForgetPawNote.getText().toString().trim();
|
||||
if (code == null || code.equals("")) {
|
||||
if (code.equals("")) {
|
||||
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
httpParams.put("code", code);
|
||||
}
|
||||
String password = etForgetPawPaw.getText().toString().trim();
|
||||
if (password == null || password.equals("")) {
|
||||
if (password.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
@ -112,7 +112,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
String conFirmPaw = etForgetPawConfirmPaw.getText().toString().trim();
|
||||
if (conFirmPaw == null || conFirmPaw.equals("")) {
|
||||
if (conFirmPaw.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -146,7 +146,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what=Constant.REGISTER_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
@ -183,7 +183,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
private void initGetNote() {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
String mobile = etForgetPawPhone.getText().toString().trim();
|
||||
if (mobile == null || mobile.equals("")) {
|
||||
if (mobile.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
|
@ -48,7 +48,6 @@ import java.util.List;
|
||||
*/
|
||||
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
||||
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
||||
private TextView tvTitle, tvMoney, tvTime, tvDistance, tvDescribe;
|
||||
private PoiEntity poiEntity;
|
||||
private PoiDao poiDao;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
@ -75,6 +74,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
assert getArguments() != null;
|
||||
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.GATHER_GET_RETURN;
|
||||
@ -102,19 +102,21 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||
tvTitle = findViewById(R.id.tv_title);
|
||||
tvMoney = findViewById(R.id.tv_money);
|
||||
tvTime = findViewById(R.id.tv_time);
|
||||
tvDistance = findViewById(R.id.tv_distance);
|
||||
tvDescribe = findViewById(R.id.tv_describe);
|
||||
TextView tvTitle = findViewById(R.id.tv_title);
|
||||
TextView tvMoney = findViewById(R.id.tv_money);
|
||||
TextView tvTime = findViewById(R.id.tv_time);
|
||||
TextView tvDistance = findViewById(R.id.tv_distance);
|
||||
TextView tvDescribe = findViewById(R.id.tv_describe);
|
||||
Button btnDelete = findViewById(R.id.btn_delete);
|
||||
btnDelete.setOnClickListener(this);
|
||||
btnCancelGet = findViewById(R.id.btn_cancel_get);//取消领取
|
||||
btnCancelGet.setOnClickListener(this::onClick);
|
||||
btnCancelGet.setOnClickListener(this);
|
||||
btnGetTask = findViewById(R.id.btn_get_task);//领取任务
|
||||
btnGetTask.setOnClickListener(this::onClick);
|
||||
btnGetTask.setOnClickListener(this);
|
||||
btnGather = findViewById(R.id.btn_gather);//立即采集
|
||||
btnGather.setOnClickListener(this::onClick);
|
||||
btnGather.setOnClickListener(this);
|
||||
btnFinishGather = findViewById(R.id.btn_finish_gather);//结束采集
|
||||
btnFinishGather.setOnClickListener(this::onClick);
|
||||
btnFinishGather.setOnClickListener(this);
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {//poiEntity
|
||||
poiEntity = (PoiEntity) arguments.getSerializable("poiEntity");
|
||||
@ -123,7 +125,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (poiEntity.getPrecision() == null) {
|
||||
tvMoney.setText("¥" + 0);
|
||||
} else {
|
||||
tvMoney.setText("¥" + format2(Double.valueOf(poiEntity.getPrecision())));
|
||||
tvMoney.setText("¥" + format2(Double.parseDouble(poiEntity.getPrecision())));
|
||||
}
|
||||
if (poiEntity != null) {
|
||||
if (poiEntity.getDescribe() != null && !"".equals(poiEntity.getDescribe())) {
|
||||
@ -135,10 +137,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
|
||||
assert poiEntity != null;
|
||||
if (poiEntity.getDist() != null) {
|
||||
tvDistance.setText("距离:" + format5(Double.valueOf(poiEntity.getDist()) / 1000) + "km");
|
||||
}
|
||||
}
|
||||
assert poiEntity != null;
|
||||
int taskStatus = poiEntity.getTaskStatus();
|
||||
initViewByTaskStatus(taskStatus);
|
||||
}
|
||||
@ -191,6 +195,18 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_delete:
|
||||
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;
|
||||
EventBus.getDefault().post(obtains);
|
||||
break;
|
||||
case R.id.btn_cancel_get://结束领取
|
||||
if (poiEntity != null) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity.getTaskId(), poiEntity);
|
||||
@ -220,7 +236,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||
LatLng endLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng endLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
||||
if (geometry > 5000) {
|
||||
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
||||
|
@ -62,10 +62,7 @@ import static android.app.Activity.RESULT_OK;
|
||||
*/
|
||||
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivGathering, imageBank;
|
||||
private Button btnBank;
|
||||
private TextView tvBank;
|
||||
private TextView tvName;
|
||||
private EditText etBankNum;
|
||||
private ImageView gatheringCamera;
|
||||
|
||||
@ -89,18 +86,18 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivGathering = findViewById(R.id.iv_gathering);
|
||||
ivGathering.setOnClickListener(this::onClick);
|
||||
imageBank = findViewById(R.id.iv_bank);
|
||||
imageBank.setOnClickListener(this::onClick);
|
||||
ImageView ivGathering = findViewById(R.id.iv_gathering);
|
||||
ivGathering.setOnClickListener(this);
|
||||
ImageView imageBank = findViewById(R.id.iv_bank);
|
||||
imageBank.setOnClickListener(this);
|
||||
tvBank = findViewById(R.id.tv_bank);
|
||||
tvBank.setOnClickListener(this::onClick);
|
||||
btnBank = findViewById(R.id.btn_bank);
|
||||
btnBank.setOnClickListener(this::onClick);
|
||||
tvName = (TextView) findViewById(R.id.tv_name);
|
||||
tvBank.setOnClickListener(this);
|
||||
Button btnBank = findViewById(R.id.btn_bank);
|
||||
btnBank.setOnClickListener(this);
|
||||
TextView tvName = (TextView) findViewById(R.id.tv_name);
|
||||
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
||||
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
||||
gatheringCamera.setOnClickListener(this::onClick);
|
||||
gatheringCamera.setOnClickListener(this);
|
||||
if (Constant.NAME!=null){
|
||||
tvName.setText(Constant.NAME);
|
||||
}
|
||||
@ -126,7 +123,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
break;
|
||||
case R.id.iv_bank:
|
||||
String bankJson = new GetJsonDataUtil().getJson(getContext(), "bank.json");//获取assets目录下的json文件数据
|
||||
//用Gson 转成实体
|
||||
//用Gabon 转成实体
|
||||
jsonBean = parseData(bankJson);
|
||||
Dialog dialog = new Dialog(getContext());
|
||||
//弹窗点击周围空白处弹出层自动消失弹窗消失(false时为点击周围空白处弹出层不自动消失)
|
||||
@ -181,8 +178,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
String gatheringCameraTag = (String) gatheringCamera.getTag();
|
||||
gatheringList.add(new File(gatheringCameraTag));
|
||||
String etBankAccount = etBankNum.getText().toString().trim();
|
||||
if (etBankAccount == null || etBankAccount.equals("")) {
|
||||
|
||||
if (etBankAccount.equals("")) {
|
||||
if (!etBankAccount.matches("^\\\\d{19}$\"")) {
|
||||
Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -258,7 +254,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
//所属银行解析
|
||||
public ArrayList<BankPathBean> parseData(String result) {//Gson 解析
|
||||
public ArrayList<BankPathBean> parseData(String result) {//Gao 解析
|
||||
ArrayList<BankPathBean> detail = new ArrayList<>();
|
||||
try {
|
||||
JSONArray data = new JSONArray(result);
|
||||
|
@ -7,13 +7,12 @@ import android.widget.ImageView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 我的等级页面的fragment
|
||||
*/
|
||||
public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private ImageView ivGrade;
|
||||
|
||||
public static GradeFragment newInstance(Bundle bundle) {
|
||||
GradeFragment fragment = new GradeFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -32,16 +31,16 @@ public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
ivGrade = findViewById(R.id.iv_grade);super.initView();
|
||||
ImageView ivGrade = findViewById(R.id.iv_grade);
|
||||
super.initView();
|
||||
ivGrade.setOnClickListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.iv_grade:
|
||||
getActivity().finish();
|
||||
break; }
|
||||
if (v.getId() == R.id.iv_grade) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
@ -26,29 +25,23 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
public class HasSubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
|
||||
private ConstraintLayout clPoi;
|
||||
private TextView auditProcess;
|
||||
private TextView auditThrough;
|
||||
private TextView auditNotThrough;
|
||||
private ConstraintLayout clCharging;
|
||||
private TextView tvCharging;
|
||||
private TextView chargingAuditProcess;
|
||||
private TextView chargingAuditThrough;
|
||||
private TextView chargingAuditNotThrough;
|
||||
private ConstraintLayout clRoad;
|
||||
private TextView tvRoad;
|
||||
private TextView roadAuditProcess;
|
||||
private TextView roadAuditThrough;
|
||||
private TextView roadAuditNotThrough;
|
||||
private ConstraintLayout clOther;
|
||||
private TextView otherAuditProcess;
|
||||
private TextView otherAuditThrough;
|
||||
private TextView otherAuditNotThrough;
|
||||
private ConstraintLayout clPoiVideo;
|
||||
private TextView tvPoiVideo;
|
||||
private TextView poiVideoAuditProcess;
|
||||
private TextView poiVideoAuditThrough;
|
||||
private TextView poiVideoAuditProcessauditNotThrough;
|
||||
private TextView poiVideoAuditProcessableNotThrough;
|
||||
private int hasPage;
|
||||
|
||||
public static HasSubmitFragment newInstance(Bundle bundle) {
|
||||
@ -64,41 +57,41 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
clPoi = (ConstraintLayout) findViewById(R.id.cl_poi);
|
||||
clPoi.setOnClickListener(this::onClick);
|
||||
ConstraintLayout clPoi = (ConstraintLayout) findViewById(R.id.cl_poi);
|
||||
clPoi.setOnClickListener(this);
|
||||
auditProcess = (TextView) findViewById(R.id.audit_process);
|
||||
auditThrough = (TextView) findViewById(R.id.audit_through);
|
||||
auditNotThrough = (TextView) findViewById(R.id.audit_not_through);
|
||||
|
||||
clRoad = (ConstraintLayout) findViewById(R.id.cl_road);
|
||||
clRoad.setOnClickListener(this::onClick);
|
||||
ConstraintLayout clRoad = (ConstraintLayout) findViewById(R.id.cl_road);
|
||||
clRoad.setOnClickListener(this);
|
||||
roadAuditProcess = (TextView) findViewById(R.id.road_audit_process);
|
||||
roadAuditThrough = (TextView) findViewById(R.id.road_audit_through);
|
||||
roadAuditNotThrough = (TextView) findViewById(R.id.road_audit_not_through);
|
||||
clCharging = (ConstraintLayout) findViewById(R.id.cl_charging);
|
||||
clCharging.setOnClickListener(this::onClick);
|
||||
ConstraintLayout clCharging = (ConstraintLayout) findViewById(R.id.cl_charging);
|
||||
clCharging.setOnClickListener(this);
|
||||
chargingAuditProcess = (TextView) findViewById(R.id.charging_audit_process);
|
||||
chargingAuditThrough = (TextView) findViewById(R.id.charging_audit_through);
|
||||
chargingAuditNotThrough = (TextView) findViewById(R.id.charging_audit_not_through);
|
||||
|
||||
clOther = (ConstraintLayout) findViewById(R.id.cl_other);
|
||||
clOther.setOnClickListener(this::onClick);
|
||||
ConstraintLayout clOther = (ConstraintLayout) findViewById(R.id.cl_other);
|
||||
clOther.setOnClickListener(this);
|
||||
otherAuditProcess = (TextView) findViewById(R.id.other_audit_process);
|
||||
otherAuditThrough = (TextView) findViewById(R.id.other_audit_through);
|
||||
otherAuditNotThrough = (TextView) findViewById(R.id.other_audit_not_through);
|
||||
|
||||
clPoiVideo = (ConstraintLayout) findViewById(R.id.cl_poiVideo);
|
||||
clPoiVideo.setOnClickListener(this::onClick);
|
||||
tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo);
|
||||
ConstraintLayout clPoiVideo = (ConstraintLayout) findViewById(R.id.cl_poiVideo);
|
||||
clPoiVideo.setOnClickListener(this);
|
||||
TextView tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo);
|
||||
poiVideoAuditProcess = (TextView) findViewById(R.id.poiVideo_audit_process);
|
||||
poiVideoAuditThrough = (TextView) findViewById(R.id.poiVideo_audit_through);
|
||||
poiVideoAuditProcessauditNotThrough = (TextView) findViewById(R.id.poiVideo_audit_processaudit_not_through);
|
||||
poiVideoAuditProcessableNotThrough = (TextView) findViewById(R.id.poiVideo_audit_processaudit_not_through);
|
||||
initRequest();
|
||||
}
|
||||
|
||||
public void initRequest() {
|
||||
initPoiSubMitWork();//poi
|
||||
initChaningSubMitWork();//充电站
|
||||
initCaningSubMitWork();//充电站
|
||||
initPoiVideoSubMitWork();//poi录像
|
||||
initRoadSubMitWork();//道路录像
|
||||
initOtherSubMitWork();//其他
|
||||
@ -144,7 +137,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
|
||||
private void initChaningSubMitWork() {
|
||||
private void initCaningSubMitWork() {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("type", "2");
|
||||
httpParams.put("pageSize", "10");
|
||||
@ -242,7 +235,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
if (hasSubmitBeanBody != null) {
|
||||
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
poiVideoAuditProcessableNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
hasPage++;
|
||||
}
|
||||
} else {
|
||||
|
@ -39,8 +39,6 @@ import okhttp3.OkHttpClient;
|
||||
* 常见问题页面的fragment
|
||||
*/
|
||||
public class IssueFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivIssueFinish;
|
||||
private XRecyclerView mainIssueRecycler;
|
||||
private IssueProblemAdapter issueProblemAdapter;
|
||||
private int issuePage = 1;
|
||||
|
||||
@ -98,8 +96,8 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivIssueFinish =findViewById(R.id.iv_issue_finish);
|
||||
mainIssueRecycler =findViewById(R.id.main_issue_recycler);
|
||||
ImageView ivIssueFinish = findViewById(R.id.iv_issue_finish);
|
||||
XRecyclerView mainIssueRecycler = findViewById(R.id.main_issue_recycler);
|
||||
ivIssueFinish.setOnClickListener(this::onClick);
|
||||
mainIssueRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
//设置下划线
|
||||
|
@ -20,6 +20,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@ -27,9 +28,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivIssueWebFinish;
|
||||
private WebView issueWebView;
|
||||
|
||||
public static IssueWebFragment newInstance(Bundle bundle) {
|
||||
IssueWebFragment fragment = new IssueWebFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -44,15 +42,13 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivIssueWebFinish = findViewById(R.id.iv_issueWeb_finish);
|
||||
issueWebView = (WebView) findViewById(R.id.issue_webView);
|
||||
ivIssueWebFinish.setOnClickListener(this::onClick);
|
||||
ImageView ivIssueWebFinish = findViewById(R.id.iv_issueWeb_finish);
|
||||
WebView issueWebView = (WebView) findViewById(R.id.issue_webView);
|
||||
ivIssueWebFinish.setOnClickListener(this);
|
||||
issueWebView.getSettings().setBlockNetworkImage(false);
|
||||
WebSettings settings = issueWebView.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
issueWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
issueWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
settings.setBuiltInZoomControls(false);
|
||||
issueWebView.loadUrl("http://172.23.139.4:10001/#/serveclause");
|
||||
// issueWebView.loadUrl("http://www.navinfo.com");
|
||||
@ -61,10 +57,8 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_issueWeb_finish:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_issueWeb_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
@ -8,14 +8,13 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 地图下载的Fragment
|
||||
*/
|
||||
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private ImageView ivDownLoad;
|
||||
private XRecyclerView recyclerView;
|
||||
|
||||
public static MapDownloadFragment newInstance(Bundle bundle) {
|
||||
MapDownloadFragment fragment = new MapDownloadFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -30,9 +29,9 @@ public class MapDownloadFragment extends BaseFragment implements View.OnClickLis
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivDownLoad = findViewById(R.id.iv_download);
|
||||
ImageView ivDownLoad = findViewById(R.id.iv_download);
|
||||
ivDownLoad.setOnClickListener(this);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
XRecyclerView recyclerView = findViewById(R.id.recycler_view);
|
||||
|
||||
}
|
||||
|
||||
@ -43,10 +42,8 @@ public class MapDownloadFragment extends BaseFragment implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.iv_download:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_download) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,16 +26,14 @@ import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 寻宝-消息的Fragment
|
||||
*/
|
||||
public class MessageFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView messageFinal;
|
||||
private XRecyclerView messageRecycler;
|
||||
private MessageAdapter messageAdapter;
|
||||
private TextView tvRoad;
|
||||
private int messagePage = 1;
|
||||
|
||||
public static MessageFragment newInstance(Bundle bundle) {
|
||||
@ -52,12 +50,12 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
messageFinal = (ImageView) findViewById(R.id.message_final);
|
||||
messageFinal.setOnClickListener(this::onClick);
|
||||
messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
|
||||
ImageView messageFinal = (ImageView) findViewById(R.id.message_final);
|
||||
messageFinal.setOnClickListener(this);
|
||||
XRecyclerView messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
|
||||
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
tvRoad = findViewById(R.id.tv_read);
|
||||
tvRoad.setOnClickListener(this::onClick);
|
||||
TextView tvRoad = findViewById(R.id.tv_read);
|
||||
tvRoad.setOnClickListener(this);
|
||||
messageRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
messageRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
@ -133,7 +131,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.message_final:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_read:
|
||||
|
@ -30,16 +30,15 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 我的Fragment
|
||||
* 2021-5-25
|
||||
*/
|
||||
public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView imageHeard, imageShare, imageSign;
|
||||
private TextView tvName, tvMoney;
|
||||
private Button btnWithdraw, btnQuit;
|
||||
private RelativeLayout rlGrade, rlPrivilege, rlMap, rlIssue, rlContact, rlSet, rlAbout;
|
||||
private TextView tvMoney;
|
||||
|
||||
public static MineFragment newInstance(Bundle bundle) {
|
||||
MineFragment fragment = new MineFragment();
|
||||
@ -64,35 +63,35 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
imageHeard = findViewById(R.id.image_heard);
|
||||
Glide.with(getActivity()).load(R.drawable.mine_harder).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(imageHeard);
|
||||
imageHeard.setOnClickListener(this::onClick);
|
||||
tvName = findViewById(R.id.tv_name);
|
||||
ImageView imageHeard = findViewById(R.id.image_heard);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(R.drawable.mine_harder).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(imageHeard);
|
||||
imageHeard.setOnClickListener(this);
|
||||
TextView tvName = findViewById(R.id.tv_name);
|
||||
tvName.setText(Constant.USER_NAME);
|
||||
tvName.setOnClickListener(this::onClick);
|
||||
tvName.setOnClickListener(this);
|
||||
tvMoney = findViewById(R.id.tv_money);
|
||||
imageShare = findViewById(R.id.image_share);
|
||||
imageShare.setOnClickListener(this::onClick);
|
||||
imageSign = findViewById(R.id.image_sign);
|
||||
imageSign.setOnClickListener(this::onClick);
|
||||
btnWithdraw = findViewById(R.id.btn_withdraw);
|
||||
btnWithdraw.setOnClickListener(this::onClick);
|
||||
rlGrade = findViewById(R.id.rl_grade);
|
||||
rlGrade.setOnClickListener(this::onClick);
|
||||
rlPrivilege = findViewById(R.id.rl_privilege);
|
||||
rlPrivilege.setOnClickListener(this::onClick);
|
||||
rlMap = findViewById(R.id.rl_map);
|
||||
rlMap.setOnClickListener(this::onClick);
|
||||
rlIssue = findViewById(R.id.rl_issue);
|
||||
rlIssue.setOnClickListener(this::onClick);
|
||||
rlContact = findViewById(R.id.rl_contact);
|
||||
rlContact.setOnClickListener(this::onClick);
|
||||
rlSet = findViewById(R.id.rl_set);
|
||||
rlSet.setOnClickListener(this::onClick);
|
||||
rlAbout = findViewById(R.id.rl_about);
|
||||
rlAbout.setOnClickListener(this::onClick);
|
||||
btnQuit = findViewById(R.id.btn_quit);
|
||||
btnQuit.setOnClickListener(this::onClick);
|
||||
ImageView imageShare = findViewById(R.id.image_share);
|
||||
imageShare.setOnClickListener(this);
|
||||
ImageView imageSign = findViewById(R.id.image_sign);
|
||||
imageSign.setOnClickListener(this);
|
||||
Button btnWithdraw = findViewById(R.id.btn_withdraw);
|
||||
btnWithdraw.setOnClickListener(this);
|
||||
RelativeLayout rlGrade = findViewById(R.id.rl_grade);
|
||||
rlGrade.setOnClickListener(this);
|
||||
RelativeLayout rlPrivilege = findViewById(R.id.rl_privilege);
|
||||
rlPrivilege.setOnClickListener(this);
|
||||
RelativeLayout rlMap = findViewById(R.id.rl_map);
|
||||
rlMap.setOnClickListener(this);
|
||||
RelativeLayout rlIssue = findViewById(R.id.rl_issue);
|
||||
rlIssue.setOnClickListener(this);
|
||||
RelativeLayout rlContact = findViewById(R.id.rl_contact);
|
||||
rlContact.setOnClickListener(this);
|
||||
RelativeLayout rlSet = findViewById(R.id.rl_set);
|
||||
rlSet.setOnClickListener(this);
|
||||
RelativeLayout rlAbout = findViewById(R.id.rl_about);
|
||||
rlAbout.setOnClickListener(this);
|
||||
Button btnQuit = findViewById(R.id.btn_quit);
|
||||
btnQuit.setOnClickListener(this);
|
||||
initNetWork();
|
||||
}
|
||||
|
||||
@ -154,59 +153,47 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
startActivity(intentUser);
|
||||
break;
|
||||
case R.id.image_share://分享
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case R.id.image_sign://签到
|
||||
case R.id.rl_set://设置
|
||||
case R.id.rl_issue://常见问题
|
||||
case R.id.rl_map://地图下载
|
||||
case R.id.rl_privilege://我的特权
|
||||
case R.id.rl_grade://我的等级
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case R.id.btn_withdraw://提现页面
|
||||
|
||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentWithdraw.putExtra("tag", 15);
|
||||
startActivity(intentWithdraw);
|
||||
break;
|
||||
case R.id.rl_grade://我的等级
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
// Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||
// Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentGrade.putExtra("tag", 17);
|
||||
// startActivity(intentGrade);
|
||||
break;
|
||||
case R.id.rl_privilege://我的特权
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
// Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
||||
// Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentPrivilege.putExtra("tag", 18);
|
||||
// startActivity(intentPrivilege);
|
||||
break;
|
||||
case R.id.rl_map://地图下载
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
// Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
// Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentMap.putExtra("tag", 19);
|
||||
// startActivity(intentMap);
|
||||
break;
|
||||
case R.id.rl_issue://常见问题
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
// Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
// Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentIssue.putExtra("tag", 20);
|
||||
// startActivity(intentIssue);
|
||||
break;
|
||||
// Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentSet.putExtra("tag", 22);
|
||||
// startActivity(intentSet);
|
||||
case R.id.rl_contact://联系我们
|
||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentContact.putExtra("tag", 21);
|
||||
startActivity(intentContact);
|
||||
break;
|
||||
case R.id.rl_set://设置
|
||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||
// Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentSet.putExtra("tag", 22);
|
||||
// startActivity(intentSet);
|
||||
break;
|
||||
|
||||
case R.id.rl_about://关于
|
||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentAbout.putExtra("tag", 23);
|
||||
startActivity(intentAbout);
|
||||
break;
|
||||
case R.id.btn_quit://退出登录
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -97,15 +97,12 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
private ImageView ivPictures;
|
||||
private TextView tvPictures;
|
||||
private Button btnOtherLocal;
|
||||
private Button btnOtherUploading;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private LatLng latLng;
|
||||
private int station_type = 5;
|
||||
private ArrayList<File> otherUploadList;
|
||||
private CheckBox checkPot;
|
||||
private File file;
|
||||
private NestedScrollView nestedScrollView;
|
||||
private Marker markerOther;
|
||||
private Point screenOtherPositions;
|
||||
|
||||
@ -138,7 +135,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
||||
Log.d("TAG", "onCaresses: " + isSliding);
|
||||
}
|
||||
if (isSliding) {
|
||||
// 监听到返回按钮点击事件
|
||||
@ -164,7 +161,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
spinnerOther = findViewById(R.id.spinner_other);
|
||||
ArrayAdapter<String> adapterOthers = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, others);
|
||||
@ -232,24 +229,24 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
});
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
if (slidingPaneLayout != null) {
|
||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||
}
|
||||
editTaskName = findViewById(R.id.et_task_name);
|
||||
rlPicture = findViewById(R.id.rl_picture);
|
||||
rlPicture.setOnClickListener(this::onClick);
|
||||
rlPicture.setOnClickListener(this);
|
||||
ivPicture = findViewById(R.id.iv_picture);
|
||||
tvPicture = findViewById(R.id.tv_picture);
|
||||
tvPictures = findViewById(R.id.tv_pictures);
|
||||
rlPictures = findViewById(R.id.rl_pictures);
|
||||
rlPictures.setOnClickListener(this::onClick);
|
||||
rlPictures.setOnClickListener(this);
|
||||
ivPictures = findViewById(R.id.iv_pictures);
|
||||
editOtherDescribe = findViewById(R.id.edit_other_describe);
|
||||
btnOtherLocal = findViewById(R.id.btn_other_local);
|
||||
btnOtherLocal.setOnClickListener(this::onClick);
|
||||
btnOtherUploading = findViewById(R.id.btn_other_uploading);
|
||||
btnOtherUploading.setOnClickListener(this::onClick);
|
||||
btnOtherLocal.setOnClickListener(this);
|
||||
Button btnOtherUploading = findViewById(R.id.btn_other_uploading);
|
||||
btnOtherUploading.setOnClickListener(this);
|
||||
//数据展示
|
||||
initShowPoi();
|
||||
//禁用所有操作控件
|
||||
|
@ -77,6 +77,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
@ -95,10 +96,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal;
|
||||
private Button btnUploading;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private CheckBox checkBoxLife;
|
||||
private CheckBox checkBoxRight;
|
||||
private LatLng latLng;
|
||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||
private int existence = 0;
|
||||
@ -113,7 +112,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private ContactView contactView;
|
||||
private ArrayList<File> poiPicList;
|
||||
private File file;
|
||||
private NestedScrollView nestedScrollView;
|
||||
private Marker markerPoi;
|
||||
private Point screenPoiPositions;
|
||||
|
||||
@ -174,10 +172,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -220,19 +218,19 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
});
|
||||
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
if (slidingPaneLayout != null) {
|
||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||
}
|
||||
checkBoxRight.setVisibility(View.GONE);
|
||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||
btnSaveLocal.setOnClickListener(this::onClick);
|
||||
btnSaveLocal.setOnClickListener(this);
|
||||
btnUploading = findViewById(R.id.btn_uploading);
|
||||
btnUploading.setOnClickListener(this::onClick);
|
||||
btnUploading.setOnClickListener(this);
|
||||
editNameContent = findViewById(R.id.tv_name_content);
|
||||
editSiteContent = findViewById(R.id.tv_site_content);
|
||||
tvPoiExamine = findViewById(R.id.tv_poi_examine);
|
||||
tvPoiExamine.setOnClickListener(this::onClick);
|
||||
tvPoiExamine.setOnClickListener(this);
|
||||
editDescribe = findViewById(R.id.edit_describe);
|
||||
ivPanorama = findViewById(R.id.iv_panorama);
|
||||
tvPanorama = findViewById(R.id.tv_panorama);
|
||||
@ -248,19 +246,19 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
tvElse = findViewById(R.id.tv_else);
|
||||
linearContact = findViewById(R.id.linear_contact);
|
||||
rlPanorama = findViewById(R.id.rl_panorama);
|
||||
rlPanorama.setOnClickListener(this::onClick);
|
||||
rlPanorama.setOnClickListener(this);
|
||||
rlName = findViewById(R.id.rl_name);
|
||||
rlName.setOnClickListener(this::onClick);
|
||||
rlName.setOnClickListener(this);
|
||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
||||
rlInternalPhotos.setOnClickListener(this);
|
||||
rlCard = findViewById(R.id.rl_card);
|
||||
rlCard.setOnClickListener(this::onClick);
|
||||
rlCard.setOnClickListener(this);
|
||||
rlElse = findViewById(R.id.rl_else);
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlElse.setOnClickListener(this);
|
||||
linearExist = findViewById(R.id.linear_exist);
|
||||
spinnerExist = findViewById(R.id.spinner_exist);
|
||||
|
||||
ArrayAdapter<String> adapterExist = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, spinner);
|
||||
ArrayAdapter<String> adapterExist = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, spinner);
|
||||
adapterExist.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||
spinnerExist.setAdapter(adapterExist);
|
||||
spinnerExist.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@ -297,7 +295,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivPanorama.setImageDrawable(null);
|
||||
@ -311,7 +309,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivName.setImageDrawable(null);
|
||||
@ -325,7 +323,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivElse.setImageDrawable(null);
|
||||
@ -339,7 +337,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivInternal.setImageDrawable(null);
|
||||
@ -353,7 +351,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
ivCard.setImageDrawable(null);
|
||||
@ -367,7 +365,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
private void initShowPoi() {
|
||||
// 添加信息:
|
||||
assert getArguments() != null;
|
||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||
assert showPoiEntity != null;
|
||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||
tvPoiExamine.setVisibility(View.GONE);
|
||||
} else {
|
||||
@ -375,7 +375,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
String name = showPoiEntity.getName();//名称
|
||||
if (name != null && !name.equals("")) {
|
||||
editNameContent.setText(name + "");
|
||||
editNameContent.setText(name);
|
||||
}
|
||||
|
||||
String address = showPoiEntity.getAddress();//地址
|
||||
@ -397,7 +397,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
initPhone();
|
||||
String memo = showPoiEntity.getMemo();//任务描述
|
||||
if (memo != null && !memo.equals("")) {
|
||||
editDescribe.setText(memo + "");
|
||||
editDescribe.setText(memo);
|
||||
}
|
||||
String telPhone = showPoiEntity.getTelPhone();
|
||||
if (telPhone != null && !telPhone.equals("") && !telPhone.equals("null")) {
|
||||
@ -407,24 +407,20 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split != null && split.length > 1) {
|
||||
if (split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
} else {
|
||||
if (phones[i] != null) {
|
||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split != null && split.length > 1) {
|
||||
if (split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||
@ -459,16 +455,16 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String photo = showPoiEntity.getPhotoInfo().get(i).getPhoto();
|
||||
String[] split = photo.split("/");
|
||||
if (split[split.length - 1].startsWith("a")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivPanorama);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPanorama);
|
||||
tvPanorama.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("b")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivName);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivName);
|
||||
tvPoiNamePic.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("c")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivInternal);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivInternal);
|
||||
tvInternal.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("d")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivCard);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard);
|
||||
tvCard.setTag(photo);
|
||||
} else if (split[split.length - 1].startsWith("e")) {
|
||||
Glide.with(getActivity()).load(photo).into(ivElse);
|
||||
@ -490,7 +486,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,16 +30,15 @@ import com.umeng.commonsdk.debug.D;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 记录-已提交-poi任务列表
|
||||
*/
|
||||
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivPoiTaskFinish;
|
||||
private XRecyclerView poiTaskXrv;
|
||||
private int type;
|
||||
private PoiTaskAdapter poiTaskAdapter;
|
||||
private TextView tvTaskTitle;
|
||||
private int page=1;
|
||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||
|
||||
@ -57,7 +56,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
tvTaskTitle = findViewById(R.id.tv_poiTask_title);
|
||||
TextView tvTaskTitle = findViewById(R.id.tv_poiTask_title);
|
||||
switch (type){
|
||||
case 1:
|
||||
tvTaskTitle.setText("POI任务列表");
|
||||
@ -75,8 +74,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
tvTaskTitle.setText("其他任务列表");
|
||||
break;
|
||||
}
|
||||
ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
||||
ivPoiTaskFinish.setOnClickListener(this::onClick);
|
||||
ImageView ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
||||
ivPoiTaskFinish.setOnClickListener(this);
|
||||
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
|
||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
@ -105,6 +104,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
assert getArguments() != null;
|
||||
type = getArguments().getInt("type", 0);
|
||||
listBeans = new ArrayList<>();
|
||||
initWork(type,true);
|
||||
@ -182,10 +182,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_poiTask_finish:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_poiTask_finish) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 寻宝-点击上传弹窗-poi录像
|
||||
@ -85,12 +86,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
private RadioButton rbCar, rbBicycle, rbWalking, rbManual;
|
||||
private EditText etDesc;
|
||||
private Button btnRoadSave;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private Button btnPoiVideoUpload;
|
||||
private File fileZip;
|
||||
private FrameLayout fmPoiVideoPic;
|
||||
private NestedScrollView nestedScrollView;
|
||||
private LatLng latLng;
|
||||
private Marker markerPoiVideo;
|
||||
private TextView tvPicture;
|
||||
@ -125,7 +123,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
||||
Log.d("TAG", "onCaresses: " + isSliding);
|
||||
}
|
||||
if (isSliding) {
|
||||
// 监听到返回按钮点击事件
|
||||
@ -152,14 +150,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
tvPictures = (TextView) findViewById(R.id.tv_pictures);//拍照
|
||||
tvPictures.setOnClickListener(this::onClick);
|
||||
tvPictures.setOnClickListener(this);
|
||||
tvPicture = (TextView) findViewById(R.id.tv_picture);//录像
|
||||
tvPicture.setOnClickListener(this::onClick);
|
||||
tvPicture.setOnClickListener(this);
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||
if (slidingPaneLayout != null) {
|
||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||
}
|
||||
@ -169,9 +167,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
etDesc = (EditText) findViewById(R.id.et_desc);
|
||||
fmPoiVideoPic = findViewById(R.id.fm_poi_video_picture);
|
||||
btnRoadSave = (Button) findViewById(R.id.btn_poi_video_save);
|
||||
btnRoadSave.setOnClickListener(this::onClick);
|
||||
btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload);
|
||||
btnPoiVideoUpload.setOnClickListener(this::onClick);
|
||||
btnRoadSave.setOnClickListener(this);
|
||||
Button btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload);
|
||||
btnPoiVideoUpload.setOnClickListener(this);
|
||||
rgType = (RadioGroup) findViewById(R.id.rg_type);
|
||||
rbCar =findViewById(R.id.rb_car);
|
||||
rbBicycle =findViewById(R.id.rb_bicycle);
|
||||
@ -197,7 +195,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
||||
@ -217,11 +215,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
|
||||
private void initShowPoi() {
|
||||
// 添加信息:
|
||||
assert getArguments() != null;
|
||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||
if (showPoiEntity != null) {
|
||||
String name = showPoiEntity.getName();//名称
|
||||
if (name != null && !name.equals("")) {
|
||||
etRoadName.setText(name + "");
|
||||
etRoadName.setText(name);
|
||||
}
|
||||
String x = showPoiEntity.getX();
|
||||
String y = showPoiEntity.getY();
|
||||
@ -241,12 +240,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
String describe = showPoiEntity.getMemo();//任务描述
|
||||
if (describe != null && !describe.equals("")) {
|
||||
etDesc.setText(describe + "");
|
||||
etDesc.setText(describe);
|
||||
}
|
||||
String photoList = showPoiEntity.getPhoto();
|
||||
int record_way = showPoiEntity.getRecord_way();
|
||||
if (record_way == 1) {//录像
|
||||
isRequest = 0x101;
|
||||
tvPictures.setEnabled(false);
|
||||
if (!StringUtils.isEmpty(photoList)) {
|
||||
boolean isImageLoad = false;
|
||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
||||
@ -264,6 +264,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
} else if (record_way == 2) {//连拍
|
||||
isRequest = 0x102;
|
||||
if (work_type==3){
|
||||
showWorkType(work_type);
|
||||
}
|
||||
tvPicture.setEnabled(false);
|
||||
if (!StringUtils.isEmpty(photoList)) {
|
||||
boolean isImageLoad = false;
|
||||
List<File> pictureFileListByUUID = AWMp4ParserHelper.getInstance().getJPGFileListByUUID(showPoiEntity.getId());
|
||||
@ -271,7 +275,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (pictureFileListByUUID.get(i).getPath().contains("0.jpg") && !pictureFileListByUUID.get(i).getPath().contains("paper.txt")) {
|
||||
if (pictureFileListByUUID.get(i).exists() && !isImageLoad) {
|
||||
// 使用glide加载视频的第一帧
|
||||
Glide.with(getActivity()).load(pictureFileListByUUID.get(i)).into(ivPoiVideoPicture);
|
||||
Glide.with(Objects.requireNonNull(getActivity())).load(pictureFileListByUUID.get(i)).into(ivPoiVideoPicture);
|
||||
isImageLoad = true;
|
||||
}
|
||||
}
|
||||
@ -281,29 +285,64 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
}
|
||||
//判断是否是已做完任务并保存成功
|
||||
assert showPoiEntity != null;
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();//禁用所有可操作的控件
|
||||
}
|
||||
}
|
||||
|
||||
private void showWorkType(int work_type) {
|
||||
switch (work_type){
|
||||
case 0:
|
||||
rgType.setEnabled(false);
|
||||
rbCar.setEnabled(true);
|
||||
rbWalking.setEnabled(false);
|
||||
rbBicycle.setEnabled(false);
|
||||
rbManual.setEnabled(false);
|
||||
break;
|
||||
case 1:
|
||||
rgType.setEnabled(false);
|
||||
rbCar.setEnabled(false);
|
||||
rbBicycle.setEnabled(true);
|
||||
rbWalking.setEnabled(false);
|
||||
rbManual.setEnabled(false);
|
||||
break;
|
||||
case 2:
|
||||
rgType.setEnabled(false);
|
||||
rbCar.setEnabled(false);
|
||||
rbBicycle.setEnabled(false);
|
||||
rbWalking.setEnabled(true);
|
||||
rbManual.setEnabled(false);
|
||||
break;
|
||||
case 3:
|
||||
rgType.setEnabled(false);
|
||||
rbCar.setEnabled(false);
|
||||
rbWalking.setEnabled(false);
|
||||
rbBicycle.setEnabled(false);
|
||||
rbManual.setEnabled(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void disables() {
|
||||
etRoadName.setEnabled(false);
|
||||
rgType.setEnabled(false);
|
||||
|
||||
ivPoiVideoPicture.setEnabled(false);
|
||||
tvPictures.setEnabled(false);
|
||||
tvPicture.setEnabled(false);
|
||||
etDesc.setEnabled(false);
|
||||
btnRoadSave.setEnabled(false);
|
||||
rgType.setEnabled(false);
|
||||
rbCar.setEnabled(false);
|
||||
rbWalking.setEnabled(false);
|
||||
rbBicycle.setEnabled(false);
|
||||
rbManual.setEnabled(false);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||
if ((boolean) data.obj) {
|
||||
|
||||
initPoiVideoSharePre();
|
||||
}
|
||||
}
|
||||
@ -344,7 +383,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dismissLoadingDialog();
|
||||
@ -352,7 +391,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dismissLoadingDialog();
|
||||
@ -360,7 +399,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
@ -389,7 +427,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiVideoSave(poiEntity, isLocal);
|
||||
@ -408,7 +446,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (never) {
|
||||
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予权限", Toast.LENGTH_SHORT).show();
|
||||
// 如果是被永久拒绝就跳转到应用权限系统设置页面
|
||||
XXPermissions.startPermissionActivity(getActivity(), permissions);
|
||||
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -447,7 +485,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||
@ -545,6 +583,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
isRequest = 0x101;
|
||||
if (data != null && data.hasExtra(Constant.INTENT_VIDEO_PATH)) {
|
||||
String videoPath = data.getStringExtra(Constant.INTENT_VIDEO_PATH);
|
||||
assert videoPath != null;
|
||||
File videoFile = new File(videoPath);
|
||||
if (videoFile.exists()) {
|
||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
|
||||
@ -555,8 +594,15 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
} else if (requestCode == 0x102 && resultCode == 0x102) {
|
||||
tvPicture.setEnabled(false);
|
||||
isRequest = 0x102;
|
||||
|
||||
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||
int type = data.getIntExtra("type", 0);
|
||||
if (type==3){
|
||||
showWorkType(type);
|
||||
}
|
||||
|
||||
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||
assert videoPath != null;
|
||||
File pictureFile = new File(videoPath);
|
||||
if (pictureFile.exists()) {
|
||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(pictureFile).toString(), ivPoiVideoPicture, 500);
|
||||
@ -735,7 +781,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiEntity.setWork_type(pictureType);
|
||||
}
|
||||
String desc = etDesc.getText().toString().trim();
|
||||
if (desc != null && !desc.equals("")) {
|
||||
if (!desc.equals("")) {
|
||||
poiEntity.setMemo(desc);
|
||||
}
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
@ -7,13 +7,13 @@ import android.widget.ImageView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 我的等级页面的fragment
|
||||
*/
|
||||
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private ImageView ivPrivilege;
|
||||
|
||||
public static PrivilegeFragment newInstance(Bundle bundle) {
|
||||
PrivilegeFragment fragment = new PrivilegeFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -32,16 +32,14 @@ public class PrivilegeFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivPrivilege = findViewById(R.id.iv_privilege);
|
||||
ImageView ivPrivilege = findViewById(R.id.iv_privilege);
|
||||
ivPrivilege.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.iv_privilege:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_privilege) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ import com.navinfo.outdoor.util.NoSlideViewPager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 记录的Fragment
|
||||
@ -26,8 +27,6 @@ import java.util.ArrayList;
|
||||
public class RecordFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
|
||||
private TabLayout tabRecord;
|
||||
private NoSlideViewPager vpRecord;
|
||||
private final String[] names = {"待提交", "已提交"};
|
||||
private StaySubmitFragment staySubmitFragment; // 待提交
|
||||
private HasSubmitFragment hasSubmitFragment;// 已提交
|
||||
@ -46,13 +45,14 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
tabRecord = (TabLayout) findViewById(R.id.tab_record);
|
||||
vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
||||
TabLayout tabRecord = (TabLayout) findViewById(R.id.tab_record);
|
||||
NoSlideViewPager vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
||||
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||
staySubmitFragment = new StaySubmitFragment();
|
||||
fragments.add(staySubmitFragment);
|
||||
hasSubmitFragment = new HasSubmitFragment();
|
||||
fragments.add(hasSubmitFragment);
|
||||
assert getFragmentManager() != null;
|
||||
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
||||
@NonNull
|
||||
@NotNull
|
||||
@ -68,8 +68,8 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
||||
});
|
||||
|
||||
tabRecord.setupWithViewPager(vpRecord);
|
||||
tabRecord.getTabAt(0).setText(names[0]);
|
||||
tabRecord.getTabAt(1).setText(names[1]);
|
||||
Objects.requireNonNull(tabRecord.getTabAt(0)).setText(names[0]);
|
||||
Objects.requireNonNull(tabRecord.getTabAt(1)).setText(names[1]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,18 +27,20 @@ import com.navinfo.outdoor.util.RegexUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* 注册页面
|
||||
*/
|
||||
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
||||
private EditText etRegisterPhone, etRegisterNote, etRegisterReferrer, etRegisterPaw, etRegisterConfirmPaw;
|
||||
private ImageView ivFinish;
|
||||
private TextView haveGoLogin, registerGetNote;
|
||||
private Button btnRegister;
|
||||
private EditText etRegisterPhone;
|
||||
private EditText etRegisterNote;
|
||||
private EditText etRegisterPaw;
|
||||
private EditText etRegisterConfirmPaw;
|
||||
private TextView registerGetNote;
|
||||
private String sessionId;
|
||||
private CountDownTimer timer;
|
||||
private CheckBox ivRegisterCheck;
|
||||
|
||||
public static RegisterFragment newInstance(Bundle bundle) {
|
||||
RegisterFragment fragment = new RegisterFragment();
|
||||
@ -54,20 +56,20 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivFinish = findViewById(R.id.iv_register_finish);
|
||||
ivFinish.setOnClickListener(this::onClick);
|
||||
ImageView ivFinish = findViewById(R.id.iv_register_finish);
|
||||
ivFinish.setOnClickListener(this);
|
||||
etRegisterPhone = findViewById(R.id.et_register_phone);
|
||||
etRegisterNote = findViewById(R.id.et_register_note);
|
||||
registerGetNote = findViewById(R.id.register_get_note);
|
||||
registerGetNote.setOnClickListener(this::onClick);
|
||||
etRegisterReferrer = findViewById(R.id.et_register_referrer);
|
||||
registerGetNote.setOnClickListener(this);
|
||||
EditText etRegisterReferrer = findViewById(R.id.et_register_referrer);
|
||||
etRegisterPaw = findViewById(R.id.et_register_paw);
|
||||
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
|
||||
ivRegisterCheck = findViewById(R.id.iv_register_check);
|
||||
haveGoLogin = findViewById(R.id.have_go_login);
|
||||
haveGoLogin.setOnClickListener(this::onClick);
|
||||
btnRegister = findViewById(R.id.btn_register);
|
||||
btnRegister.setOnClickListener(this::onClick);
|
||||
CheckBox ivRegisterCheck = findViewById(R.id.iv_register_check);
|
||||
TextView haveGoLogin = findViewById(R.id.have_go_login);
|
||||
haveGoLogin.setOnClickListener(this);
|
||||
Button btnRegister = findViewById(R.id.btn_register);
|
||||
btnRegister.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +82,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_register_finish:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.have_go_login:
|
||||
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
||||
@ -146,14 +148,14 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
httpParams.put("mobile", mobile);
|
||||
}
|
||||
String code = etRegisterNote.getText().toString().trim();
|
||||
if (code == null || code.equals("")) {
|
||||
if (code.equals("")) {
|
||||
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
httpParams.put("code", code);
|
||||
}
|
||||
String password = etRegisterPaw.getText().toString().trim();
|
||||
if (password == null || password.equals("")) {
|
||||
if (password.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
@ -164,7 +166,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
String conFirmPaw = etRegisterConfirmPaw.getText().toString().trim();
|
||||
if (conFirmPaw == null || conFirmPaw.equals("")) {
|
||||
if (conFirmPaw.equals("")) {
|
||||
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -199,7 +201,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
obtain.what = Constant.REGISTER_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -3,24 +3,17 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.media.MediaMetadataRetriever;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.provider.ContactsContract;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -29,7 +22,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.github.lazylibrary.util.StringUtils;
|
||||
import com.github.lazylibrary.util.ZipUtil;
|
||||
import com.google.gson.Gson;
|
||||
@ -40,21 +32,16 @@ import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.activity.PictureActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||
import com.navinfo.outdoor.bean.RoadExtend;
|
||||
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
@ -72,18 +59,14 @@ import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
/**
|
||||
* 寻宝-点击上传弹窗-道路
|
||||
*/
|
||||
@ -196,7 +179,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||
Intent intent = new Intent(getContext(), PictureActivity.class);
|
||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalFile.getAbsolutePath());
|
||||
intent.putExtra(Constant.INTENT_VIDEO_ORATATION, 0);
|
||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
intent.putExtra("poiEntity", showPoiEntity);
|
||||
startActivityForResult(intent, 0x101);
|
||||
}
|
||||
@ -319,7 +302,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
Intent intent = new Intent(getContext(), PictureActivity.class);
|
||||
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalFile.getAbsolutePath());
|
||||
intent.putExtra(Constant.INTENT_VIDEO_ORATATION, 0);
|
||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
intent.putExtra("poiEntity", showPoiEntity);
|
||||
startActivityForResult(intent, 0x101);
|
||||
break;
|
||||
@ -553,7 +536,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
Intent intentPanorama = new Intent(getActivity(), PictureActivity.class);
|
||||
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||
intentPanorama.putExtra(Constant.INTENT_VIDEO_PATH, finalFile.getAbsolutePath());
|
||||
intentPanorama.putExtra(Constant.INTENT_VIDEO_ORATATION, 0);
|
||||
intentPanorama.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
startActivityForResult(intentPanorama, 0x101);
|
||||
return false;
|
||||
}
|
||||
|
@ -15,18 +15,14 @@ import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 设置页面的fragment
|
||||
*/
|
||||
public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivSet;
|
||||
private Switch switchTrafficRemind;
|
||||
private Switch switchInform;
|
||||
private Switch switchAutoSave;
|
||||
private Switch switchRealUpload;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
private SharedPreferences navInfo;
|
||||
|
||||
public static SetFragment newInstance(Bundle bundle) {
|
||||
SetFragment fragment = new SetFragment();
|
||||
@ -46,21 +42,21 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
navInfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
SharedPreferences navInfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
navInfoEditor = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
||||
ivSet = findViewById(R.id.iv_set);
|
||||
ImageView ivSet = findViewById(R.id.iv_set);
|
||||
ivSet.setOnClickListener(this);
|
||||
switchRealUpload = findViewById(R.id.switch_real_upload);
|
||||
Switch switchRealUpload = findViewById(R.id.switch_real_upload);
|
||||
switchRealUpload.setChecked(navInfo.getBoolean("switchRealUpload", false));
|
||||
switchRealUpload.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
//控制开关字体颜色
|
||||
navInfoEditor.putBoolean("switchRealUpload", b);
|
||||
navInfoEditor.commit();
|
||||
navInfoEditor.apply();
|
||||
}
|
||||
});
|
||||
switchAutoSave = findViewById(R.id.switch_autosave);
|
||||
Switch switchAutoSave = findViewById(R.id.switch_autosave);
|
||||
switchAutoSave.setChecked(navInfo.getBoolean("switchAutoSave", false));
|
||||
switchAutoSave.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
@ -70,7 +66,7 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
navInfoEditor.commit();
|
||||
}
|
||||
});
|
||||
switchInform = findViewById(R.id.switch_inform);
|
||||
Switch switchInform = findViewById(R.id.switch_inform);
|
||||
switchInform.setChecked(navInfo.getBoolean("switchInform", false));
|
||||
switchInform.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
@ -80,7 +76,7 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
navInfoEditor.commit();
|
||||
}
|
||||
});
|
||||
switchTrafficRemind = findViewById(R.id.switch_traffic_remind);
|
||||
Switch switchTrafficRemind = findViewById(R.id.switch_traffic_remind);
|
||||
switchTrafficRemind.setChecked(navInfo.getBoolean("switchTrafficRemind", false));
|
||||
switchTrafficRemind.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
@ -94,10 +90,8 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_set:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_set) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
@ -25,7 +24,6 @@ import com.kongzue.dialog.v3.BottomMenu;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.adapter.StaySubmitAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
@ -37,25 +35,19 @@ import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.PoiSaveUtils;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 记录-待提交的fragment
|
||||
*/
|
||||
public class StaySubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||
private RecyclerView stayXrv;
|
||||
private CheckBox cbSelect;
|
||||
private TextView tvDelete;
|
||||
private Button btnStaySubmit;
|
||||
private StaySubmitAdapter staySubmitAdapter;
|
||||
private PoiDatabase roadDatabase;
|
||||
private PoiDao roadDao;
|
||||
private TextView tvStayType;
|
||||
private List<PoiEntity> roadEntities;
|
||||
@ -87,20 +79,20 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
roadDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||
roadDao = roadDatabase.getPoiDao();
|
||||
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
||||
clStayType.setOnClickListener(this::onClick);
|
||||
stayXrv = (RecyclerView) findViewById(R.id.stay_xrv);
|
||||
cbSelect = (CheckBox) findViewById(R.id.cb_select);
|
||||
cbSelect.setOnClickListener(this::onClick);
|
||||
tvDelete = (TextView) findViewById(R.id.tv_delete);
|
||||
tvDelete.setOnClickListener(this::onClick);
|
||||
clStayType.setOnClickListener(this);
|
||||
RecyclerView stayXrv =findViewById(R.id.stay_xrv);
|
||||
CheckBox cbSelect =findViewById(R.id.cb_select);
|
||||
cbSelect.setOnClickListener(this);
|
||||
TextView tvDelete =findViewById(R.id.tv_delete);
|
||||
tvDelete.setOnClickListener(this);
|
||||
tvStayType = findViewById(R.id.tv_stay_type);
|
||||
btnStaySubmit = (Button) findViewById(R.id.btn_stay_submit);
|
||||
btnStaySubmit.setOnClickListener(this::onClick);
|
||||
Button btnStaySubmit =findViewById(R.id.btn_stay_submit);
|
||||
btnStaySubmit.setOnClickListener(this);
|
||||
stayXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
stayXrv.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||
stayXrv.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getContext()), DividerItemDecoration.VERTICAL));
|
||||
staySubmitAdapter = new StaySubmitAdapter(getContext());
|
||||
stayXrv.setAdapter(staySubmitAdapter);
|
||||
//点击条目跳转
|
||||
@ -164,7 +156,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他"}, new OnMenuItemClickListener() {
|
||||
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
switch (index) {
|
||||
@ -200,7 +192,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
|
||||
case R.id.tv_delete:
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
initRequest(staySubmitAdapter.getAllRoad());
|
||||
@ -238,9 +230,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void run() {
|
||||
ArrayList<PoiEntity> poiEntities = new ArrayList<>();
|
||||
synchronized (allRoad) {
|
||||
Iterator iterator = allRoad.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||
for (PoiEntity poiEntity : allRoad) {
|
||||
if (poiEntity.isChecked()) {
|
||||
poiEntities.add(poiEntity);
|
||||
}
|
||||
@ -259,10 +249,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
auditIds += poiEntities.get(i).getBodyId()+",";
|
||||
}
|
||||
}
|
||||
if (taskIds!=null&&!taskIds.equals("")){
|
||||
if (!taskIds.equals("")){
|
||||
taskIds = taskIds.substring(0,taskIds.length() - 1);
|
||||
}
|
||||
if (auditIds!=null&&!auditIds.equals("")){
|
||||
if (!auditIds.equals("")){
|
||||
auditIds = auditIds.substring(0,auditIds.length() - 1);
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
@ -314,7 +304,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoder();
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -29,12 +29,12 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发现-任务说明
|
||||
*/
|
||||
public class TaskExplainFragment extends BaseFragment implements View.OnClickListener {
|
||||
private ImageView ivFindTaskExplain;
|
||||
private XRecyclerView taskExplainRecycle;
|
||||
|
||||
private TaskExplainAdapter taskExplainAdapter;
|
||||
@ -56,9 +56,9 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
|
||||
ImageView ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
|
||||
taskExplainRecycle =findViewById(R.id.task_explain_recycler);
|
||||
ivFindTaskExplain.setOnClickListener(this::onClick);
|
||||
ivFindTaskExplain.setOnClickListener(this);
|
||||
|
||||
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
//下划线
|
||||
@ -166,11 +166,8 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_find_task_explain:
|
||||
getActivity().finish();
|
||||
break;
|
||||
|
||||
if (v.getId() == R.id.iv_find_task_explain) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,15 +29,14 @@ import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发现页面的任务说明的点击条目跳转第二个页面
|
||||
*/
|
||||
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivTaskExplain2;
|
||||
private XRecyclerView taskExplain2Recycler;
|
||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans2;
|
||||
private TaskExplainAdapter2 taskExplainAdapter2;
|
||||
private int taskExplainPage = 1;
|
||||
|
||||
@ -56,9 +55,9 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
ivTaskExplain2 = findViewById(R.id.iv_task_explain2_finish);
|
||||
ImageView ivTaskExplain2 = findViewById(R.id.iv_task_explain2_finish);
|
||||
taskExplain2Recycler = findViewById(R.id.task_explain2_recycler);
|
||||
ivTaskExplain2.setOnClickListener(this::onClick);
|
||||
ivTaskExplain2.setOnClickListener(this);
|
||||
taskExplain2Recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
//下划线
|
||||
// taskExplain2Recycler.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
|
||||
@ -97,13 +96,13 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
dataBeans2 = new ArrayList<>();
|
||||
ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans2 = new ArrayList<>();
|
||||
initNetWork2();
|
||||
}
|
||||
|
||||
private void initNetWork2() {
|
||||
showLoadingDialog();
|
||||
String id = getActivity().getIntent().getStringExtra("id");
|
||||
String id = Objects.requireNonNull(getActivity()).getIntent().getStringExtra("id");
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", id);
|
||||
httpParams.put("pageNum", taskExplainPage);
|
||||
@ -124,7 +123,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
}
|
||||
taskExplain2Recycler.refreshComplete();
|
||||
taskExplain2Recycler.loadMoreComplete();
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,13 +30,13 @@ import org.json.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 发现-任务专区
|
||||
*/
|
||||
public class TaskPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView mIvFindTask;
|
||||
private XRecyclerView taskRecycler;
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||
@ -57,8 +57,8 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
mIvFindTask = findViewById(R.id.iv_find_task);
|
||||
mIvFindTask.setOnClickListener(this::onClick);
|
||||
ImageView mIvFindTask = findViewById(R.id.iv_find_task);
|
||||
mIvFindTask.setOnClickListener(this);
|
||||
taskRecycler = findViewById(R.id.task_recycler);
|
||||
taskRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
@ -194,10 +194,8 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_find_task:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_find_task) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ActivityInfo;
|
||||
@ -10,13 +9,11 @@ import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Point;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
@ -25,11 +22,9 @@ import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.github.lazylibrary.util.DensityUtil;
|
||||
import com.google.gson.Gson;
|
||||
@ -44,7 +39,6 @@ import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.kongzue.dialog.v3.ShareDialog;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -52,14 +46,11 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||
import com.navinfo.outdoor.bean.RoadExtend;
|
||||
import com.navinfo.outdoor.bean.UserBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
@ -194,13 +185,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
dragView = findViewById(R.id.dragView);
|
||||
frameLayout = findViewById(R.id.frame_layout);
|
||||
ivRefish = findViewById(R.id.iv_refrish);
|
||||
ivRefish.setOnClickListener(this::onClick);
|
||||
ivRefish.setOnClickListener(this);
|
||||
ivFilter = findViewById(R.id.iv_filter);
|
||||
ivFilter.setOnClickListener(this::onClick);
|
||||
ivFilter.setOnClickListener(this);
|
||||
ivSubmit = findViewById(R.id.iv_submit);
|
||||
ivSubmit.setOnClickListener(this::onClick);
|
||||
ivSubmit.setOnClickListener(this);
|
||||
ivMessage = findViewById(R.id.iv_message);
|
||||
ivMessage.setOnClickListener(this::onClick);
|
||||
ivMessage.setOnClickListener(this);
|
||||
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
||||
tencentMap = treasureMap.getMap();
|
||||
MapManager.getInstance().init(getActivity(), tencentMap);
|
||||
@ -224,13 +215,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
//地图放大
|
||||
ivZoomAdd = (ImageView) findViewById(R.id.iv_zoom_add);
|
||||
ivZoomAdd.setOnClickListener(this::onClick);
|
||||
ivZoomAdd.setOnClickListener(this);
|
||||
//地图缩小
|
||||
ivZoomDel = (ImageView) findViewById(R.id.iv_zoom_del);
|
||||
ivZoomDel.setOnClickListener(this::onClick);
|
||||
ivZoomDel.setOnClickListener(this);
|
||||
//回到定位位置
|
||||
ivLocation = findViewById(R.id.iv_location);
|
||||
ivLocation.setOnClickListener(this::onClick);
|
||||
ivLocation.setOnClickListener(this);
|
||||
//样式
|
||||
tencentMap.setMapStyle(2);
|
||||
//启用3d视图
|
||||
@ -281,9 +272,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
});
|
||||
// 设置地图宽高为屏幕的宽高
|
||||
int[] widtHeight = DensityUtil.getDeviceInfo(getActivity());
|
||||
treasureMap.getLayoutParams().width = widtHeight[0];
|
||||
treasureMap.getLayoutParams().height = widtHeight[1];
|
||||
int[] widthHeight = DensityUtil.getDeviceInfo(getActivity());
|
||||
treasureMap.getLayoutParams().width = widthHeight[0];
|
||||
treasureMap.getLayoutParams().height = widthHeight[1];
|
||||
|
||||
}
|
||||
|
||||
@ -323,7 +314,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
|
||||
private class NestedScrollableViewHelper extends ScrollableViewHelper {
|
||||
private static class NestedScrollableViewHelper extends ScrollableViewHelper {
|
||||
public int getScrollableViewScrollPosition(View mScrollableView, boolean isSlidingUp) {
|
||||
if (mScrollableView instanceof NestedScrollView) {
|
||||
if (isSlidingUp) {
|
||||
@ -383,8 +374,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
private void initList(TencentLocation tencentLocation) {
|
||||
int task_type = Constant.TASK_TYPE;
|
||||
int limit_type = Constant.LIMIT_TTPE;
|
||||
int taskStatus = Constant.TASK_STASTUS;
|
||||
int limit_type = Constant.LIMIT_TYPE;
|
||||
int taskStatus = Constant.TASK_STARTUP;
|
||||
if (taskStatus == 1 || taskStatus == 2 || taskStatus == 3) {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||
@ -447,13 +438,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
latLng = GeometryTools.createLatLng(geo);
|
||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||
BitmapDescriptor bitmapLine = null;
|
||||
if (Integer.valueOf(listBean.getType()) == 3) {//poi录像
|
||||
if (listBean.getType() == 3) {//poi录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
||||
} else if (Integer.valueOf(listBean.getType()) == 4) {//道路录像
|
||||
} else if (listBean.getType() == 4) {//道路录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||
}
|
||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||
// 构造 PolylineOpitons
|
||||
// 构造 PolylineOptions
|
||||
PolylineOptions polylineOptions = new PolylineOptions()
|
||||
.addAll(latLineString)
|
||||
// 折线设置圆形线头
|
||||
@ -492,19 +483,18 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
||||
double x = centroid.getX();
|
||||
double y = centroid.getY();
|
||||
if (centroid != null) {
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(y);
|
||||
latLng.setLongitude(x);
|
||||
}
|
||||
/* if (latPolygon != null && latPolygon.size() > 0) {
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(y);
|
||||
latLng.setLongitude(x);
|
||||
/* if (latPolygon != null && latPolygon.size() > 0) {
|
||||
latLng = latPolygon.get(0);
|
||||
}*/
|
||||
}
|
||||
switch (Integer.valueOf(list.get(i).getType())) {
|
||||
switch (list.get(i).getType()) {
|
||||
case 1://poi
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
|
||||
poiDescriptor.getFormater().setScale(50);
|
||||
//poiDescriptor.getFormater().setScale(50);
|
||||
assert latLng != null;
|
||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -516,6 +506,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 2://充电站
|
||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg1);
|
||||
assert latLng != null;
|
||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -528,6 +519,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 3://poi录像
|
||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
|
||||
assert latLng != null;
|
||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -539,6 +531,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 4://道路录像
|
||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||
assert latLng != null;
|
||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -551,6 +544,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 5://其他
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
|
||||
assert latLng != null;
|
||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -562,6 +556,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case 6://面状任务
|
||||
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_bg1);
|
||||
assert latLng != null;
|
||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
@ -681,6 +676,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
MapManager.getInstance().moveLatlng(latLng, null);
|
||||
if (bigMarker == null) {
|
||||
assert latLng != null;
|
||||
bigMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(descriptor)
|
||||
.anchor(0.5f, 1f)
|
||||
.flat(true)
|
||||
@ -696,7 +692,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
sliding_layout.setPanelHeight(0);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
frameLayout.setVisibility(View.VISIBLE);
|
||||
setMainButtonVisiable(View.GONE);
|
||||
setMainButtonVisitable(View.GONE);
|
||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
Bundle bundle = new Bundle();
|
||||
/* bundle.putBoolean("boolean",aBoolean);*/
|
||||
@ -709,9 +705,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
private void initThread() {
|
||||
int taskStatus = Constant.TASK_STASTUS;
|
||||
int taskStatus = Constant.TASK_STARTUP;
|
||||
int type = Constant.TASK_TYPE;
|
||||
int limit = Constant.LIMIT_TTPE;
|
||||
int limit = Constant.LIMIT_TYPE;
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -784,21 +780,19 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
||||
double x = centroid.getX();
|
||||
double y = centroid.getY();
|
||||
if (centroid != null) {
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(y);
|
||||
latLng.setLongitude(x);
|
||||
}
|
||||
/*if (latPolygon != null && latPolygon.size() > 0) {
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(y);
|
||||
latLng.setLongitude(x);
|
||||
/*if (latPolygon != null && latPolygon.size() > 0) {
|
||||
latLng = latPolygon.get(0);
|
||||
}*/
|
||||
}
|
||||
} else {
|
||||
if (allTaskStatus.get(i).getX() != null && allTaskStatus.get(i).getY() != null) {
|
||||
latLng = new LatLng(Double.valueOf(allTaskStatus.get(i).getY()), Double.valueOf(allTaskStatus.get(i).getX()));
|
||||
latLng = new LatLng(Double.parseDouble(allTaskStatus.get(i).getY()), Double.parseDouble(allTaskStatus.get(i).getX()));
|
||||
}
|
||||
}
|
||||
switch (Integer.valueOf(poiEntity.getType())) {
|
||||
switch (poiEntity.getType()) {
|
||||
case 1://poi
|
||||
BitmapDescriptor poiDescriptor = null;
|
||||
if (poiEntity.getTaskStatus() == 1) {
|
||||
@ -824,6 +818,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else {
|
||||
chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
||||
}
|
||||
assert latLng != null;
|
||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor)
|
||||
.flat(true)
|
||||
.anchor(0.5f, 1f)
|
||||
@ -930,7 +925,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||
LatLng newPoiLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng newPoiLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
// showPoiMarkerByType(1, newPoiLatLng);
|
||||
showSlidingFragment(poiFragment);
|
||||
initRemovePoiSharePre();
|
||||
@ -946,7 +941,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||
LatLng newPoiLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng newPoiLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
// showPoiMarkerByType(4, newPoiLatLng);
|
||||
showSlidingFragment(chargingStationFragment);
|
||||
initRemovePoiSharePre();
|
||||
@ -962,7 +957,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||
LatLng newPoiLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng newPoiLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
// showPoiMarkerByType(2, newPoiLatLng);
|
||||
showSlidingFragment(poiVideoFragment);
|
||||
initRemovePoiSharePre();
|
||||
@ -978,7 +973,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||
LatLng newPoiLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng newPoiLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
// showPoiMarkerByType(3, newPoiLatLng);
|
||||
showSlidingFragment(roadFragment);
|
||||
initRemovePoiSharePre();
|
||||
@ -994,7 +989,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||
LatLng newPoiLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
LatLng newPoiLatLng = new LatLng(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
// showPoiMarkerByType(5, newPoiLatLng);
|
||||
showSlidingFragment(otherFragment);
|
||||
initRemovePoiSharePre();
|
||||
@ -1094,10 +1089,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
initCheckedMarker(Constant.OTHER_WORD);
|
||||
}
|
||||
}*/ else if (data.what == Constant.TREASURE_FRAGMENT) {//抽屉界面的展示和隐藏
|
||||
if ((boolean) data.obj == true) {
|
||||
if ((boolean) data.obj) {
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
sliding_layout.setPanelHeight(0);
|
||||
setMainButtonVisiable(View.VISIBLE);
|
||||
setMainButtonVisitable(View.VISIBLE);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
if (bigMarker != null) {
|
||||
bigMarker.setVisible(false);
|
||||
@ -1107,8 +1102,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
}
|
||||
} else if (data.what == Constant.MAIN_BUTTON_VISIABLE) {//控制主界面各个按钮显隐状态的what值
|
||||
setMainButtonVisiable((Integer) data.obj);
|
||||
} else if (data.what == Constant.MAIN_BUTTON_VISITABLE) {//控制主界面各个按钮显隐状态的what值
|
||||
setMainButtonVisitable((Integer) data.obj);
|
||||
} else if (data.what == Constant.GATHER_GET_RETURN) {//item 点击页面的返回事件的处理
|
||||
if ((boolean) data.obj) {
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
@ -1116,7 +1111,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
} else {
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
setMainButtonVisiable(View.VISIBLE);
|
||||
setMainButtonVisitable(View.VISIBLE);
|
||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
fragmentTransaction.remove(gatherGetFragment);
|
||||
fragmentTransaction.commit();
|
||||
@ -1129,7 +1124,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
} else if (data.what == Constant.CHARGING_STATION) {//充电站的充电桩-新增
|
||||
if ((HashMap<String, Object>) data.obj != null) {
|
||||
if (null != data.obj) {
|
||||
HashMap<String, Object> stationHashMap = (HashMap<String, Object>) data.obj;
|
||||
String showStation = (String) stationHashMap.get("showStation");
|
||||
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) stationHashMap.get("chargingPileEntity");
|
||||
@ -1226,15 +1221,15 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
/**
|
||||
* 控制主界面各个按钮的显示状态
|
||||
*/
|
||||
private void setMainButtonVisiable(int visiable) {
|
||||
ivZoomAdd.setVisibility(visiable);
|
||||
ivZoomDel.setVisibility(visiable);
|
||||
ivLocation.setVisibility(visiable);
|
||||
ivRefish.setVisibility(visiable);
|
||||
cbMapType.setVisibility(visiable);
|
||||
ivSubmit.setVisibility(visiable);
|
||||
ivFilter.setVisibility(visiable);
|
||||
ivMessage.setVisibility(visiable);
|
||||
private void setMainButtonVisitable(int visitable) {
|
||||
ivZoomAdd.setVisibility(visitable);
|
||||
ivZoomDel.setVisibility(visitable);
|
||||
ivLocation.setVisibility(visitable);
|
||||
ivRefish.setVisibility(visitable);
|
||||
cbMapType.setVisibility(visitable);
|
||||
ivSubmit.setVisibility(visitable);
|
||||
ivFilter.setVisibility(visitable);
|
||||
ivMessage.setVisibility(visitable);
|
||||
}
|
||||
|
||||
/* private void initPoiMarker(LatLng latLng) {
|
||||
@ -1416,28 +1411,18 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
List<ShareDialog.Item> itemList = new ArrayList<>();
|
||||
if (upload.contains(1)) {
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
|
||||
} else {
|
||||
|
||||
}
|
||||
if (upload.contains(2)) {
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
||||
} else {
|
||||
|
||||
}
|
||||
if (upload.contains(3)) {
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.poi_video, "POI录像"));
|
||||
} else {
|
||||
|
||||
}
|
||||
if (upload.contains(4)) {
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
||||
} else {
|
||||
|
||||
}
|
||||
if (upload.contains(5)) {
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
||||
} else {
|
||||
|
||||
}
|
||||
Bundle bundle = new Bundle();
|
||||
PoiEntity poiEntity = new PoiEntity();
|
||||
@ -1625,50 +1610,38 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
if (poiEntity.getTaskStatus()==1){//已领取
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity, true);
|
||||
}else {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
switch (poiEntity.getType()) {
|
||||
case 1:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity,false);
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||
showSlidingFragment(poiFragment);
|
||||
break;
|
||||
case 2:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity,false);
|
||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||
showSlidingFragment(chargingStationFragment);
|
||||
break;
|
||||
case 3:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity,false);
|
||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||
showSlidingFragment(poiVideoFragment);
|
||||
break;
|
||||
case 4:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity,false);
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||
showSlidingFragment(roadFragment);
|
||||
break;
|
||||
case 5:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiEntity,false);
|
||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||
showSlidingFragment(otherFragment);
|
||||
@ -1693,7 +1666,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
poiListEntity.setDist(listBean.getDist() + "");
|
||||
poiListEntity.setDescribe(listBean.getMemo());
|
||||
poiListEntity.setCreateTime(listBean.getEndDate());
|
||||
poiListEntity.setType(Integer.valueOf(listBean.getType()));
|
||||
poiListEntity.setType(listBean.getType());
|
||||
String geo = listBean.getGeo();
|
||||
poiListEntity.setGeoWkt(geo);
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
@ -1710,9 +1683,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||
}
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
marker.remove();
|
||||
initMarker(poiListEntity, true);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "数据为空", Toast.LENGTH_SHORT).show();
|
||||
@ -1739,8 +1710,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
/**
|
||||
* 获取屏幕中心点位置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public LatLng getMapCenterPoint() {
|
||||
// int left = treasureMap.getLeft();
|
||||
@ -1750,7 +1719,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
// // 获得屏幕点击的位置
|
||||
// int x = (int) (treasureMap.getX() + (right - left) / 2);
|
||||
// int y = (int) (treasureMap.getY() + (bottom - top) / 2);
|
||||
// Projection projection = tencentMap.getProjection();
|
||||
// Projection projection = tangentMap.getProjection();
|
||||
// LatLng pt = projection.fromScreenLocation(new Point(x, y));
|
||||
return tencentMap.getCameraPosition().target;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import com.navinfo.outdoor.util.PhotoUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -47,9 +48,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
|
||||
private ImageView ivAttestation2;
|
||||
private ImageView ivAttestation1;
|
||||
private ImageView ivAttestation;
|
||||
private Button btnAttestation;
|
||||
private ArrayList<NameAuthenticationBean> authenticationBeans;
|
||||
private EditText etAttestationName;
|
||||
private EditText etNamePhone;
|
||||
private ImageView ivAttestation3;
|
||||
@ -82,7 +80,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
authenticationBeans = new ArrayList<>();
|
||||
ArrayList<NameAuthenticationBean> authenticationBeans = new ArrayList<>();
|
||||
|
||||
|
||||
}
|
||||
@ -90,7 +88,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivAttestation = findViewById(R.id.iv_attestation);
|
||||
ImageView ivAttestation = findViewById(R.id.iv_attestation);
|
||||
ivAttestation.setOnClickListener(this);
|
||||
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
||||
ivAttestation1.setOnClickListener(this);
|
||||
@ -98,9 +96,9 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
ivAttestation2.setOnClickListener(this);
|
||||
ivAttestation3 = findViewById(R.id.iv_attestation3);
|
||||
ivAttestation3.setOnClickListener(this);
|
||||
btnAttestation = (Button) findViewById(R.id.btn_attestation);
|
||||
btnAttestation.setOnClickListener(this::onClick);
|
||||
linearHint = findViewById(R.id.linear_hint);
|
||||
Button btnAttestation = (Button) findViewById(R.id.btn_attestation);
|
||||
btnAttestation.setOnClickListener(this);
|
||||
LinearLayout linearHint = findViewById(R.id.linear_hint);
|
||||
etAttestationName = (EditText) findViewById(R.id.et_attestationName);
|
||||
etNamePhone = (EditText) findViewById(R.id.et_namePhone);
|
||||
ivHera1 = (ImageView) findViewById(R.id.iv_hera1);
|
||||
@ -109,11 +107,11 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
tvCard2 = (TextView) findViewById(R.id.tv_card2);
|
||||
ivHera3 = (ImageView) findViewById(R.id.iv_hera3);
|
||||
tvCard3 = (TextView) findViewById(R.id.tv_card3);
|
||||
tvTitle = findViewById(R.id.tv_title);
|
||||
userAttestView = findViewById(R.id.user_attestation_view);
|
||||
linearLayout = findViewById(R.id.ll_pic);//身份证照片
|
||||
TextView tvTitle = findViewById(R.id.tv_title);
|
||||
View userAttestView = findViewById(R.id.user_attestation_view);
|
||||
LinearLayout linearLayout = findViewById(R.id.ll_pic);//身份证照片
|
||||
useCamera = findViewById(R.id.user_attestation_camera);
|
||||
useCamera.setOnClickListener(this::onClick);
|
||||
useCamera.setOnClickListener(this);
|
||||
if (Constant.AUDITSTATUS==-1){//审核中
|
||||
if (Constant.NAME!=null&&Constant.ID_NUM!=null){
|
||||
tvTitle.setText("1.审核中");
|
||||
@ -155,7 +153,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_attestation:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.iv_attestation1:
|
||||
Intent ivAttestationIntent1 = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
@ -176,7 +174,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
startActivityForResult(ivAttestationIntent3, 123);
|
||||
break;
|
||||
case R.id.btn_attestation:
|
||||
if (etAttestationName.getText().toString() == null || etAttestationName.getText().toString().equals("")) {
|
||||
if (etAttestationName.getText().toString().equals("")) {
|
||||
Toast.makeText(getActivity(), "姓名不能为空,请输入姓名", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -184,7 +182,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
Toast.makeText(getActivity(), "请输入中文名字", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (!checkNum(etNamePhone.getText().toString().trim())) {
|
||||
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||
Toast.makeText(getActivity(), "身份证号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -202,16 +200,14 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
/***
|
||||
*
|
||||
*/
|
||||
public boolean checkNum(String text) {
|
||||
Pattern patternSfzhm1 = Pattern
|
||||
public boolean checkNumber(String text) {
|
||||
Pattern patternSachs1 = Pattern
|
||||
.compile("^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$");
|
||||
Pattern patternSfzhm2 = Pattern
|
||||
Pattern patternSachs2 = Pattern
|
||||
.compile("^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$");
|
||||
Matcher matcherSfzhm1 = patternSfzhm1.matcher(text);
|
||||
Matcher matcherSfzhm2 = patternSfzhm2.matcher(text);
|
||||
if (!matcherSfzhm1.find() && !matcherSfzhm2.find())
|
||||
return false;
|
||||
else return true;
|
||||
Matcher matcherSachs1 = patternSachs1.matcher(text);
|
||||
Matcher matcherSachs2 = patternSachs2.matcher(text);
|
||||
return !matcherSachs1.find() && !matcherSachs2.find();
|
||||
|
||||
}
|
||||
|
||||
@ -226,11 +222,12 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
}
|
||||
|
||||
private void nameAuthentication() {
|
||||
if (etAttestationName.getText().toString() == null || etAttestationName.getText().toString().equals("")) {
|
||||
|
||||
if (etAttestationName.getText().toString().equals("")) {
|
||||
Toast.makeText(getActivity(), "姓名不能为空,请输入姓名", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (!checkNum(etNamePhone.getText().toString().trim())) {
|
||||
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||
Toast.makeText(getActivity(), "身份证错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@ -274,7 +271,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Constant.NAME=attestationName;
|
||||
@ -286,7 +283,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
});
|
||||
}else {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
|
@ -31,15 +31,16 @@ import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 提现页面的fragment
|
||||
*/
|
||||
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivWithDraw;
|
||||
private TextView tvText;
|
||||
private TextView tvAll, tvUnit, tvAlready, tvTotal;
|
||||
private Button btWithdraw;
|
||||
private TextView tvUnit;
|
||||
private TextView tvAlready;
|
||||
private TextView tvTotal;
|
||||
private double canExchangePrice;
|
||||
private EditText etAllPrice;
|
||||
private TextView poiPushMoney;
|
||||
@ -76,12 +77,12 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
tvUnit = findViewById(R.id.tv_unit);//可提现
|
||||
tvAlready = findViewById(R.id.tv_already);//已提现
|
||||
tvTotal = findViewById(R.id.tv_total);//总资产
|
||||
tvAll = findViewById(R.id.tv_all);
|
||||
TextView tvAll = findViewById(R.id.tv_all);
|
||||
tvAll.setOnClickListener(this::onClick);
|
||||
etAllPrice = findViewById(R.id.et_allPrice);
|
||||
ivWithDraw = findViewById(R.id.iv_withdraw);
|
||||
ImageView ivWithDraw = findViewById(R.id.iv_withdraw);
|
||||
ivWithDraw.setOnClickListener(this);
|
||||
tvText = findViewById(R.id.tv_text);
|
||||
TextView tvText = findViewById(R.id.tv_text);
|
||||
tvText.setOnClickListener(this::onClick);
|
||||
checkBox = findViewById(R.id.checkBox);
|
||||
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@ -97,7 +98,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
});
|
||||
btWithdraw = findViewById(R.id.button);
|
||||
Button btWithdraw = findViewById(R.id.button);
|
||||
btWithdraw.setOnClickListener(this::onClick);
|
||||
poiPushMoney = (TextView) findViewById(R.id.poi_push_money);
|
||||
poiReportMoney = (TextView) findViewById(R.id.poi_report_money);
|
||||
@ -164,7 +165,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_withdraw:
|
||||
getActivity().finish();
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
case R.id.tv_text:
|
||||
Intent intentText = new Intent(getActivity(), FragmentManagement.class);
|
||||
@ -174,8 +175,8 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
case R.id.button:
|
||||
String price = etAllPrice.getText().toString().trim();
|
||||
if (price!=null&&!price.equals("")){
|
||||
double aDouble = Double.valueOf(price);
|
||||
if (!price.equals("")){
|
||||
double aDouble = Double.parseDouble(price);
|
||||
if (aDouble<10 ){
|
||||
Toast.makeText(getActivity(), "提现金额不能低于10元", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@ -191,7 +192,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
if (Constant.ID_NUMBER != null) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否提取到" + Constant.ID_NUMBER.substring(Constant.ID_NUMBER.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.ID_NUMBER.substring(Constant.ID_NUMBER.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
immediatelyPrice();
|
||||
@ -232,7 +233,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
if (response.getCode() == 200) {
|
||||
String unit = tvUnit.getText().toString();
|
||||
String price = etAllPrice.getText().toString();
|
||||
double v = Double.valueOf(unit) - Double.valueOf(price);
|
||||
double v = Double.parseDouble(unit) - Double.parseDouble(price);
|
||||
String s = String.format("%.2f", v).toString();
|
||||
tvUnit.setText(s);
|
||||
}else {
|
||||
|
@ -24,13 +24,13 @@ import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 提现记录:
|
||||
*/
|
||||
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private ImageView ivWithdraw;
|
||||
private XRecyclerView rxlWithdraw;
|
||||
private WithdrawalAdapter withdrawalAdapter;
|
||||
private int withPage = 1;
|
||||
@ -49,7 +49,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivWithdraw = findViewById(R.id.iv_withdraw);
|
||||
ImageView ivWithdraw = findViewById(R.id.iv_withdraw);
|
||||
ivWithdraw.setOnClickListener(this);
|
||||
rxlWithdraw = (XRecyclerView) findViewById(R.id.rxl_withdraw);
|
||||
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@ -120,10 +120,8 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_withdraw:
|
||||
getActivity().finish();
|
||||
break;
|
||||
if (v.getId() == R.id.iv_withdraw) {
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,34 +16,30 @@ import java.util.List;
|
||||
public interface ChargingPileDao {
|
||||
/**
|
||||
* 查询
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM pile")
|
||||
List<ChargingPileEntity> getChargingPile();
|
||||
/**
|
||||
* 查询
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM pile where fid = :fid")
|
||||
List<ChargingPileEntity> getChargingPileByStationId(String fid);
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param chargingPileEntities
|
||||
|
||||
*/
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
long[] insertChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Update
|
||||
void updateChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||
@ -54,7 +50,6 @@ public interface ChargingPileDao {
|
||||
void deleteChargingFidPileEntity(String fid);
|
||||
/**
|
||||
*删除
|
||||
* @param chargingPileEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteAll(List<ChargingPileEntity> chargingPileEntities);
|
||||
@ -67,7 +62,6 @@ public interface ChargingPileDao {
|
||||
|
||||
/**
|
||||
* 降序排列
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM pile ORDER BY pileId DESC")
|
||||
List<ChargingPileEntity> getAllChargingPileEntity();
|
||||
|
@ -101,7 +101,6 @@ public class ChargingPileEntity implements Serializable {
|
||||
public void setCp_availableState(int cp_availableState) {
|
||||
this.cp_availableState = cp_availableState;
|
||||
}
|
||||
|
||||
public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
@ -16,14 +16,12 @@ import java.util.List;
|
||||
public interface PoiDao {
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM poi")
|
||||
List<PoiEntity> getAllPoi();
|
||||
|
||||
@Query("SELECT * FROM poi where taskStatus > 1 and type!=6")
|
||||
List<PoiEntity> getAllPoiByRecoder();
|
||||
List<PoiEntity> getAllPoiByRecoded();
|
||||
|
||||
@Query("SELECT * FROM poi where type=:type")
|
||||
List<PoiEntity> getAllPoiType(int type);
|
||||
@ -43,40 +41,30 @@ public interface PoiDao {
|
||||
PoiEntity getTaskIdPoiEntity(int taskId);
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param poiEntities
|
||||
*/
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insertPoiEntity(PoiEntity... poiEntities);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param poiEntities
|
||||
*/
|
||||
@Update
|
||||
void updatePoiEntity(PoiEntity... poiEntities);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param poiEntities
|
||||
*/
|
||||
@Delete
|
||||
void deletePoiEntity(PoiEntity... poiEntities);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param poiEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteAll(List<PoiEntity> poiEntities);
|
||||
|
||||
/**
|
||||
* 根据条件删除
|
||||
*
|
||||
* @param taskStatus
|
||||
*/
|
||||
@Query("DELETE FROM poi where taskStatus=:taskStatus")
|
||||
void deleteFormName(int taskStatus);
|
||||
@ -84,8 +72,6 @@ public interface PoiDao {
|
||||
|
||||
/**
|
||||
* 根据条件删除
|
||||
*
|
||||
* @param taskId
|
||||
*/
|
||||
@Query("DELETE FROM poi where taskId=:taskId")
|
||||
void deleteFormTaskID(int taskId);
|
||||
@ -98,8 +84,6 @@ public interface PoiDao {
|
||||
|
||||
/**
|
||||
* 降序排列
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Query("SELECT * FROM poi ORDER BY ID DESC")
|
||||
List<PoiEntity> getAllPoiEntity();
|
||||
|
@ -24,7 +24,6 @@ public class APKVersionCodeUtils {
|
||||
* 获取版本号名称
|
||||
*
|
||||
* @param context 上下文
|
||||
* @return
|
||||
*/
|
||||
public static String getVerName(Context context) {
|
||||
String verName = "";
|
||||
|
BIN
app/src/main/res/drawable/icon_delete.png
Normal file
BIN
app/src/main/res/drawable/icon_delete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 224 B |
@ -20,14 +20,14 @@
|
||||
|
||||
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
||||
android:id="@+id/iv_map"
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="157dp"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintHeight_percent="0.3"
|
||||
app:layout_constraintHeight_percent="0.4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.3" />
|
||||
app:layout_constraintWidth_percent="0.4" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="切换"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/capuret_picture"
|
||||
android:id="@+id/capture_picture"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -65,7 +65,7 @@
|
||||
android:background="@drawable/uploding_shape"
|
||||
android:text="结束采集"
|
||||
android:textColor="@color/colorBlue"
|
||||
app:layout_constraintBottom_toBottomOf="@id/capuret_picture"
|
||||
app:layout_constraintLeft_toRightOf="@id/capuret_picture"
|
||||
app:layout_constraintBottom_toBottomOf="@id/capture_picture"
|
||||
app:layout_constraintLeft_toRightOf="@id/capture_picture"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -6,17 +6,27 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_delete"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/icon_delete"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:text="众包录像 测试3"
|
||||
android:textColor="#333"
|
||||
android:layout_margin="20dp"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_delete" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_money"
|
||||
@ -34,7 +44,7 @@
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="到期时间:"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
||||
@ -70,47 +80,53 @@
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_describe">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel_get"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_weight="1"
|
||||
android:text="取消领取" />
|
||||
android:text="取消领取"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_get_task"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="0dp"
|
||||
android:visibility="visible"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_weight="1"
|
||||
android:text="领取任务" />
|
||||
android:text="领取任务"
|
||||
android:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_gather"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="0dp"
|
||||
android:visibility="visible"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_weight="1"
|
||||
android:text="立即采集" />
|
||||
android:text="立即采集"
|
||||
android:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_finish_gather"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_weight="1"
|
||||
android:text="结束采集" />
|
||||
android:text="结束采集"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -32,7 +32,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:text="01.选择情报类型"
|
||||
android:text="@string/tv_other_type_01"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
@ -70,13 +70,14 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/ic_baseline_arrow_drop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -165,5 +165,6 @@
|
||||
地图寻宝App:作为专业众包作业工具,可作业道路、POI、充电站、公交站、门牌号等多类型任务。\n\n
|
||||
地图寻宝小程序:简版众包作业工具,无需安装,可采集POI、充电站点类型任务\n\n
|
||||
地图寻宝小程序:微信小程序搜索-地图寻宝</string>
|
||||
<string name="tv_other_type_01">01.其他任务类型</string>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user