修改录像功能,添加拍照。修改bug
This commit is contained in:
parent
d63b66eedf
commit
647dd87934
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
|||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
ndkVersion '23.0.7123448'
|
// ndkVersion '23.0.7123448'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
|
@ -45,11 +45,14 @@
|
|||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.WhiteScreen">
|
android:theme="@style/Theme.WhiteScreen"
|
||||||
<activity android:name=".activity.LinkActivity"></activity>
|
tools:targetApi="n">
|
||||||
|
<activity android:name=".activity.LinkActivity" />
|
||||||
<activity android:name=".activity.RegardMapActivity" />
|
<activity android:name=".activity.RegardMapActivity" />
|
||||||
<activity android:name=".activity.StatementActivity" />
|
<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
|
<activity
|
||||||
android:name=".activity.PictureActivity"
|
android:name=".activity.PictureActivity"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|navigation"
|
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 {
|
public class GuidanceActivity extends BaseActivity {
|
||||||
|
|
||||||
private FrameLayout frameLayout;
|
private FrameLayout frameLayout;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.activity_guidance;
|
return R.layout.activity_guidance;
|
||||||
@ -24,13 +24,11 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
frameLayout = findViewById(R.id.layout_frame);
|
frameLayout = findViewById(R.id.layout_frame);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
|
||||||
View firstItem = LayoutInflater.from(this).inflate(R.layout.guidance_first_item, null);
|
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 secondItem = LayoutInflater.from(this).inflate(R.layout.guidance_second_item, null);
|
||||||
View thirdItem = LayoutInflater.from(this).inflate(R.layout.guidance_third_item, null);
|
View thirdItem = LayoutInflater.from(this).inflate(R.layout.guidance_third_item, null);
|
||||||
@ -57,7 +55,6 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -65,4 +62,5 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
frameLayout.removeAllViews();
|
frameLayout.removeAllViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,15 +34,16 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
*/
|
*/
|
||||||
public class HomeActivity extends BaseActivity{
|
public class HomeActivity extends BaseActivity{
|
||||||
private boolean isExit=false;//标识是否退出
|
private boolean isExit=false;//标识是否退出
|
||||||
private NoSlideViewPager mViewPager;
|
|
||||||
private TabLayout mTab;
|
private TabLayout mTab;
|
||||||
private final String[] names = {"寻宝", "记录", "发现", "我的"};
|
private final String[] names = {"寻宝", "记录", "发现", "我的"};
|
||||||
private final int[] pic = {R.drawable.selector_map,R.drawable.selector_task,R.drawable.selector_article,R.drawable.selector_mine};
|
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();
|
.init();
|
||||||
mTab=findViewById(R.id.tab_layout);
|
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<>();
|
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||||
fragments.add(new TreasureFragment());
|
fragments.add(new TreasureFragment());
|
||||||
recordFragment = new RecordFragment();
|
recordFragment = new RecordFragment();
|
||||||
@ -86,6 +87,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
mViewPager.setOffscreenPageLimit(3);
|
mViewPager.setOffscreenPageLimit(3);
|
||||||
|
|
||||||
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment getItem(int i) {
|
public Fragment getItem(int i) {
|
||||||
return fragments.get(i);
|
return fragments.get(i);
|
||||||
@ -117,11 +119,11 @@ public class HomeActivity extends BaseActivity{
|
|||||||
mViewPager.setCanScroll(true);
|
mViewPager.setCanScroll(true);
|
||||||
mViewPager.setNoScrollAnim(false);
|
mViewPager.setNoScrollAnim(false);
|
||||||
mTab.setupWithViewPager(mViewPager);
|
mTab.setupWithViewPager(mViewPager);
|
||||||
mTab.getTabAt(0).setText(names[0]).setIcon(pic[0]);
|
Objects.requireNonNull(mTab.getTabAt(0)).setText(names[0]).setIcon(pic[0]);
|
||||||
mTab.getTabAt(1).setText(names[1]).setIcon(pic[1]);
|
Objects.requireNonNull(mTab.getTabAt(1)).setText(names[1]).setIcon(pic[1]);
|
||||||
mTab.getTabAt(2).setText(names[2]).setIcon(pic[2]);
|
Objects.requireNonNull(mTab.getTabAt(2)).setText(names[2]).setIcon(pic[2]);
|
||||||
mTab.getTabAt(3).setText(names[3]).setIcon(pic[3]);
|
Objects.requireNonNull(mTab.getTabAt(3)).setText(names[3]).setIcon(pic[3]);
|
||||||
mTab.getTabAt(0).select();
|
Objects.requireNonNull(mTab.getTabAt(0)).select();
|
||||||
mTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
mTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||||
//禁止table layout效果
|
//禁止table layout效果
|
||||||
@Override
|
@Override
|
||||||
@ -155,7 +157,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.EVENT_WORK_HOME) {
|
if (data.what == Constant.EVENT_WORK_HOME) {
|
||||||
if ((boolean)data.obj){
|
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 {
|
public class ImageShowActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private ViewPager image_pager;
|
private ViewPager image_pager;
|
||||||
private TextView page_number;
|
private TextView page_number;
|
||||||
private ImageView download;
|
|
||||||
private ArrayList<String> imgUrl;
|
private ArrayList<String> imgUrl;
|
||||||
private ImagePagerAdapter mAdapter;
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.activity_image_show;
|
return R.layout.activity_image_show;
|
||||||
@ -40,7 +39,7 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
|||||||
super.initView();
|
super.initView();
|
||||||
image_pager = (ViewPager) findViewById(R.id.image_pager);
|
image_pager = (ViewPager) findViewById(R.id.image_pager);
|
||||||
page_number = (TextView) findViewById(R.id.page_number);
|
page_number = (TextView) findViewById(R.id.page_number);
|
||||||
download = (ImageView) findViewById(R.id.download);
|
ImageView download = (ImageView) findViewById(R.id.download);
|
||||||
download.setOnClickListener(this);
|
download.setOnClickListener(this);
|
||||||
initViewPager();
|
initViewPager();
|
||||||
}
|
}
|
||||||
@ -48,17 +47,13 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
|||||||
|
|
||||||
private void initViewPager() {
|
private void initViewPager() {
|
||||||
if (imgUrl != null && imgUrl.size() != 0) {
|
if (imgUrl != null && imgUrl.size() != 0) {
|
||||||
mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
ImagePagerAdapter mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
||||||
image_pager.setAdapter(mAdapter);
|
image_pager.setAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
v.getId();
|
||||||
case R.id.download:
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
|||||||
|
|
||||||
public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private android.widget.ImageView ivIcon;
|
|
||||||
private android.webkit.WebView linkWeb;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.activity_link;
|
return R.layout.activity_link;
|
||||||
@ -26,25 +23,21 @@ public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
String url = getIntent().getStringExtra("url");
|
String url = getIntent().getStringExtra("url");
|
||||||
ivIcon = (ImageView) findViewById(R.id.iv_icon);
|
ImageView ivIcon = findViewById(R.id.iv_icon);
|
||||||
ivIcon.setOnClickListener(this::onClick);
|
ivIcon.setOnClickListener(this);
|
||||||
linkWeb = (WebView) findViewById(R.id.link_web);
|
WebView linkWeb = findViewById(R.id.link_web);
|
||||||
linkWeb.getSettings().setBlockNetworkImage(false);
|
linkWeb.getSettings().setBlockNetworkImage(false);
|
||||||
WebSettings settings = linkWeb.getSettings();
|
WebSettings settings = linkWeb.getSettings();
|
||||||
settings.setJavaScriptEnabled(true);
|
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);
|
settings.setBuiltInZoomControls(false);
|
||||||
linkWeb.loadUrl(url);
|
linkWeb.loadUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
if (v.getId() == R.id.iv_icon) {
|
||||||
case R.id.iv_icon:
|
finish();
|
||||||
finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -36,14 +36,9 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
* 登录页
|
* 登录页
|
||||||
*/
|
*/
|
||||||
public class LoginActivity extends BaseActivity implements View.OnClickListener {
|
public class LoginActivity extends BaseActivity implements View.OnClickListener {
|
||||||
private TextView tvRegister;
|
|
||||||
private android.widget.EditText etLoginName;
|
private android.widget.EditText etLoginName;
|
||||||
private android.widget.EditText etLoginPaw;
|
private android.widget.EditText etLoginPaw;
|
||||||
private TextView tvForgetPaw;
|
|
||||||
private Button btnLogin;
|
|
||||||
private SharedPreferences navInfo;
|
|
||||||
private SharedPreferences.Editor navInfoEditor;
|
private SharedPreferences.Editor navInfoEditor;
|
||||||
private TextView tvStatement;
|
|
||||||
private CheckBox cbStatement;
|
private CheckBox cbStatement;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -79,19 +74,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
||||||
navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
SharedPreferences navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||||
tvRegister = findViewById(R.id.tv_register);
|
TextView tvRegister = findViewById(R.id.tv_register);
|
||||||
etLoginName = findViewById(R.id.et_login_name);
|
etLoginName = findViewById(R.id.et_login_name);
|
||||||
etLoginPaw = findViewById(R.id.et_login_paw);
|
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);
|
cbStatement = findViewById(R.id.iv_login_check);
|
||||||
btnLogin = findViewById(R.id.btn_login);
|
Button btnLogin = findViewById(R.id.btn_login);
|
||||||
btnLogin.setOnClickListener(this::onClick);
|
btnLogin.setOnClickListener(this);
|
||||||
tvStatement = findViewById(R.id.tv_statement);
|
TextView tvStatement = findViewById(R.id.tv_statement);
|
||||||
tvStatement.setOnClickListener(this::onClick);
|
tvStatement.setOnClickListener(this);
|
||||||
tvRegister.setOnClickListener(this);
|
tvRegister.setOnClickListener(this);
|
||||||
tvForgetPaw.setOnClickListener(this);
|
tvForgetPaw.setOnClickListener(this);
|
||||||
if (navInfo!=null){
|
if (navInfo !=null){
|
||||||
String user_name = navInfo.getString("user_name", null);
|
String user_name = navInfo.getString("user_name", null);
|
||||||
if (user_name!=null&&!user_name.equals("")){
|
if (user_name!=null&&!user_name.equals("")){
|
||||||
etLoginName.setText(user_name);
|
etLoginName.setText(user_name);
|
||||||
@ -119,12 +114,12 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
break;
|
break;
|
||||||
case R.id.btn_login:
|
case R.id.btn_login:
|
||||||
String name = etLoginName.getText().toString().trim();
|
String name = etLoginName.getText().toString().trim();
|
||||||
if (name == null || name.equals("")) {
|
if (name.equals("")) {
|
||||||
Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String paw = etLoginPaw.getText().toString().trim();
|
String paw = etLoginPaw.getText().toString().trim();
|
||||||
if (paw == null || paw.equals("")) {
|
if (paw.equals("")) {
|
||||||
Toast.makeText(this, "请输入密码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "请输入密码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -239,7 +234,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
}
|
}
|
||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
}
|
}
|
||||||
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
|
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}else {
|
}else {
|
||||||
|
@ -315,8 +315,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
|
@ -3,21 +3,14 @@ package com.navinfo.outdoor.activity;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import android.location.Location;
|
|
||||||
import android.media.MediaMetadataRetriever;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.SystemClock;
|
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -25,14 +18,12 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.Chronometer;
|
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.DensityUtil;
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
@ -41,7 +32,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
|||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
import com.navinfo.outdoor.util.MapManager;
|
|
||||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||||
import com.otaliastudios.cameraview.CameraException;
|
import com.otaliastudios.cameraview.CameraException;
|
||||||
import com.otaliastudios.cameraview.CameraListener;
|
import com.otaliastudios.cameraview.CameraListener;
|
||||||
@ -52,16 +42,8 @@ import com.otaliastudios.cameraview.CameraView;
|
|||||||
import com.otaliastudios.cameraview.FileCallback;
|
import com.otaliastudios.cameraview.FileCallback;
|
||||||
import com.otaliastudios.cameraview.PictureResult;
|
import com.otaliastudios.cameraview.PictureResult;
|
||||||
import com.otaliastudios.cameraview.VideoResult;
|
import com.otaliastudios.cameraview.VideoResult;
|
||||||
import com.otaliastudios.cameraview.controls.Engine;
|
|
||||||
import com.otaliastudios.cameraview.controls.Mode;
|
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.CameraUpdate;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
|
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
|
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.Marker;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
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.Polyline;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
@ -89,16 +69,15 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
@ -156,39 +135,33 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
if (getIntent() != null) {
|
if (getIntent() != null) {
|
||||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
|
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
|
||||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
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);
|
videoChronometer = findViewById(R.id.video_chronometer);
|
||||||
// if (finalVideoPath == null) {
|
// if (finalVideoPath == null) {
|
||||||
// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
|
// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
layerChange = findViewById(R.id.layer_change);
|
layerChange = findViewById(R.id.layer_change);
|
||||||
|
|
||||||
|
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
|
|
||||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
||||||
|
|
||||||
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
||||||
btnSwitch.setOnClickListener(this::onClick);
|
btnSwitch.setOnClickListener(this);
|
||||||
// capturePicture = (ImageButton) findViewById(R.id.capturePicture);
|
// capturePicture = (ImageButton) findViewById(R.id.capturePicture);
|
||||||
// capturePicture.setOnClickListener(this::onClick);
|
// capturePicture.setOnClickListener(this::onClick);
|
||||||
ivPic = findViewById(R.id.iv_pic);
|
ivPic = findViewById(R.id.iv_pic);
|
||||||
//相机记录器
|
//相机记录器
|
||||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||||
camera = findViewById(R.id.camera);
|
camera = findViewById(R.id.camera);
|
||||||
camera.setOnClickListener(this::onClick);
|
camera.setOnClickListener(this);
|
||||||
captureVideo = findViewById(R.id.capuretVideo);
|
captureVideo = findViewById(R.id.capuretVideo);
|
||||||
captureVideo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
captureVideo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (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();
|
Toast.makeText(PictureActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -206,7 +179,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
});
|
});
|
||||||
|
|
||||||
stopVideo = findViewById(R.id.btn_stop_video);
|
stopVideo = findViewById(R.id.btn_stop_video);
|
||||||
stopVideo.setOnClickListener(this::onClick);
|
stopVideo.setOnClickListener(this);
|
||||||
/**
|
/**
|
||||||
* camera.setVideoBitRate(2000000);
|
* camera.setVideoBitRate(2000000);
|
||||||
* 设置帧率
|
* 设置帧率
|
||||||
@ -214,11 +187,12 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
* app:cameraVideoSizeMaxWidth="2000"
|
* app:cameraVideoSizeMaxWidth="2000"
|
||||||
* app:cameraVideoSizeMaxArea="2000000"
|
* app:cameraVideoSizeMaxArea="2000000"
|
||||||
*/
|
*/
|
||||||
camera.setVideoBitRate(2000000);
|
|
||||||
|
camera.setVideoBitRate(2100000);
|
||||||
//获取地图
|
//获取地图
|
||||||
tencentMap = ivMap.getMap();
|
tencentMap = ivMap.getMap();
|
||||||
|
|
||||||
//tencentMap.setOnMapLoadedCallback();
|
//tenementMap.setOnMapLoadedCallback();
|
||||||
//获取地图UI 设置对象
|
//获取地图UI 设置对象
|
||||||
UiSettings uiSettings = tencentMap.getUiSettings();
|
UiSettings uiSettings = tencentMap.getUiSettings();
|
||||||
//设置logo的大小
|
//设置logo的大小
|
||||||
@ -275,11 +249,12 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
result.toFile(file, new FileCallback() {
|
result.toFile(file, new FileCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
||||||
|
assert file != null;
|
||||||
Toast.makeText(PictureActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PictureActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (camera.isTakingVideo()) {
|
if (camera.isTakingVideo()) {
|
||||||
message("Captured while taking video. Size=" + result.getSize(), false);
|
message("Captured while taking video. Size=" + result.getSize());
|
||||||
}
|
}
|
||||||
long callbackTime = System.currentTimeMillis();
|
long callbackTime = System.currentTimeMillis();
|
||||||
captureTime = callbackTime - 300;
|
captureTime = callbackTime - 300;
|
||||||
@ -354,7 +329,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
/**
|
/**
|
||||||
* 获取当前视频的时间,记录csv文件时使用
|
* 获取当前视频的时间,记录csv文件时使用
|
||||||
* */
|
* */
|
||||||
// long currentTime = AWMp4ParserHelper.getInstance().getVedioTotalTime(new File(finalVideoPath));
|
// long currentTime = AWMp4ParserHelper.getInstance().getVedasTotalTime(new File(finalVideoPath));
|
||||||
timerTask = new CsvTimerTask(new File(finalVideoPath + ".txt"));
|
timerTask = new CsvTimerTask(new File(finalVideoPath + ".txt"));
|
||||||
timer.schedule(timerTask, 0, period * 1000);
|
timer.schedule(timerTask, 0, period * 1000);
|
||||||
// // 开始采集,每隔2秒实时记录位置信息、视频时间以及设备时间
|
// // 开始采集,每隔2秒实时记录位置信息、视频时间以及设备时间
|
||||||
@ -372,14 +347,13 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
super.onVideoRecordingEnd();
|
super.onVideoRecordingEnd();
|
||||||
if (timerTask != null) {
|
if (timerTask != null) {
|
||||||
timerTask.cancel();
|
timerTask.cancel();
|
||||||
} else {
|
} // Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
|
||||||
// Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
// 一段视频拍摄完成自动将当前拍摄路径加1
|
// 一段视频拍摄完成自动将当前拍摄路径加1
|
||||||
File finalVideoFile = new File(finalVideoPath);
|
File finalVideoFile = new File(finalVideoPath);
|
||||||
if (finalVideoFile.exists()) {
|
if (finalVideoFile.exists()) {
|
||||||
int videoIndex = Integer.parseInt(finalVideoFile.getName().replace(".mp4", ""));
|
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);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||||
// 构造 PolylineOpitons
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
// 折线设置圆形线头
|
// 折线设置圆形线头
|
||||||
@ -433,14 +407,9 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
return hh + ":" + mm + ":" + ss;
|
return hh + ":" + mm + ":" + ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void message(String content, Boolean important) {
|
private void message(String content) {
|
||||||
if (important) {
|
LOG.i(content);
|
||||||
LOG.w(content);
|
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
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:
|
case R.id.btn_switch:
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
handler.sendEmptyMessageDelayed(0, 2000); // 利用handler延迟发送更改状态信息
|
handler.sendEmptyMessageDelayed(0, 2000); // 利用handler延迟发送更改状态信息
|
||||||
btnSwich();
|
benSwitch();
|
||||||
break;
|
break;
|
||||||
// case R.id.capuretVideo:
|
// case R.id.capuletVideo:
|
||||||
// startTakenVideo(); // 开始拍摄视频
|
// startTakenVideo(); // 开始拍摄视频
|
||||||
// break;
|
// break;
|
||||||
case R.id.btn_stop_video:
|
case R.id.btn_stop_video:
|
||||||
@ -514,8 +483,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
FileOutputStream fo = new FileOutputStream(file);
|
FileOutputStream fo = new FileOutputStream(file);
|
||||||
FileDescriptor fileDescriptor = fo.getFD();
|
FileDescriptor fileDescriptor = fo.getFD();
|
||||||
camera.takeVideo(fileDescriptor);
|
camera.takeVideo(fileDescriptor);
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -535,8 +502,8 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap getBitMap(int resourceId) {
|
private Bitmap getBitMap() {
|
||||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourceId);
|
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.location);
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
int height = bitmap.getHeight();
|
int height = bitmap.getHeight();
|
||||||
int newWidth = 55;
|
int newWidth = 55;
|
||||||
@ -559,7 +526,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
locationStyle = new MyLocationStyle();
|
locationStyle = new MyLocationStyle();
|
||||||
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
//创建图标
|
//创建图标
|
||||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(R.drawable.location));
|
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap());
|
||||||
locationStyle.icon(bitmapDescriptor);
|
locationStyle.icon(bitmapDescriptor);
|
||||||
//设置定位圆形区域的边框宽度;
|
//设置定位圆形区域的边框宽度;
|
||||||
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
||||||
@ -567,7 +534,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
tencentMap.setMyLocationStyle(locationStyle);
|
tencentMap.setMyLocationStyle(locationStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void btnSwich() {
|
public void benSwitch() {
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||||
System.out.println("width-display :" + dm.widthPixels);
|
System.out.println("width-display :" + dm.widthPixels);
|
||||||
@ -609,10 +576,20 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
camera.open();
|
camera.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRestart() {
|
||||||
|
super.onRestart();
|
||||||
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
|
captureVideo.setChecked(false);
|
||||||
|
captureVideo.setText("继续采集");
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
camera.close();
|
camera.close();
|
||||||
|
stopTakenVideo();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -635,18 +612,16 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEventMessageMainThread(Message msg) {
|
public void onEventMessageMainThread(Message msg) {
|
||||||
switch (msg.what) {
|
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||||
case Constant.EVENT_WHAT_LOCATION_CHANGE: // 用户位置更新
|
if (tencentMap != null) {
|
||||||
if (tencentMap != null) {
|
CameraUpdate cameraSigma =
|
||||||
CameraUpdate cameraSigma =
|
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
16, //目标缩放级别
|
||||||
16, //目标缩放级别
|
0, //目标倾斜角
|
||||||
0, //目标倾斜角
|
0)); //目标旋转角 0~360° (正北方为0)
|
||||||
0)); //目标旋转角 0~360° (正北方为0)
|
tencentMap.animateCamera(cameraSigma);
|
||||||
tencentMap.animateCamera(cameraSigma);
|
}
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -671,7 +646,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// 记录当前时间、视频时间、以及当前经纬度信息
|
// 记录当前时间、视频时间、以及当前经纬度信息
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(formatter.format(new Date())); // 记录当前时间
|
sb.append(formatter.format(new Date())); // 记录当前时间
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
sb.append(currentVideoTime);// 记录视频时间
|
sb.append(currentVideoTime);// 记录视频时间
|
||||||
|
@ -2,15 +2,12 @@ package com.navinfo.outdoor.activity;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@ -23,13 +20,11 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.DensityUtil;
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
import com.navinfo.outdoor.util.MyTecentLocationSource;
|
||||||
import com.otaliastudios.cameraview.CameraException;
|
import com.otaliastudios.cameraview.CameraException;
|
||||||
@ -39,14 +34,9 @@ import com.otaliastudios.cameraview.CameraView;
|
|||||||
import com.otaliastudios.cameraview.FileCallback;
|
import com.otaliastudios.cameraview.FileCallback;
|
||||||
import com.otaliastudios.cameraview.PictureResult;
|
import com.otaliastudios.cameraview.PictureResult;
|
||||||
import com.otaliastudios.cameraview.VideoResult;
|
import com.otaliastudios.cameraview.VideoResult;
|
||||||
import com.otaliastudios.cameraview.controls.Engine;
|
|
||||||
import com.otaliastudios.cameraview.controls.Mode;
|
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.CameraUpdate;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
|
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.TencentMap;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.TextureMapView;
|
import com.tencent.tencentmap.mapsdk.maps.TextureMapView;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.UiSettings;
|
import com.tencent.tencentmap.mapsdk.maps.UiSettings;
|
||||||
@ -68,20 +58,12 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileDescriptor;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Timer;
|
import java.util.Objects;
|
||||||
import java.util.TimerTask;
|
|
||||||
|
|
||||||
import static com.navinfo.outdoor.R.drawable.location;
|
|
||||||
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
|
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
|
||||||
|
|
||||||
public class PicturesActivity extends BaseActivity implements View.OnClickListener {
|
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 long captureTime = 0;
|
||||||
private android.widget.Button btnSwitch;
|
private android.widget.Button btnSwitch;
|
||||||
private TencentMap tencentMap;
|
private TencentMap tencentMap;
|
||||||
private MyLocationStyle locationStyle;
|
|
||||||
private TextureMapView ivMap;
|
private TextureMapView ivMap;
|
||||||
private Button stopPicture;
|
|
||||||
private List<Removable> removables;
|
private List<Removable> removables;
|
||||||
private PoiEntity poiEntity;
|
private PoiEntity poiEntity;
|
||||||
private Polyline polyline;
|
private Polyline polyline;
|
||||||
private String finalVideoPath; // 摄像后最终保存的文件名
|
private String finalVideoPath; // 摄像后最终保存的文件名
|
||||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||||
private CheckBox capturePicture;//拍照
|
private CheckBox capturePicture;//拍照
|
||||||
private ArrayList<File> pictureList;
|
|
||||||
private Handler handler = new Handler(new Handler.Callback() {
|
private Handler handler = new Handler(new Handler.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean handleMessage(@NonNull Message msg) {
|
public boolean handleMessage(@NonNull Message msg) {
|
||||||
if (msg.what == 0x101 && listenerPicture) {
|
if (msg.what == 0x101 && listenerPicture) {
|
||||||
File file = (File) msg.obj;
|
|
||||||
pictureList.add(file);
|
|
||||||
camera.takePicture();
|
camera.takePicture();
|
||||||
} else if (msg.what == 0x102) {
|
} else if (msg.what == 0x102) {
|
||||||
if (btnSwitch != null) {
|
if (btnSwitch != null) {
|
||||||
btnSwitch.setEnabled(true);
|
btnSwitch.setEnabled(true);
|
||||||
}
|
}
|
||||||
} else if (msg.what == 0x103) {
|
} else if (msg.what == 0x103) {
|
||||||
File file = (File) msg.obj;
|
|
||||||
pictureList.add(file);
|
|
||||||
listenerPicture = false;
|
listenerPicture = false;
|
||||||
capturePicture.setText("开始采集");
|
if (type!=3){
|
||||||
|
capturePicture.setText("开始采集");
|
||||||
|
}
|
||||||
capturePicture.setChecked(false);
|
capturePicture.setChecked(false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -137,44 +114,55 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
pictureList = new ArrayList<>();
|
|
||||||
removables = new ArrayList<>();//存储轨迹的marker
|
removables = new ArrayList<>();//存储轨迹的marker
|
||||||
layerChange = findViewById(R.id.layer_change);
|
layerChange = findViewById(R.id.layer_change);
|
||||||
if (getIntent() != null) {
|
if (getIntent() != null) {
|
||||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
||||||
type = getIntent().getIntExtra("type", 0);
|
type = getIntent().getIntExtra("type", 0);
|
||||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
|
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
|
||||||
|
assert finalVideoPath != null;
|
||||||
File file = new File(finalVideoPath);
|
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");
|
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||||
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
ivMap = (TextureMapView) findViewById(R.id.iv_map);
|
||||||
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
btnSwitch = (Button) findViewById(R.id.btn_switch);
|
||||||
btnSwitch.setOnClickListener(this::onClick);
|
btnSwitch.setOnClickListener(this);
|
||||||
//相机记录器
|
//相机记录器
|
||||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||||
camera = findViewById(R.id.camera);
|
camera = findViewById(R.id.camera);
|
||||||
camera.setOnClickListener(this::onClick);
|
camera.setOnClickListener(this);
|
||||||
capturePicture = findViewById(R.id.capuret_picture);
|
capturePicture = findViewById(R.id.capture_picture);
|
||||||
|
if (type==3){
|
||||||
|
capturePicture.setText("拍摄");
|
||||||
|
}else {
|
||||||
|
capturePicture.setText("开始采集");
|
||||||
|
}
|
||||||
capturePicture.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
capturePicture.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (isChecked) { // 开始采集,设置按钮文字内容为“结束采集”
|
if (isChecked) { // 开始采集,设置按钮文字内容为“结束采集”
|
||||||
capturePicture.setText("暂停采集");
|
if (type!=3){
|
||||||
|
capturePicture.setText("暂停采集");
|
||||||
|
}
|
||||||
listenerPicture = true;
|
listenerPicture = true;
|
||||||
camera.takePicture();
|
camera.takePicture();
|
||||||
} else {
|
} else {
|
||||||
listenerPicture = false;
|
listenerPicture = false;
|
||||||
capturePicture.setText("开始采集");
|
if (type!=3){
|
||||||
|
capturePicture.setText("开始采集");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
stopPicture = findViewById(R.id.btn_stop_picture);
|
Button stopPicture = findViewById(R.id.btn_stop_picture);
|
||||||
stopPicture.setOnClickListener(this::onClick);
|
stopPicture.setOnClickListener(this);
|
||||||
//获取地图
|
//获取地图
|
||||||
tencentMap = ivMap.getMap();
|
tencentMap = ivMap.getMap();
|
||||||
|
|
||||||
//获取地图UI 设置对象
|
//获取地图UI 设置对象
|
||||||
UiSettings uiSettings = tencentMap.getUiSettings();
|
UiSettings uiSettings = tencentMap.getUiSettings();
|
||||||
//设置logo的大小
|
//设置logo的大小
|
||||||
@ -193,20 +181,19 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
public void onFileReady(@Nullable @org.jetbrains.annotations.Nullable File file) {
|
||||||
if (listenerPicture) {
|
if (listenerPicture) {
|
||||||
|
assert file != null;
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
||||||
finalVideoPath = file.getParentFile().getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
||||||
}
|
}
|
||||||
initMarkerPaper();
|
initMarkerPaper();
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
if (type == 3) {
|
if (type == 3) {
|
||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
message.obj = file;
|
|
||||||
handler.sendMessageDelayed(message, 0);
|
handler.sendMessageDelayed(message, 0);
|
||||||
Toast.makeText(PicturesActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PicturesActivity.this, "保存成功:" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
message.what = 0x101;
|
message.what = 0x101;
|
||||||
message.obj = file;
|
|
||||||
Toast.makeText(PicturesActivity.this, "保存成功" + file.getPath(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(PicturesActivity.this, "保存成功" + file.getPath(), Toast.LENGTH_SHORT).show();
|
||||||
handler.sendMessageDelayed(message, 2000);
|
handler.sendMessageDelayed(message, 2000);
|
||||||
}
|
}
|
||||||
@ -217,7 +204,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
|
|
||||||
});
|
});
|
||||||
if (camera.isTakingVideo()) {
|
if (camera.isTakingVideo()) {
|
||||||
message("Captured while taking video. Size=" + result.getSize(), false);
|
message("Captured while taking video. Size=" + result.getSize());
|
||||||
}
|
}
|
||||||
long callbackTime = System.currentTimeMillis();
|
long callbackTime = System.currentTimeMillis();
|
||||||
captureTime = callbackTime - 300;
|
captureTime = callbackTime - 300;
|
||||||
@ -245,24 +232,18 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 修改相机的宽高为屏幕宽高的1/3
|
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//相机的宽高
|
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//相机的宽高
|
||||||
layoutParamsMap.height = dm.heightPixels / 3;
|
layoutParamsMap.height = dm.widthPixels / 3;
|
||||||
layoutParamsMap.width = dm.widthPixels / 3;
|
layoutParamsMap.width = dm.heightPixels / 3;
|
||||||
ivMap.setLayoutParams(layoutParamsMap);
|
ivMap.setLayoutParams(layoutParamsMap);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void message(String content, Boolean important) {
|
private void message(String content) {
|
||||||
if (important) {
|
LOG.i(content);
|
||||||
LOG.w(content);
|
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
||||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
|
||||||
} else {
|
|
||||||
LOG.i(content);
|
|
||||||
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLine() {
|
private void initLine() {
|
||||||
@ -277,7 +258,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||||
// 构造 PolylineOpitons
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
// 折线设置圆形线头
|
// 折线设置圆形线头
|
||||||
@ -308,8 +289,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
case R.id.btn_stop_picture:
|
case R.id.btn_stop_picture:
|
||||||
listenerPicture = false;
|
listenerPicture = false;
|
||||||
Intent intent = new Intent();
|
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(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||||
|
intent.putExtra("type",type);
|
||||||
setResult(0x102, intent);
|
setResult(0x102, intent);
|
||||||
finish();
|
finish();
|
||||||
break;
|
break;
|
||||||
@ -317,13 +299,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
case R.id.btn_switch:
|
case R.id.btn_switch:
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
handler.sendEmptyMessageDelayed(0x102, 2000); // 利用handler延迟发送更改状态信息
|
handler.sendEmptyMessageDelayed(0x102, 2000); // 利用handler延迟发送更改状态信息
|
||||||
btnSwich();
|
benSwitch();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap getBitMap(int resourceId) {
|
private Bitmap getBitMap() {
|
||||||
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourceId);
|
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.location);
|
||||||
int width = bitmap.getWidth();
|
int width = bitmap.getWidth();
|
||||||
int height = bitmap.getHeight();
|
int height = bitmap.getHeight();
|
||||||
int newWidth = 55;
|
int newWidth = 55;
|
||||||
@ -343,10 +325,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
tencentMap.setLocationSource(new MyTecentLocationSource(this));
|
tencentMap.setLocationSource(new MyTecentLocationSource(this));
|
||||||
tencentMap.setMyLocationEnabled(true);
|
tencentMap.setMyLocationEnabled(true);
|
||||||
|
|
||||||
locationStyle = new MyLocationStyle();
|
MyLocationStyle locationStyle = new MyLocationStyle();
|
||||||
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
//创建图标
|
//创建图标
|
||||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(location));
|
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap());
|
||||||
locationStyle.icon(bitmapDescriptor);
|
locationStyle.icon(bitmapDescriptor);
|
||||||
//设置定位圆形区域的边框宽度;
|
//设置定位圆形区域的边框宽度;
|
||||||
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
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();
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||||
System.out.println("width-display :" + dm.widthPixels);
|
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();//地图的宽高
|
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
|
||||||
int heightMap = ivMap.getMeasuredHeight();
|
int heightMap = ivMap.getMeasuredHeight();
|
||||||
int widthMap = ivMap.getMeasuredWidth();
|
int widthMap = ivMap.getMeasuredWidth();
|
||||||
@ -369,7 +351,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
|
|
||||||
layerChange.removeAllViews();
|
layerChange.removeAllViews();
|
||||||
if (widthMap > widthCamera) {
|
if (widthMap > widthCamera) {
|
||||||
|
|
||||||
layoutParamsCamera.width = dm.widthPixels;
|
layoutParamsCamera.width = dm.widthPixels;
|
||||||
layoutParamsCamera.height = dm.heightPixels;
|
layoutParamsCamera.height = dm.heightPixels;
|
||||||
layoutParamsMap.height = heightCamera;
|
layoutParamsMap.height = heightCamera;
|
||||||
@ -379,7 +360,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
layerChange.addView(camera);
|
layerChange.addView(camera);
|
||||||
layerChange.addView(ivMap);
|
layerChange.addView(ivMap);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
layoutParamsMap.height = dm.heightPixels;
|
layoutParamsMap.height = dm.heightPixels;
|
||||||
layoutParamsMap.width = dm.widthPixels;
|
layoutParamsMap.width = dm.widthPixels;
|
||||||
layoutParamsCamera.height = heightMap;
|
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
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
camera.close();
|
camera.close();
|
||||||
|
if (type!=3){
|
||||||
|
listenerPicture = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,24 +421,22 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEventMessageMainThread(Message msg) {
|
public void onEventMessageMainThread(Message msg) {
|
||||||
switch (msg.what) {
|
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
|
||||||
case Constant.EVENT_WHAT_LOCATION_CHANGE: // 用户位置更新
|
if (tencentMap != null) {
|
||||||
if (tencentMap != null) {
|
CameraUpdate cameraSigma =
|
||||||
CameraUpdate cameraSigma =
|
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
16, //目标缩放级别
|
||||||
16, //目标缩放级别
|
0, //目标倾斜角
|
||||||
0, //目标倾斜角
|
0)); //目标旋转角 0~360° (正北方为0)
|
||||||
0)); //目标旋转角 0~360° (正北方为0)
|
tencentMap.animateCamera(cameraSigma);
|
||||||
tencentMap.animateCamera(cameraSigma);
|
}
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initMarkerPaper() {
|
public void initMarkerPaper() {
|
||||||
// 记录当前时间、视频时间、以及当前经纬度信息
|
// 记录当前时间、视频时间、以及当前经纬度信息
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(formatter.format(new Date())); // 记录当前时
|
sb.append(formatter.format(new Date())); // 记录当前时
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
sb.append(videoIndex);//個數
|
sb.append(videoIndex);//個數
|
||||||
|
@ -12,11 +12,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
|||||||
* */
|
* */
|
||||||
public class RegardMapActivity extends BaseActivity implements View.OnClickListener {
|
public class RegardMapActivity extends BaseActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivFilterFinal;
|
|
||||||
private TextView tvPhone;
|
|
||||||
private TextView tvMapLink;
|
|
||||||
private TextView tvOfficialLink;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@ -26,13 +21,13 @@ public class RegardMapActivity extends BaseActivity implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivFilterFinal = (ImageView) findViewById(R.id.iv_filter_final);
|
ImageView ivFilterFinal =findViewById(R.id.iv_filter_final);
|
||||||
ivFilterFinal.setOnClickListener(this::onClick);
|
ivFilterFinal.setOnClickListener(this);
|
||||||
tvPhone = findViewById(R.id.tv_phone);
|
TextView tvPhone = findViewById(R.id.tv_phone);
|
||||||
tvMapLink = (TextView) findViewById(R.id.tv_map_link);
|
TextView tvMapLink =findViewById(R.id.tv_map_link);
|
||||||
tvMapLink.setOnClickListener(this::onClick);
|
tvMapLink.setOnClickListener(this);
|
||||||
tvOfficialLink = (TextView) findViewById(R.id.tv_official_link);
|
TextView tvOfficialLink =findViewById(R.id.tv_official_link);
|
||||||
tvOfficialLink.setOnClickListener(this::onClick);
|
tvOfficialLink.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,9 +11,6 @@ import com.navinfo.outdoor.base.BaseActivity;
|
|||||||
public class StatementActivity extends BaseActivity {
|
public class StatementActivity extends BaseActivity {
|
||||||
|
|
||||||
|
|
||||||
private android.widget.TextView tvTextStatement;
|
|
||||||
private android.widget.ImageView ivStatement;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.activity_statement;
|
return R.layout.activity_statement;
|
||||||
@ -22,9 +19,8 @@ public class StatementActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
tvTextStatement = (TextView) findViewById(R.id.tv_textStatement);
|
TextView tvTextStatement =findViewById(R.id.tv_textStatement);
|
||||||
|
ImageView ivStatement =findViewById(R.id.iv_statement);
|
||||||
ivStatement = (ImageView) findViewById(R.id.iv_statement);
|
|
||||||
ivStatement.setOnClickListener(new View.OnClickListener() {
|
ivStatement.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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);
|
navInfo = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||||
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
navInfoEditor = getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit();
|
||||||
ivUser = findViewById(R.id.iv_user);
|
ivUser = findViewById(R.id.iv_user);
|
||||||
ivUser.setOnClickListener(this::onClick);
|
ivUser.setOnClickListener(this);
|
||||||
btnAttestation = findViewById(R.id.btn_attestations);
|
btnAttestation = findViewById(R.id.btn_attestations);
|
||||||
btnAttestation.setOnClickListener(this::onClick);
|
btnAttestation.setOnClickListener(this);
|
||||||
btnGathering = findViewById(R.id.btn_gathering);
|
btnGathering = findViewById(R.id.btn_gathering);
|
||||||
btnGathering.setOnClickListener(this::onClick);
|
btnGathering.setOnClickListener(this);
|
||||||
region = findViewById(R.id.region);
|
region = findViewById(R.id.region);
|
||||||
region.setOnClickListener(this::onClick);
|
region.setOnClickListener(this);
|
||||||
llRegion = findViewById(R.id.ll_region);
|
llRegion = findViewById(R.id.ll_region);
|
||||||
llRegion.setOnClickListener(this::onClick);
|
llRegion.setOnClickListener(this);
|
||||||
etPhone = findViewById(R.id.et_phone);
|
etPhone = findViewById(R.id.et_phone);
|
||||||
etPhone.setOnClickListener(this::onClick);
|
etPhone.setOnClickListener(this);
|
||||||
etQq = findViewById(R.id.edit_qq);
|
etQq = findViewById(R.id.edit_qq);
|
||||||
etQq.setOnClickListener(this::onClick);
|
etQq.setOnClickListener(this);
|
||||||
etMailbox = findViewById(R.id.edit_mailbox);
|
etMailbox = findViewById(R.id.edit_mailbox);
|
||||||
etMailbox.setOnClickListener(this::onClick);
|
etMailbox.setOnClickListener(this);
|
||||||
userSave = findViewById(R.id.btn_save);
|
userSave = findViewById(R.id.btn_save);
|
||||||
userSave.setOnClickListener(this::onClick);
|
userSave.setOnClickListener(this);
|
||||||
btnWeChat = findViewById(R.id.btn_weChat_binding);
|
btnWeChat = findViewById(R.id.btn_weChat_binding);
|
||||||
btnWeChat.setOnClickListener(this::onClick);
|
btnWeChat.setOnClickListener(this);
|
||||||
if (Constant.MOBILE!=null){
|
if (Constant.MOBILE!=null){
|
||||||
etPhone.setText(Constant.MOBILE);
|
etPhone.setText(Constant.MOBILE);
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
}else {
|
}else {
|
||||||
httpParams.put("mobile",userphone);
|
httpParams.put("mobile",userphone);
|
||||||
}
|
}
|
||||||
if (!userqq.equals("")&&userqq!=null) {
|
if (!userqq.equals("")) {
|
||||||
if (!isQQNum_matcher) {
|
if (!isQQNum_matcher) {
|
||||||
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -202,7 +202,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
httpParams.put("qq",userqq);
|
httpParams.put("qq",userqq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!usermailbox.equals("")&&usermailbox!=null){
|
if (!usermailbox.equals("")){
|
||||||
if (!isEmail_matcher) {
|
if (!isEmail_matcher) {
|
||||||
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
||||||
}else {
|
}else {
|
||||||
|
@ -24,7 +24,6 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class WebActivity extends BaseActivity implements View.OnClickListener {
|
public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivIcon;
|
|
||||||
private WebView nWebView;
|
private WebView nWebView;
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@ -38,17 +37,16 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
nWebView.getSettings().setBlockNetworkImage(false);
|
nWebView.getSettings().setBlockNetworkImage(false);
|
||||||
WebSettings settings = nWebView.getSettings();
|
WebSettings settings = nWebView.getSettings();
|
||||||
settings.setJavaScriptEnabled(true);
|
settings.setJavaScriptEnabled(true);
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
nWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
nWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
ImageView ivIcon = findViewById(R.id.iv_icon);
|
||||||
}
|
ivIcon.setOnClickListener(this);
|
||||||
ivIcon = findViewById(R.id.iv_icon);
|
|
||||||
ivIcon.setOnClickListener(this::onClick);
|
|
||||||
initWebWork();
|
initWebWork();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initWebWork() {
|
private void initWebWork() {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
Bundle bundle = getIntent().getExtras();
|
Bundle bundle = getIntent().getExtras();
|
||||||
|
assert bundle != null;
|
||||||
String url = bundle.getString("url");
|
String url = bundle.getString("url");
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
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
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ import com.navinfo.outdoor.bean.BankPathBean;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
||||||
@ -26,6 +25,7 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
|||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
|
||||||
View inflate = LayoutInflater.from(context).inflate(R.layout.bankadapteritem, parent, false);
|
View inflate = LayoutInflater.from(context).inflate(R.layout.bankadapteritem, parent, false);
|
||||||
@ -34,7 +34,7 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull @NotNull ViewHolder holder, int position) {
|
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() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -48,12 +48,12 @@ public class BankAdapter extends RecyclerView.Adapter<BankAdapter.ViewHolder> {
|
|||||||
return bankPathBeans.size();
|
return bankPathBeans.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvitem;
|
TextView titer;
|
||||||
|
|
||||||
public ViewHolder(@NonNull @NotNull View itemView) {
|
public ViewHolder(@NonNull @NotNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
tvitem = itemView.findViewById(R.id.tv_bank);
|
titer = itemView.findViewById(R.id.tv_bank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public interface OnBankClick {
|
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;
|
ImageView ivCapacity;
|
||||||
TextView tvCapacity;
|
TextView tvCapacity;
|
||||||
TextView tvResults;
|
TextView tvResults;
|
||||||
|
@ -14,7 +14,6 @@ import com.bumptech.glide.Glide;
|
|||||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
|
||||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -43,7 +42,7 @@ public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapte
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
holder.tvCapItem.setText(capItemList.get(position).getTitle());
|
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);
|
Glide.with(context).load(capItemList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapItem);
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -61,15 +60,15 @@ public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapte
|
|||||||
return capItemList.size();
|
return capItemList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
ImageView ivCapItem;
|
ImageView ivCapItem;
|
||||||
TextView tvCapItem;
|
TextView tvCapItem;
|
||||||
TextView tvReaus;
|
TextView tvReams;
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
ivCapItem = itemView.findViewById(R.id.iv_tas_capacity);
|
ivCapItem = itemView.findViewById(R.id.iv_tas_capacity);
|
||||||
tvCapItem = itemView.findViewById(R.id.tas_capacity_title);
|
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{
|
public interface setOnClick{
|
||||||
|
@ -136,7 +136,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//indext内容
|
//indent内容
|
||||||
private String getOptionIndex(int index) {
|
private String getOptionIndex(int index) {
|
||||||
char A = (char) (65 + index);
|
char A = (char) (65 + index);
|
||||||
return A + ":";
|
return A + ":";
|
||||||
@ -149,7 +149,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
return measureList.size();
|
return measureList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvMeasure;
|
TextView tvMeasure;
|
||||||
LinearLayout llOption;
|
LinearLayout llOption;
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
resultStr = new StringBuilder("");
|
resultStr = new StringBuilder("");
|
||||||
List<CompoundButton> resultList = new ArrayList<>();
|
List<CompoundButton> resultList = new ArrayList<>();
|
||||||
getCompoundButton(group, resultList);
|
getCompoundButton(group, resultList);
|
||||||
if (resultList != null && !resultList.isEmpty()) {
|
if (!resultList.isEmpty()) {
|
||||||
for (int i = 0; i < resultList.size(); i++) {
|
for (int i = 0; i < resultList.size(); i++) {
|
||||||
if (((CompoundButton) resultList.get(i)).isChecked()) {
|
if (((CompoundButton) resultList.get(i)).isChecked()) {
|
||||||
resultStr.append(i).append(",");
|
resultStr.append(i).append(",");
|
||||||
|
@ -63,7 +63,7 @@ public class ChargingPileAdapter extends RecyclerView.Adapter<ChargingPileAdapte
|
|||||||
return chargingPileEntities.size();
|
return chargingPileEntities.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
ImageView imageView;
|
ImageView imageView;
|
||||||
RelativeLayout rlItem;
|
RelativeLayout rlItem;
|
||||||
TextView textView;
|
TextView textView;
|
||||||
|
@ -53,7 +53,7 @@ public class EventPrefectureAdapter extends RecyclerView.Adapter<EventPrefecture
|
|||||||
return dataBeans.size();
|
return dataBeans.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvTitle;
|
TextView tvTitle;
|
||||||
TextView tvDest;
|
TextView tvDest;
|
||||||
TextView tvTime;
|
TextView tvTime;
|
||||||
|
@ -109,7 +109,7 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
|||||||
return allPoi.size();
|
return allPoi.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvName, tvForm, tvTaskId, tvMoney, tvDistance, tvTaskStatus;
|
TextView tvName, tvForm, tvTaskId, tvMoney, tvDistance, tvTaskStatus;
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
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) {
|
public static String format2(double value) {
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
@ -12,6 +12,8 @@ import androidx.viewpager.widget.ViewPager;
|
|||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,16 +25,16 @@ public class ImagePagerAdapter extends PagerAdapter {
|
|||||||
LayoutInflater inflater = null;
|
LayoutInflater inflater = null;
|
||||||
|
|
||||||
ImageView full_image;
|
ImageView full_image;
|
||||||
public ImagePagerAdapter(Context context, ArrayList<String> imgsUrl) {
|
public ImagePagerAdapter(Context context, ArrayList<String> imusUrl) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.imgsUrl = imgsUrl;
|
this.imgsUrl = imusUrl;
|
||||||
inflater = LayoutInflater.from(context);
|
inflater = LayoutInflater.from(context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 动态加载数据 */
|
/** 动态加载数据 */
|
||||||
@Override
|
@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);
|
super.setPrimaryItem(container, position, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,19 +44,20 @@ public class ImagePagerAdapter extends PagerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isViewFromObject(View arg0, Object arg1) {
|
public boolean isViewFromObject(@NotNull View arg0, @NotNull Object arg1) {
|
||||||
return arg0 == arg1;
|
return arg0 == arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemPosition(Object object) {
|
public int getItemPosition(@NotNull Object object) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return super.getItemPosition(object);
|
return super.getItemPosition(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Object instantiateItem(ViewGroup container, int position) {
|
public Object instantiateItem(@NotNull ViewGroup container, int position) {
|
||||||
View view = inflater.from(context).inflate(R.layout.details_imageshow_item, null);
|
View view = LayoutInflater.from(context).inflate(R.layout.details_imageshow_item, null);
|
||||||
full_image = (ImageView)view.findViewById(R.id.full_image);
|
full_image = (ImageView)view.findViewById(R.id.full_image);
|
||||||
Glide.with(context).load(imgsUrl.get(position)).into(full_image);
|
Glide.with(context).load(imgsUrl.get(position)).into(full_image);
|
||||||
|
|
||||||
@ -63,7 +66,7 @@ public class ImagePagerAdapter extends PagerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
((ViewPager) container).removeView((View) object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class IssueProblemAdapter extends RecyclerView.Adapter<IssueProblemAdapte
|
|||||||
return issueList.size();
|
return issueList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvIssue;
|
TextView tvIssue;
|
||||||
|
|
||||||
public ViewHolder(@NonNull View itemView) {
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
@ -59,7 +59,7 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
|
|||||||
return messageList.size();
|
return messageList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private TextView tvMessageTitle;
|
private TextView tvMessageTitle;
|
||||||
private TextView tvMessageDest;
|
private TextView tvMessageDest;
|
||||||
|
@ -16,6 +16,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.PhoneBean;
|
import com.navinfo.outdoor.bean.PhoneBean;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -76,16 +78,16 @@ public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.My
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public MyViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType) {
|
||||||
MyViewHolder holder = new MyViewHolder(LayoutInflater.from(
|
return new MyViewHolder(LayoutInflater.from(
|
||||||
context).inflate(R.layout.item_poi, parent,
|
context).inflate(R.layout.item_poi, parent,
|
||||||
false));
|
false));
|
||||||
return holder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
PhoneBean poiBean = list.get(position);
|
||||||
if(poiBean.getPhone().startsWith("1")){
|
if(poiBean.getPhone().startsWith("1")){
|
||||||
holder.llPoi.setVisibility(View.GONE);
|
holder.llPoi.setVisibility(View.GONE);
|
||||||
@ -176,7 +178,7 @@ public class PoiRecycleAdapter extends RecyclerView.Adapter<PoiRecycleAdapter.My
|
|||||||
/**
|
/**
|
||||||
* ViewHolder的类,用于缓存控件
|
* ViewHolder的类,用于缓存控件
|
||||||
*/
|
*/
|
||||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
static class MyViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvPhone;
|
TextView tvPhone;
|
||||||
EditText editAreaCode, editPhoneNumber;
|
EditText editAreaCode, editPhoneNumber;
|
||||||
ImageView image;
|
ImageView image;
|
||||||
|
@ -56,7 +56,7 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
|||||||
return listBeans.size();
|
return listBeans.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvnName, tvTime, tvMany, tvMassage ,tvAuditStatus;
|
TextView tvnName, tvTime, tvMany, tvMassage ,tvAuditStatus;
|
||||||
|
|
||||||
public ViewHolder(@NonNull @NotNull View itemView) {
|
public ViewHolder(@NonNull @NotNull View itemView) {
|
||||||
|
@ -111,7 +111,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
return allRoad.size();
|
return allRoad.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
private TextView tvName;
|
private TextView tvName;
|
||||||
private TextView tvDay;
|
private TextView tvDay;
|
||||||
private CheckBox cbUnSubmit;
|
private CheckBox cbUnSubmit;
|
||||||
|
@ -57,7 +57,7 @@ public class TaskExplainAdapter extends RecyclerView.Adapter<TaskExplainAdapter.
|
|||||||
return explainList.size();
|
return explainList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder extends RecyclerView.ViewHolder {
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
ImageView ivExplain;
|
ImageView ivExplain;
|
||||||
TextView tvExplain;
|
TextView tvExplain;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class TaskExplainAdapter2 extends RecyclerView.Adapter<TaskExplainAdapter
|
|||||||
return explainList2.size();
|
return explainList2.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder2 extends RecyclerView.ViewHolder {
|
static class ViewHolder2 extends RecyclerView.ViewHolder {
|
||||||
TextView tvText;
|
TextView tvText;
|
||||||
|
|
||||||
public ViewHolder2(@NonNull View itemView) {
|
public ViewHolder2(@NonNull View itemView) {
|
||||||
|
@ -29,12 +29,11 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
|||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View mView = LayoutInflater.from(context).inflate(R.layout.task_prefecture_item, parent, false);
|
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();
|
// parent.getWidth();
|
||||||
// ViewGroup.LayoutParams layoutParams = viewHolder.itemView.getLayoutParams();
|
// ViewGroup.LayoutParams layoutParams = viewHolder.itemView.getLayoutParams();
|
||||||
// layoutParams.height = (parentHeight/ 6);
|
// layoutParams.height = (parentHeight/ 6);
|
||||||
return viewHolder;
|
return new ViewHolder(mView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -58,7 +57,7 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
|||||||
return dataBeans.size();
|
return dataBeans.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView tvTitle;
|
TextView tvTitle;
|
||||||
TextView tvDest;
|
TextView tvDest;
|
||||||
TextView tvTime;
|
TextView tvTime;
|
||||||
|
@ -60,7 +60,7 @@ public class WithdrawalAdapter extends RecyclerView.Adapter<WithdrawalAdapter.On
|
|||||||
return dataBeans.size();
|
return dataBeans.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OnViewHolder extends RecyclerView.ViewHolder {
|
public static class OnViewHolder extends RecyclerView.ViewHolder {
|
||||||
private TextView tvTitle, tvDec, tvTime;
|
private TextView tvTitle, tvDec, tvTime;
|
||||||
|
|
||||||
public OnViewHolder(@NonNull @NotNull View itemView) {
|
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 FILTER_LIST_ITEM = 5;//点击筛选的item
|
||||||
public static final int GATHER_GET = 6;//点击开始采集
|
public static final int GATHER_GET = 6;//点击开始采集
|
||||||
public static final int TREASURE_GATHER_GET_WORD = 7;//领取采集页面其他marker 的回传
|
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 POI_DRAWER = 10; //设置每个页面显示屏幕的位置
|
||||||
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
||||||
public static final int MAIN_CHARGING_STATION = 13;//充电站的Fragment 对地图页面marker 的一个展示 编辑
|
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 final int REGISTER_WORD = 46; //注册的返回
|
||||||
|
|
||||||
public static int NUMBER = 200; //任务个数
|
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_TYPE = -1; // 任务类型
|
||||||
public static int TASK_STASTUS = -1; // 任务状态
|
public static int TASK_STARTUP = -1; // 任务状态
|
||||||
public static String CODE = ""; //区号
|
public static String CODE = ""; //区号
|
||||||
/**
|
/**
|
||||||
* 用户当前位置
|
* 用户当前位置
|
||||||
*/
|
*/
|
||||||
public static TencentLocation currentLocation;
|
public static TencentLocation currentLocation;
|
||||||
public static LatLng markerLatlng;
|
public static LatLng markerLacing;
|
||||||
//marker 图标
|
//marker 图标
|
||||||
|
|
||||||
// public static final BitmapDescriptor POI_ICON = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
// 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_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||||
public static final String INTENT_JPG_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_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;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
|
|
||||||
@ -181,16 +181,16 @@ public class Constant {
|
|||||||
/**
|
/**
|
||||||
* 联系我们的QQ群名称和QQ群号
|
* 联系我们的QQ群名称和QQ群号
|
||||||
* */
|
* */
|
||||||
public static String REGION_JING_NAME = "京津冀晋蒙-地图寻宝群";
|
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||||
public static String REGION_JING_PHONE = "9721810";
|
public static String REGION_JIG_PHONE = "9721810";
|
||||||
public static String REGION_HEI_NAME = "黑吉辽-地图寻宝群";
|
public static String REGION_HEI_NAME = "黑吉辽-地图寻宝群";
|
||||||
public static String REGION_HEI_PHONE = "549321657";
|
public static String REGION_HEI_PHONE = "549321657";
|
||||||
public static String REGION_SHAN_NAME = "山东-地图寻宝群";
|
public static String REGION_SAN_NAME = "山东-地图寻宝群";
|
||||||
public static String REGION_SHAN_PHONE = "581827297";
|
public static String REGION_SAN_PHONE = "581827297";
|
||||||
public static String REGION_YU_NAME = "豫陕-地图寻宝群";
|
public static String REGION_YU_NAME = "豫陕-地图寻宝群";
|
||||||
public static String REGION_YU_PHONE = "344192497";
|
public static String REGION_YU_PHONE = "344192497";
|
||||||
public static String REGION_CHUAN_NAME = "川渝藏-地图寻宝";
|
public static String REGION_CHAN_NAME = "川渝藏-地图寻宝";
|
||||||
public static String REGION_CHUAN_PHONE = "741373102";
|
public static String REGION_CHAN_PHONE = "741373102";
|
||||||
public static String REGION_GAN_NAME = "甘青宁新蒙-地图寻宝群";
|
public static String REGION_GAN_NAME = "甘青宁新蒙-地图寻宝群";
|
||||||
public static String REGION_GAN_PHONE = "343620420";
|
public static String REGION_GAN_PHONE = "343620420";
|
||||||
public static String REGION_SU_NAME = "苏皖-地图寻宝群";
|
public static String REGION_SU_NAME = "苏皖-地图寻宝群";
|
||||||
@ -199,8 +199,8 @@ public class Constant {
|
|||||||
public static String REGION_LU_PHONE = "590815485";
|
public static String REGION_LU_PHONE = "590815485";
|
||||||
public static String REGION_FU_NAME = "福建-地图寻宝群";
|
public static String REGION_FU_NAME = "福建-地图寻宝群";
|
||||||
public static String REGION_FU_PHONE = "662056094";
|
public static String REGION_FU_PHONE = "662056094";
|
||||||
public static String REGION_GUANG_NAME = "广西海南-地图寻宝群";
|
public static String REGION_GANG_NAME = "广西海南-地图寻宝群";
|
||||||
public static String REGION_GUANG_PHONE = "139376252";
|
public static String REGION_GANG_PHONE = "139376252";
|
||||||
public static String REGION_GANZ_NAME = "赣湘鄂-地图寻宝群";
|
public static String REGION_GANZ_NAME = "赣湘鄂-地图寻宝群";
|
||||||
public static String REGION_GANZ_PHONE = "229231160";
|
public static String REGION_GANZ_PHONE = "229231160";
|
||||||
public static String REGION_YUE_NAME = "粤港澳-地图寻宝群";
|
public static String REGION_YUE_NAME = "粤港澳-地图寻宝群";
|
||||||
|
@ -2,23 +2,16 @@ package com.navinfo.outdoor.base;
|
|||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.location.Location;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.CheckResult;
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import com.navinfo.outdoor.R;
|
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
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.navinfo.outdoor.util.MapManager;
|
||||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
|
||||||
@ -57,7 +50,7 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
|||||||
super.initEvent();
|
super.initEvent();
|
||||||
isSliding = true;
|
isSliding = true;
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.MAIN_BUTTON_VISIABLE;
|
obtain.what = Constant.MAIN_BUTTON_VISITABLE;
|
||||||
obtain.obj = View.GONE;
|
obtain.obj = View.GONE;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
|
||||||
|
@ -14,14 +14,12 @@ import com.navinfo.outdoor.activity.WebActivity;
|
|||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关于页面的fragment
|
* 关于页面的fragment
|
||||||
*/
|
*/
|
||||||
public class AboutFragment extends BaseFragment implements View.OnClickListener {
|
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) {
|
public static AboutFragment newInstance(Bundle bundle) {
|
||||||
AboutFragment fragment = new AboutFragment();
|
AboutFragment fragment = new AboutFragment();
|
||||||
@ -41,21 +39,21 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
rlAbout = findViewById(R.id.rl_about);
|
RelativeLayout rlAbout = findViewById(R.id.rl_about);
|
||||||
rlAbout.setOnClickListener(this::onClick);
|
rlAbout.setOnClickListener(this);
|
||||||
rlServe = findViewById(R.id.rl_serve);
|
RelativeLayout rlServe = findViewById(R.id.rl_serve);
|
||||||
rlServe.setOnClickListener(this::onClick);
|
rlServe.setOnClickListener(this);
|
||||||
rlPrivilege = findViewById(R.id.rl_privilege);
|
RelativeLayout rlPrivilege = findViewById(R.id.rl_privilege);
|
||||||
rlPrivilege.setOnClickListener(this::onClick);
|
rlPrivilege.setOnClickListener(this);
|
||||||
ivAboutFinish =findViewById(R.id.iv_about_finish);
|
ImageView ivAboutFinish = findViewById(R.id.iv_about_finish);
|
||||||
ivAboutFinish.setOnClickListener(this::onClick);
|
ivAboutFinish.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_about_finish:
|
case R.id.iv_about_finish:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.rl_about:
|
case R.id.rl_about:
|
||||||
Intent regardIntent = new Intent(getActivity(), RegardMapActivity.class);
|
Intent regardIntent = new Intent(getActivity(), RegardMapActivity.class);
|
||||||
|
@ -30,12 +30,12 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-能力测评
|
* 发现-能力测评
|
||||||
*/
|
*/
|
||||||
public class CapacityEvaluationFragment extends BaseFragment implements View.OnClickListener {
|
public class CapacityEvaluationFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivEvaluationTaskFinish;
|
|
||||||
private XRecyclerView capacityEvaluationRecycler;
|
private XRecyclerView capacityEvaluationRecycler;
|
||||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||||
private int capacityPage = 1;
|
private int capacityPage = 1;
|
||||||
@ -56,9 +56,9 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.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);
|
capacityEvaluationRecycler = findViewById(R.id.capacity_evaluation_recycler);
|
||||||
ivEvaluationTaskFinish.setOnClickListener(this::onClick);
|
ivEvaluationTaskFinish.setOnClickListener(this);
|
||||||
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
capacityEvaluationRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
capacityEvaluationRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
capacityEvaluationRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
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
|
@Override
|
||||||
@ -169,10 +169,8 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_evaluation_task_finish) {
|
||||||
case R.id.iv_evaluation_task_finish:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,13 +23,13 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 能力测评的第二个页面
|
* 能力测评的第二个页面
|
||||||
*/
|
*/
|
||||||
public class CapacityEvaluationFragment2 extends BaseFragment implements View.OnClickListener {
|
public class CapacityEvaluationFragment2 extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivCapItemFinish;
|
|
||||||
private XRecyclerView capacityRlv;
|
|
||||||
private CapacityItemAdapter capacityItemAdapter;
|
private CapacityItemAdapter capacityItemAdapter;
|
||||||
|
|
||||||
|
|
||||||
@ -47,11 +47,11 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivCapItemFinish = findViewById(R.id.iv_task_capacity2_finish);
|
ImageView ivCapItemFinish = findViewById(R.id.iv_task_capacity2_finish);
|
||||||
capacityRlv = findViewById(R.id.task_capacity2_recycler);
|
XRecyclerView capacityRlv = findViewById(R.id.task_capacity2_recycler);
|
||||||
ivCapItemFinish.setOnClickListener(this::onClick);
|
ivCapItemFinish.setOnClickListener(this);
|
||||||
capacityRlv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
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.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
capacityRlv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
capacityRlv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
capacityRlv.setPullRefreshEnabled(false);
|
capacityRlv.setPullRefreshEnabled(false);
|
||||||
@ -85,7 +85,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
initNetWorks(true);
|
initNetWorks(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWorks(boolean b) {
|
private void initNetWorks(boolean aBoolean) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
@ -102,8 +102,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's"+aBoolean);
|
||||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -118,10 +117,8 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_task_capacity2_finish) {
|
||||||
case R.id.iv_task_capacity2_finish:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -44,11 +44,8 @@ import okhttp3.MediaType;
|
|||||||
* 发现-能力测评条目点击进入测试页面
|
* 发现-能力测评条目点击进入测试页面
|
||||||
*/
|
*/
|
||||||
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
|
public class CapacityMeasurementFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivMeasurementFinish;
|
|
||||||
private RecyclerView capacityMeasurementRel;
|
|
||||||
private CapacityMeasureAdapter capacityMeasureAdapter;
|
private CapacityMeasureAdapter capacityMeasureAdapter;
|
||||||
private ArrayList<BolBean> bolbean;
|
private ArrayList<BolBean> baleen;
|
||||||
private Button btn;
|
|
||||||
private ArrayList<ExamBean> examBeans;
|
private ArrayList<ExamBean> examBeans;
|
||||||
|
|
||||||
private String examId;
|
private String examId;
|
||||||
@ -68,21 +65,21 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivMeasurementFinish = (ImageView) findViewById(R.id.iv_measurement_finish);
|
ImageView ivMeasurementFinish = (ImageView) findViewById(R.id.iv_measurement_finish);
|
||||||
capacityMeasurementRel = (RecyclerView) findViewById(R.id.capacity_measurementRel);
|
RecyclerView capacityMeasurementRel = (RecyclerView) findViewById(R.id.capacity_measurementRel);
|
||||||
ivMeasurementFinish.setOnClickListener(this::onClick);
|
ivMeasurementFinish.setOnClickListener(this);
|
||||||
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
||||||
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
||||||
btn = findViewById(R.id.btn);
|
Button btn = findViewById(R.id.btn);
|
||||||
btn.setOnClickListener(this::onClick);
|
btn.setOnClickListener(this);
|
||||||
gson = new Gson();
|
gson = new Gson();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
bolbean = new ArrayList<>();
|
baleen = new ArrayList<>();
|
||||||
examBeans = new ArrayList<>();
|
examBeans = new ArrayList<>();
|
||||||
|
|
||||||
initNetWorks(true);
|
initNetWorks(true);
|
||||||
@ -111,20 +108,20 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
|
|
||||||
if (multiChoice != null) {
|
if (multiChoice != null) {
|
||||||
for (int i = 0; i < multiChoice.size(); i++) {
|
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();
|
examId = multiChoice.get(i).getExamId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (singleChoice1 != null) {
|
if (singleChoice1 != null) {
|
||||||
for (int i = 0; i < singleChoice1.size(); i++) {
|
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();
|
examId = singleChoice1.get(i).getExamId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bolbean != null) {
|
if (baleen != null) {
|
||||||
capacityMeasureAdapter.setMeasureList(bolbean);
|
capacityMeasureAdapter.setMeasureList(baleen);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
||||||
@ -148,10 +145,10 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
break;
|
break;
|
||||||
case R.id.btn:
|
case R.id.btn:
|
||||||
try {
|
try {
|
||||||
if (bolbean != null) {
|
if (baleen != null) {
|
||||||
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
||||||
for (int i = 0; i < bolbean.size(); i++) {
|
for (int i = 0; i < baleen.size(); i++) {
|
||||||
final String id = bolbean.get(i).getId();
|
final String id = baleen.get(i).getId();
|
||||||
if (!checkedMap.containsKey(id) || checkedMap.get(id) == null || ("").equals(checkedMap.get(id))) {
|
if (!checkedMap.containsKey(id) || checkedMap.get(id) == null || ("").equals(checkedMap.get(id))) {
|
||||||
Toast.makeText(getActivity(), "有题目未填写答案,请仔细检查!", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "有题目未填写答案,请仔细检查!", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -161,13 +158,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
ExamBean examBean = new ExamBean();
|
ExamBean examBean = new ExamBean();
|
||||||
examBean.setId(entry.getKey());
|
examBean.setId(entry.getKey());
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
String[] valus = value.split(",");
|
String[] values = value.split(",");
|
||||||
List<String> answerList = new ArrayList<>();
|
List<String> answerList = new ArrayList<>();
|
||||||
if (valus!=null) {
|
for (String s : values) {
|
||||||
for (int i = 0; i < valus.length; i++) {
|
if (s != null && !s.equals("")) {
|
||||||
if (valus[i]!=null&&!valus[i].equals("")) {
|
answerList.add(s);
|
||||||
answerList.add(valus[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
|
||||||
@ -91,17 +92,14 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
private EditText editDescribe;
|
private EditText editDescribe;
|
||||||
private TextView tvNameContent;
|
private TextView tvNameContent;
|
||||||
private Button btnSaveLocal;
|
private Button btnSaveLocal;
|
||||||
private PoiDatabase poiDatabase;
|
private CheckBox checkBoxLife;
|
||||||
private CheckBox checkBoxLife, checkBoxRight;
|
|
||||||
private Spinner spinnerType, spinnerScutcheon, spinnerStake;
|
private Spinner spinnerType, spinnerScutcheon, spinnerStake;
|
||||||
String[] type = new String[]{"地上五层", "地上四层", "地上三层", "地上二层", "地上一层", "地下一层", "地下二层", "地下三层", "地下四层", "地下五层"};
|
String[] type = new String[]{"地上五层", "地上四层", "地上三层", "地上二层", "地上一层", "地下一层", "地下二层", "地下三层", "地下四层", "地下五层"};
|
||||||
String[] scutcheon = new String[]{"存在", "不存在"};
|
String[] scutcheon = new String[]{"存在", "不存在"};
|
||||||
String[] stake = 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 RelativeLayout rlPanorama, rlCoding, rlEquipment, rlFacility, rlUsable, rlAvailable, rlParking, rlNumber, rlScutcheon, rlDevice;
|
||||||
private ImageView ivPanorama, ivCoding, ivEquipment, ivFacility, ivUsable, ivAvailable, ivParking, ivNumber, ivScutcheon, ivDevice;
|
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 TextView tvPanorama, tvCoding, tvEquipment, tvFacility, tvUsable, tvAvailable, tvParking, tvNumber, tvScutcheon, tvDevice;
|
||||||
private ChargingPileDao chargingPileDao;
|
|
||||||
private int cp_floor = 1;
|
private int cp_floor = 1;
|
||||||
private int sign_exist = 0;
|
private int sign_exist = 0;
|
||||||
private int cp_availableState = 0;
|
private int cp_availableState = 0;
|
||||||
@ -112,7 +110,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
private String station;
|
private String station;
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
private File file;
|
private File file;
|
||||||
private NestedScrollView nestedScrollView;
|
|
||||||
private Marker markerPile;
|
private Marker markerPile;
|
||||||
private Point screenPilePositions;
|
private Point screenPilePositions;
|
||||||
private ChargingPileEntity chargingPileEntity;
|
private ChargingPileEntity chargingPileEntity;
|
||||||
@ -146,7 +143,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
if (arguments != null) {
|
if (arguments != null) {
|
||||||
isSliding = arguments.getBoolean("isSliding", true);
|
isSliding = arguments.getBoolean("isSliding", true);
|
||||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
Log.d("TAG", "onCaress's: " + isSliding);
|
||||||
}
|
}
|
||||||
if (isSliding) {
|
if (isSliding) {
|
||||||
// 监听到返回按钮点击事件
|
// 监听到返回按钮点击事件
|
||||||
@ -177,10 +174,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
ChargingPileDao chargingPileDao = poiDatabase.getChargingPileDao();
|
||||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
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() {
|
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -289,7 +286,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
spinnerType = findViewById(R.id.spinner_type);
|
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); //设置下拉列表框的下拉选项样式
|
adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerType.setAdapter(adapterType);
|
spinnerType.setAdapter(adapterType);
|
||||||
spinnerType.setSelection(4, true);
|
spinnerType.setSelection(4, true);
|
||||||
@ -336,7 +333,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
spinnerScutcheon = findViewById(R.id.spinner_scutcheon);
|
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); //设置下拉列表框的下拉选项样式
|
adapterScutcheon.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerScutcheon.setAdapter(adapterScutcheon);
|
spinnerScutcheon.setAdapter(adapterScutcheon);
|
||||||
spinnerScutcheon.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinnerScutcheon.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@ -364,7 +361,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
spinnerStake = findViewById(R.id.spinner_stake);
|
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); //设置下拉列表框的下拉选项样式
|
adapterStake.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerStake.setAdapter(adapterStake);
|
spinnerStake.setAdapter(adapterStake);
|
||||||
spinnerStake.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinnerStake.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@ -395,53 +392,53 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||||
if (slidingPaneLayout != null) {
|
if (slidingPaneLayout != null) {
|
||||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||||
}
|
}
|
||||||
rlPanorama = findViewById(R.id.rl_panorama);
|
rlPanorama = findViewById(R.id.rl_panorama);
|
||||||
rlPanorama.setOnClickListener(this::onClick);
|
rlPanorama.setOnClickListener(this);
|
||||||
ivPanorama = findViewById(R.id.iv_panorama);
|
ivPanorama = findViewById(R.id.iv_panorama);
|
||||||
tvPanorama = findViewById(R.id.tv_panorama);
|
tvPanorama = findViewById(R.id.tv_panorama);
|
||||||
rlCoding = findViewById(R.id.rl_coding);
|
rlCoding = findViewById(R.id.rl_coding);
|
||||||
rlCoding.setOnClickListener(this::onClick);
|
rlCoding.setOnClickListener(this);
|
||||||
ivCoding = findViewById(R.id.iv_coding);
|
ivCoding = findViewById(R.id.iv_coding);
|
||||||
tvCoding = findViewById(R.id.tv_coding);
|
tvCoding = findViewById(R.id.tv_coding);
|
||||||
rlEquipment = findViewById(R.id.rl_equipment);
|
rlEquipment = findViewById(R.id.rl_equipment);
|
||||||
rlEquipment.setOnClickListener(this::onClick);
|
rlEquipment.setOnClickListener(this);
|
||||||
ivEquipment = findViewById(R.id.iv_equipment);
|
ivEquipment = findViewById(R.id.iv_equipment);
|
||||||
tvEquipment = findViewById(R.id.tv_equipment);
|
tvEquipment = findViewById(R.id.tv_equipment);
|
||||||
rlFacility = findViewById(R.id.rl_facility);
|
rlFacility = findViewById(R.id.rl_facility);
|
||||||
rlFacility.setOnClickListener(this::onClick);
|
rlFacility.setOnClickListener(this);
|
||||||
ivFacility = findViewById(R.id.iv_facility);
|
ivFacility = findViewById(R.id.iv_facility);
|
||||||
tvFacility = findViewById(R.id.tv_facility);
|
tvFacility = findViewById(R.id.tv_facility);
|
||||||
rlUsable = findViewById(R.id.rl_usable);
|
rlUsable = findViewById(R.id.rl_usable);
|
||||||
rlUsable.setOnClickListener(this::onClick);
|
rlUsable.setOnClickListener(this);
|
||||||
ivUsable = findViewById(R.id.iv_usable);
|
ivUsable = findViewById(R.id.iv_usable);
|
||||||
tvUsable = findViewById(R.id.tv_usable);
|
tvUsable = findViewById(R.id.tv_usable);
|
||||||
rlAvailable = findViewById(R.id.rl_available);
|
rlAvailable = findViewById(R.id.rl_available);
|
||||||
rlAvailable.setOnClickListener(this::onClick);
|
rlAvailable.setOnClickListener(this);
|
||||||
ivAvailable = findViewById(R.id.iv_available);
|
ivAvailable = findViewById(R.id.iv_available);
|
||||||
tvAvailable = findViewById(R.id.tv_available);
|
tvAvailable = findViewById(R.id.tv_available);
|
||||||
rlParking = findViewById(R.id.rl_parking);
|
rlParking = findViewById(R.id.rl_parking);
|
||||||
rlParking.setOnClickListener(this::onClick);
|
rlParking.setOnClickListener(this);
|
||||||
ivParking = findViewById(R.id.iv_parking);
|
ivParking = findViewById(R.id.iv_parking);
|
||||||
tvParking = findViewById(R.id.tv_parking);
|
tvParking = findViewById(R.id.tv_parking);
|
||||||
rlNumber = findViewById(R.id.rl_number);
|
rlNumber = findViewById(R.id.rl_number);
|
||||||
rlNumber.setOnClickListener(this::onClick);
|
rlNumber.setOnClickListener(this);
|
||||||
ivNumber = findViewById(R.id.iv_number);
|
ivNumber = findViewById(R.id.iv_number);
|
||||||
tvNumber = findViewById(R.id.tv_number);
|
tvNumber = findViewById(R.id.tv_number);
|
||||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||||
rlScutcheon.setOnClickListener(this::onClick);
|
rlScutcheon.setOnClickListener(this);
|
||||||
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
||||||
tvScutcheon = findViewById(R.id.tv_scutcheon);
|
tvScutcheon = findViewById(R.id.tv_scutcheon);
|
||||||
rlDevice = findViewById(R.id.rl_device);
|
rlDevice = findViewById(R.id.rl_device);
|
||||||
rlDevice.setOnClickListener(this::onClick);
|
rlDevice.setOnClickListener(this);
|
||||||
ivDevice = findViewById(R.id.iv_device);
|
ivDevice = findViewById(R.id.iv_device);
|
||||||
tvDevice = findViewById(R.id.tv_device);
|
tvDevice = findViewById(R.id.tv_device);
|
||||||
editDescribe = findViewById(R.id.edit_describe);
|
editDescribe = findViewById(R.id.edit_describe);
|
||||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||||
btnSaveLocal.setOnClickListener(this::onClick);
|
btnSaveLocal.setOnClickListener(this);
|
||||||
//展示数据
|
//展示数据
|
||||||
initShowPileSharePre();
|
initShowPileSharePre();
|
||||||
onLongDelPic();
|
onLongDelPic();
|
||||||
@ -452,7 +449,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivAvailable.setImageDrawable(null);
|
ivAvailable.setImageDrawable(null);
|
||||||
@ -466,7 +463,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivUsable.setImageDrawable(null);
|
ivUsable.setImageDrawable(null);
|
||||||
@ -480,7 +477,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivScutcheon.setImageDrawable(null);
|
ivScutcheon.setImageDrawable(null);
|
||||||
@ -494,7 +491,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivParking.setImageDrawable(null);
|
ivParking.setImageDrawable(null);
|
||||||
@ -508,7 +505,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivPanorama.setImageDrawable(null);
|
ivPanorama.setImageDrawable(null);
|
||||||
@ -522,7 +519,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivNumber.setImageDrawable(null);
|
ivNumber.setImageDrawable(null);
|
||||||
@ -536,7 +533,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivFacility.setImageDrawable(null);
|
ivFacility.setImageDrawable(null);
|
||||||
@ -550,7 +547,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivEquipment.setImageDrawable(null);
|
ivEquipment.setImageDrawable(null);
|
||||||
@ -564,7 +561,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivDevice.setImageDrawable(null);
|
ivDevice.setImageDrawable(null);
|
||||||
@ -578,7 +575,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivCoding.setImageDrawable(null);
|
ivCoding.setImageDrawable(null);
|
||||||
@ -591,6 +588,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initShowPileSharePre() {
|
private void initShowPileSharePre() {
|
||||||
|
assert getArguments() != null;
|
||||||
station = getArguments().getString("station");
|
station = getArguments().getString("station");
|
||||||
if (station != null) {
|
if (station != null) {
|
||||||
PoiEntity showPoiEntity = new Gson().fromJson(station, PoiEntity.class);
|
PoiEntity showPoiEntity = new Gson().fromJson(station, PoiEntity.class);
|
||||||
@ -601,7 +599,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
if (chargingPileEntity != null) {
|
if (chargingPileEntity != null) {
|
||||||
String name = chargingPileEntity.getName();//名称
|
String name = chargingPileEntity.getName();//名称
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
tvNameContent.setText(name + "");
|
tvNameContent.setText(name);
|
||||||
}
|
}
|
||||||
String p = chargingPileEntity.getP();
|
String p = chargingPileEntity.getP();
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
@ -637,16 +635,16 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
String cp_openType = chargingPileEntity.getCp_openType();
|
String cp_openType = chargingPileEntity.getCp_openType();
|
||||||
if (cp_openType!=null&&!cp_openType.equals("")){
|
if (cp_openType!=null&&!cp_openType.equals("")){
|
||||||
String[] split = cp_openType.split(",");
|
String[] split = cp_openType.split(",");
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (String s : split) {
|
||||||
if (Integer.valueOf(split[i])==1){
|
if (Integer.parseInt(s) == 1) {
|
||||||
checkButton1.setChecked(true);
|
checkButton1.setChecked(true);
|
||||||
}else if (Integer.valueOf(split[i])==2){
|
} else if (Integer.parseInt(s) == 2) {
|
||||||
checkButton2.setChecked(true);
|
checkButton2.setChecked(true);
|
||||||
}else if (Integer.valueOf(split[i])==3){
|
} else if (Integer.parseInt(s) == 3) {
|
||||||
checkButton3.setChecked(true);
|
checkButton3.setChecked(true);
|
||||||
}else if (Integer.valueOf(split[i])==4){
|
} else if (Integer.parseInt(s) == 4) {
|
||||||
checkButton4.setChecked(true);
|
checkButton4.setChecked(true);
|
||||||
}else if (Integer.valueOf(split[i])==5){
|
} else if (Integer.parseInt(s) == 5) {
|
||||||
checkButton5.setChecked(true);
|
checkButton5.setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -684,10 +682,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
String photo = chargingPileEntity.getPhotos().get(i);
|
String photo = chargingPileEntity.getPhotos().get(i);
|
||||||
String[] split = photo.split("/");
|
String[] split = photo.split("/");
|
||||||
if (split[split.length - 1].startsWith("a")) {
|
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);
|
tvPanorama.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("b")) {
|
} 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);
|
tvCoding.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("c")) {
|
} else if (split[split.length - 1].startsWith("c")) {
|
||||||
cList.add(photo);
|
cList.add(photo);
|
||||||
@ -750,17 +748,17 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
public void setCList(ArrayList<String> list) {
|
public void setCList(ArrayList<String> list) {
|
||||||
switch (list.size()) {
|
switch (list.size()) {
|
||||||
case 1:
|
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));
|
tvEquipment.setTag(list.get(0));
|
||||||
break;
|
break;
|
||||||
case 2:
|
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));
|
tvEquipment.setTag(list.get(0));
|
||||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||||
tvFacility.setTag(list.get(1));
|
tvFacility.setTag(list.get(1));
|
||||||
break;
|
break;
|
||||||
case 3:
|
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));
|
tvEquipment.setTag(list.get(0));
|
||||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||||
tvFacility.setTag(list.get(1));
|
tvFacility.setTag(list.get(1));
|
||||||
@ -768,7 +766,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
tvScutcheon.setTag(list.get(2));
|
tvScutcheon.setTag(list.get(2));
|
||||||
break;
|
break;
|
||||||
case 4:
|
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));
|
tvEquipment.setTag(list.get(0));
|
||||||
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
Glide.with(getActivity()).load(list.get(1)).into(ivFacility);
|
||||||
tvFacility.setTag(list.get(1));
|
tvFacility.setTag(list.get(1));
|
||||||
@ -783,11 +781,11 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
public void setDList(ArrayList<String> list) {
|
public void setDList(ArrayList<String> list) {
|
||||||
switch (list.size()) {
|
switch (list.size()) {
|
||||||
case 1:
|
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));
|
tvUsable.setTag(list.get(0));
|
||||||
break;
|
break;
|
||||||
case 2:
|
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));
|
tvUsable.setTag(list.get(0));
|
||||||
Glide.with(getActivity()).load(list.get(1)).into(ivAvailable);
|
Glide.with(getActivity()).load(list.get(1)).into(ivAvailable);
|
||||||
tvAvailable.setTag(list.get(1));
|
tvAvailable.setTag(list.get(1));
|
||||||
@ -798,11 +796,11 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
public void setEList(ArrayList<String> list) {
|
public void setEList(ArrayList<String> list) {
|
||||||
switch (list.size()) {
|
switch (list.size()) {
|
||||||
case 1:
|
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));
|
tvParking.setTag(list.get(0));
|
||||||
break;
|
break;
|
||||||
case 2:
|
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));
|
tvParking.setTag(list.get(0));
|
||||||
Glide.with(getActivity()).load(list.get(1)).into(ivNumber);
|
Glide.with(getActivity()).load(list.get(1)).into(ivNumber);
|
||||||
tvNumber.setTag(list.get(1));
|
tvNumber.setTag(list.get(1));
|
||||||
@ -870,7 +868,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
long[] result = InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity);
|
long[] result = InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (result[0] != 0) {
|
if (result[0] != 0) {
|
||||||
@ -906,7 +904,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
if (never) {
|
if (never) {
|
||||||
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予权限", Toast.LENGTH_SHORT).show();
|
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目录下生成
|
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
||||||
//一个以该参数命名的.xml文件。第二个mode表示创建的模式,通过查看
|
//一个以该参数命名的.xml文件。第二个mode表示创建的模式,通过查看
|
||||||
//方法注释得知,建议以0或者MODE_PRIVATE为默认值。
|
//方法注释得知,建议以0或者MODE_PRIVATE为默认值。
|
||||||
SharedPreferences poi = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
|
SharedPreferences poi = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
|
||||||
//获取Editor对象
|
//获取Editor对象
|
||||||
SharedPreferences.Editor edit = poi.edit();
|
SharedPreferences.Editor edit = poi.edit();
|
||||||
//根据要保存的数据的类型,调用对应的put方法,
|
//根据要保存的数据的类型,调用对应的put方法,
|
||||||
@ -1054,7 +1052,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
edit.putString("poiEntity", station);
|
edit.putString("poiEntity", station);
|
||||||
}
|
}
|
||||||
//提交新值。必须执行,否则前面的操作都无效。
|
//提交新值。必须执行,否则前面的操作都无效。
|
||||||
edit.commit();
|
edit.apply();
|
||||||
Log.d("TAG", "initPileSharePre: " + newChargingPileEntity);
|
Log.d("TAG", "initPileSharePre: " + newChargingPileEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1192,7 +1190,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
chargingPileEntity.setP(encode);
|
chargingPileEntity.setP(encode);
|
||||||
}
|
}
|
||||||
String name = tvNameContent.getText().toString().trim();//名称
|
String name = tvNameContent.getText().toString().trim();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (!name.equals("")) {
|
||||||
chargingPileEntity.setName(name);
|
chargingPileEntity.setName(name);
|
||||||
}
|
}
|
||||||
if (cp_floor != 0) {
|
if (cp_floor != 0) {
|
||||||
@ -1242,7 +1240,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
chargingPileEntity.setSign_exist(sign_exist);
|
chargingPileEntity.setSign_exist(sign_exist);
|
||||||
chargingPileEntity.setCp_availableState(cp_availableState);
|
chargingPileEntity.setCp_availableState(cp_availableState);
|
||||||
String describe = editDescribe.getText().toString().trim();
|
String describe = editDescribe.getText().toString().trim();
|
||||||
if (describe != null && !describe.equals("")) {
|
if (!describe.equals("")) {
|
||||||
chargingPileEntity.setMemo(describe);
|
chargingPileEntity.setMemo(describe);
|
||||||
}
|
}
|
||||||
if (pid != null) {
|
if (pid != null) {
|
||||||
@ -1256,7 +1254,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
openType.append(buffer3);
|
openType.append(buffer3);
|
||||||
openType.append(buffer4);
|
openType.append(buffer4);
|
||||||
openType.append(buffer5);
|
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();
|
String charAt = openType.deleteCharAt(openType.length() - 1).toString();
|
||||||
chargingPileEntity.setCp_openType(charAt);
|
chargingPileEntity.setCp_openType(charAt);
|
||||||
} else {
|
} else {
|
||||||
|
@ -105,17 +105,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
private EditText editNameContent, editSiteContent;
|
private EditText editNameContent, editSiteContent;
|
||||||
private ArrayList<PhoneBean> poiBeans;
|
private ArrayList<PhoneBean> poiBeans;
|
||||||
private Button btnSaveLocal, btnUploading;
|
private Button btnSaveLocal, btnUploading;
|
||||||
private PoiDatabase poiDatabase;
|
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private CheckBox checkBoxLife,checkBoxRight;
|
private CheckBox checkBoxLife;
|
||||||
private Spinner spinnerType;
|
private Spinner spinnerType;
|
||||||
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
|
|
||||||
private int existence = 0;
|
private int existence = 0;
|
||||||
private ArrayAdapter<String> adapter;
|
|
||||||
private LinearLayout linearChargingPile;
|
private LinearLayout linearChargingPile;
|
||||||
private RecyclerView recyclerStation;
|
|
||||||
private ChargingPileAdapter chargingPileAdapter;
|
private ChargingPileAdapter chargingPileAdapter;
|
||||||
private int station_type = 0;
|
private int station_type = 0;
|
||||||
private ChargingPileDao chargingPileDao;
|
private ChargingPileDao chargingPileDao;
|
||||||
@ -166,7 +163,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
if (arguments != null) {
|
if (arguments != null) {
|
||||||
isSliding = arguments.getBoolean("isSliding", true);
|
isSliding = arguments.getBoolean("isSliding", true);
|
||||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
Log.d("TAG", "onCaresses: " + isSliding);
|
||||||
}
|
}
|
||||||
if (isSliding) {
|
if (isSliding) {
|
||||||
// 监听到返回按钮点击事件
|
// 监听到返回按钮点击事件
|
||||||
@ -207,11 +204,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
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);
|
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||||
removablesLocality=new ArrayList<>();
|
removablesLocality=new ArrayList<>();
|
||||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||||
@ -220,15 +217,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
//添加桩
|
//添加桩
|
||||||
linearChargingPile = findViewById(R.id.linear_charging_pile);
|
linearChargingPile = findViewById(R.id.linear_charging_pile);
|
||||||
linearChargingPile.setOnClickListener(this::onClick);
|
linearChargingPile.setOnClickListener(this);
|
||||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||||
btnSaveLocal.setOnClickListener(this::onClick);
|
btnSaveLocal.setOnClickListener(this);
|
||||||
btnUploading = findViewById(R.id.btn_uploading);
|
btnUploading = findViewById(R.id.btn_uploading);
|
||||||
btnUploading.setOnClickListener(this::onClick);
|
btnUploading.setOnClickListener(this);
|
||||||
editNameContent = findViewById(R.id.tv_name_content);
|
editNameContent = findViewById(R.id.tv_name_content);
|
||||||
editSiteContent = findViewById(R.id.tv_site_content);
|
editSiteContent = findViewById(R.id.tv_site_content);
|
||||||
tvExamine = findViewById(R.id.tv_station_examine);
|
tvExamine = findViewById(R.id.tv_station_examine);
|
||||||
tvExamine.setOnClickListener(this::onClick);
|
tvExamine.setOnClickListener(this);
|
||||||
editDescribe = findViewById(R.id.edit_describe);
|
editDescribe = findViewById(R.id.edit_describe);
|
||||||
ivPanorama = findViewById(R.id.iv_panorama);
|
ivPanorama = findViewById(R.id.iv_panorama);
|
||||||
ivName = findViewById(R.id.iv_name);
|
ivName = findViewById(R.id.iv_name);
|
||||||
@ -237,16 +234,16 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
ivElse = findViewById(R.id.iv_else);
|
ivElse = findViewById(R.id.iv_else);
|
||||||
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
ivScutcheon = findViewById(R.id.iv_scutcheon);
|
||||||
rlPanorama = findViewById(R.id.rl_panorama);
|
rlPanorama = findViewById(R.id.rl_panorama);
|
||||||
rlPanorama.setOnClickListener(this::onClick);
|
rlPanorama.setOnClickListener(this);
|
||||||
rlName = findViewById(R.id.rl_name);
|
rlName = findViewById(R.id.rl_name);
|
||||||
rlName.setOnClickListener(this::onClick);
|
rlName.setOnClickListener(this);
|
||||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
rlInternalPhotos.setOnClickListener(this);
|
||||||
rlNull = findViewById(R.id.rl_null);
|
rlNull = findViewById(R.id.rl_null);
|
||||||
rlElse = findViewById(R.id.rl_else);
|
rlElse = findViewById(R.id.rl_else);
|
||||||
rlElse.setOnClickListener(this::onClick);
|
rlElse.setOnClickListener(this);
|
||||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||||
rlScutcheon.setOnClickListener(this::onClick);
|
rlScutcheon.setOnClickListener(this);
|
||||||
tvPanorama = findViewById(R.id.tv_panorama);
|
tvPanorama = findViewById(R.id.tv_panorama);
|
||||||
tvElse = findViewById(R.id.tv_else);
|
tvElse = findViewById(R.id.tv_else);
|
||||||
tvInternal = findViewById(R.id.tv_internal);
|
tvInternal = findViewById(R.id.tv_internal);
|
||||||
@ -257,7 +254,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
recyclerPhone.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||||
poiRecycleAdapter = new PoiRecycleAdapter(getContext());
|
poiRecycleAdapter = new PoiRecycleAdapter(getContext());
|
||||||
recyclerPhone.setAdapter(poiRecycleAdapter);*/
|
recyclerPhone.setAdapter(poiRecycleAdapter);*/
|
||||||
recyclerStation = findViewById(R.id.recycler_station);
|
RecyclerView recyclerStation = findViewById(R.id.recycler_station);
|
||||||
recyclerStation.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
recyclerStation.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||||
chargingPileAdapter = new ChargingPileAdapter(getContext());
|
chargingPileAdapter = new ChargingPileAdapter(getContext());
|
||||||
recyclerStation.setAdapter(chargingPileAdapter);
|
recyclerStation.setAdapter(chargingPileAdapter);
|
||||||
@ -315,7 +312,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
});
|
});
|
||||||
checkBoxRight.setVisibility(View.GONE);
|
checkBoxRight.setVisibility(View.GONE);
|
||||||
spinnerType = findViewById(R.id.spinner_type);
|
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); //设置下拉列表框的下拉选项样式
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerType.setAdapter(adapter);
|
spinnerType.setAdapter(adapter);
|
||||||
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinnerType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@ -456,7 +453,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
|
|
||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
|
assert getArguments() != null;
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
|
assert showPoiEntity != null;
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
tvExamine.setVisibility(View.GONE);
|
tvExamine.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
@ -518,24 +517,20 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
String[] split = phones[i].split("-");
|
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));
|
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (phones[i] != null) {
|
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
String[] split = phones[i].split("-");
|
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));
|
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||||
@ -735,6 +730,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
currentChargingPileList.add(chargingPileEntity);
|
currentChargingPileList.add(chargingPileEntity);
|
||||||
} else {
|
} else {
|
||||||
|
assert currentChargingPileList != null;
|
||||||
currentChargingPileList.add(chargingPileEntity);
|
currentChargingPileList.add(chargingPileEntity);
|
||||||
}
|
}
|
||||||
chargingPileAdapter.notifyDataSetChanged();
|
chargingPileAdapter.notifyDataSetChanged();
|
||||||
@ -774,7 +770,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
obtain.obj = false;
|
obtain.obj = false;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
String name = editNameContent.getText().toString().trim();//名称
|
String name = editNameContent.getText().toString().trim();//名称
|
||||||
if (name == null || name.equals("")) {
|
if (name.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入充电站 名称", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入充电站 名称", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -938,6 +934,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.fileList(chargingPileFileList).postFileSynchronization();
|
.fileList(chargingPileFileList).postFileSynchronization();
|
||||||
if(execute!=null){
|
if(execute!=null){
|
||||||
|
assert execute.body() != null;
|
||||||
String pileUpLoadResultStr = execute.body().string();
|
String pileUpLoadResultStr = execute.body().string();
|
||||||
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||||
if (uploadBeanResult != null) {
|
if (uploadBeanResult != null) {
|
||||||
@ -1322,21 +1319,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivPanorama);
|
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivPanorama);
|
||||||
tvPanorama.setTag(photoPath);
|
tvPanorama.setTag(photoPath);
|
||||||
photoFile = null;
|
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) {
|
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||||
if (photoFile == null || !photoFile.exists()) {
|
if (photoFile == null || !photoFile.exists()) {
|
||||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||||
@ -1345,21 +1327,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivName);
|
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivName);
|
||||||
tvNamePic.setTag(photoPath);
|
tvNamePic.setTag(photoPath);
|
||||||
photoFile = null;
|
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) {
|
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||||
if (photoFile == null || !photoFile.exists()) {
|
if (photoFile == null || !photoFile.exists()) {
|
||||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||||
@ -1368,21 +1335,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivInternal);
|
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivInternal);
|
||||||
tvInternal.setTag(photoPath);
|
tvInternal.setTag(photoPath);
|
||||||
photoFile = null;
|
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) {
|
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||||
if (photoFile == null || !photoFile.exists()) {
|
if (photoFile == null || !photoFile.exists()) {
|
||||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||||
@ -1391,21 +1343,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivElse);
|
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivElse);
|
||||||
tvElse.setTag(photoPath);
|
tvElse.setTag(photoPath);
|
||||||
photoFile = null;
|
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) {
|
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||||
if (photoFile == null || !photoFile.exists()) {
|
if (photoFile == null || !photoFile.exists()) {
|
||||||
ToastUtil.showShort(getActivity(), "取消拍照");
|
ToastUtil.showShort(getActivity(), "取消拍照");
|
||||||
@ -1414,22 +1351,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivScutcheon);
|
String photoPath = PhotoUtils.showPhotoAndGetPath(photoFile, ivScutcheon);
|
||||||
tvScutcheon.setTag(photoPath);
|
tvScutcheon.setTag(photoPath);
|
||||||
photoFile = null;
|
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();
|
.params(httpParams).getSynchronization();
|
||||||
if(execute!=null){
|
if(execute!=null){
|
||||||
String responseBodyStr = execute.body().string();
|
String responseBodyStr = execute.body().string();
|
||||||
if (responseBodyStr != null) {
|
Gson gson = new Gson();
|
||||||
Gson gson = new Gson();
|
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
||||||
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
if (chargingPileSaveBean.getCode() != 200) {
|
||||||
if (chargingPileSaveBean.getCode() != 200) {
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity); // 更新当前充电桩的bodyId
|
|
||||||
}
|
}
|
||||||
|
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||||
|
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntity); // 更新当前充电桩的bodyId
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
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
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
@ -1570,11 +1465,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||||
List<Info> infoPhoto = new ArrayList<>();
|
List<Info> infoPhoto = new ArrayList<>();
|
||||||
String name = editNameContent.getText().toString().trim();//名称
|
String name = editNameContent.getText().toString().trim();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (!name.equals("")) {
|
||||||
poiEntity.setName(name);
|
poiEntity.setName(name);
|
||||||
}
|
}
|
||||||
String site = editSiteContent.getText().toString().trim();
|
String site = editSiteContent.getText().toString().trim();
|
||||||
if (site != null && !site.equals("")) {
|
if (!site.equals("")) {
|
||||||
poiEntity.setAddress(site);
|
poiEntity.setAddress(site);
|
||||||
}
|
}
|
||||||
if (latLng != null) {
|
if (latLng != null) {
|
||||||
@ -1584,7 +1479,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
poiEntity.setY(String.valueOf(latLng.latitude));
|
poiEntity.setY(String.valueOf(latLng.latitude));
|
||||||
}
|
}
|
||||||
String describe = editDescribe.getText().toString().trim();
|
String describe = editDescribe.getText().toString().trim();
|
||||||
if (describe != null && !describe.equals("")) {
|
if (!describe.equals("")) {
|
||||||
poiEntity.setMemo(describe);
|
poiEntity.setMemo(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
|
@ -14,34 +14,6 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
*/
|
*/
|
||||||
public class ContactFragment extends BaseFragment implements View.OnClickListener {
|
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) {
|
public static ContactFragment newInstance(Bundle bundle) {
|
||||||
ContactFragment fragment = new ContactFragment();
|
ContactFragment fragment = new ContactFragment();
|
||||||
@ -62,70 +34,68 @@ public class ContactFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivContact = findViewById(R.id.iv_contact);
|
ImageView ivContact = findViewById(R.id.iv_contact);
|
||||||
ivContact.setOnClickListener(this);
|
ivContact.setOnClickListener(this);
|
||||||
|
|
||||||
tvJingName = (TextView) findViewById(R.id.tv_jingName);
|
TextView tvJigName = (TextView) findViewById(R.id.tv_jingName);
|
||||||
tvJingName.setText(Constant.REGION_JING_NAME);
|
tvJigName.setText(Constant.REGION_JIG_NAME);
|
||||||
tvJingPhone = (TextView) findViewById(R.id.tv_jingPhone);
|
TextView tvJigPhone = (TextView) findViewById(R.id.tv_jingPhone);
|
||||||
tvJingPhone.setText(Constant.REGION_JING_PHONE);
|
tvJigPhone.setText(Constant.REGION_JIG_PHONE);
|
||||||
tvHeiName = (TextView) findViewById(R.id.tv_heiName);
|
TextView tvHeiName = (TextView) findViewById(R.id.tv_heiName);
|
||||||
tvHeiName.setText(Constant.REGION_HEI_NAME);
|
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);
|
tvHeiPhone.setText(Constant.REGION_HEI_PHONE);
|
||||||
tvShanName = (TextView) findViewById(R.id.tv_shanName);
|
TextView tvSanName = (TextView) findViewById(R.id.tv_shanName);
|
||||||
tvShanName.setText(Constant.REGION_SHAN_NAME);
|
tvSanName.setText(Constant.REGION_SAN_NAME);
|
||||||
tvShanPhone = (TextView) findViewById(R.id.tv_shanPhone);
|
TextView tvSanPhone = (TextView) findViewById(R.id.tv_shanPhone);
|
||||||
tvShanPhone.setText(Constant.REGION_SHAN_PHONE);
|
tvSanPhone.setText(Constant.REGION_SAN_PHONE);
|
||||||
tvYuName = (TextView) findViewById(R.id.tv_yuName);
|
TextView tvYuName = (TextView) findViewById(R.id.tv_yuName);
|
||||||
tvYuName.setText(Constant.REGION_YU_NAME);
|
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);
|
tvYuPhone.setText(Constant.REGION_YU_PHONE);
|
||||||
tvChuanName = (TextView) findViewById(R.id.tv_chuanName);
|
TextView tvChanName = (TextView) findViewById(R.id.tv_chuanName);
|
||||||
tvChuanName.setText(Constant.REGION_CHUAN_NAME);
|
tvChanName.setText(Constant.REGION_CHAN_NAME);
|
||||||
tvChuanPhone = (TextView) findViewById(R.id.tv_chuanPhone);
|
TextView tvChanPhone = (TextView) findViewById(R.id.tv_chuanPhone);
|
||||||
tvChuanPhone.setText(Constant.REGION_CHUAN_PHONE);
|
tvChanPhone.setText(Constant.REGION_CHAN_PHONE);
|
||||||
tvGanName = (TextView) findViewById(R.id.tv_ganName);
|
TextView tvGanName = (TextView) findViewById(R.id.tv_ganName);
|
||||||
tvGanName.setText(Constant.REGION_GAN_NAME);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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);
|
tvFuPhone.setText(Constant.REGION_FU_PHONE);
|
||||||
tvGuangName = (TextView) findViewById(R.id.tv_guangName);
|
TextView tvGangName = (TextView) findViewById(R.id.tv_guangName);
|
||||||
tvGuangName.setText(Constant.REGION_GUANG_NAME);
|
tvGangName.setText(Constant.REGION_GANG_NAME);
|
||||||
tvGuangPhone = (TextView) findViewById(R.id.tv_guangPhone);
|
TextView tvGangPhone = (TextView) findViewById(R.id.tv_guangPhone);
|
||||||
tvGuangPhone.setText(Constant.REGION_GUANG_PHONE);
|
tvGangPhone.setText(Constant.REGION_GANG_PHONE);
|
||||||
tvGanzName = (TextView) findViewById(R.id.tv_ganzName);
|
TextView tvGabeName = (TextView) findViewById(R.id.tv_ganzName);
|
||||||
tvGanzName.setText(Constant.REGION_GANZ_NAME);
|
tvGabeName.setText(Constant.REGION_GANZ_NAME);
|
||||||
tvGanzPhone = (TextView) findViewById(R.id.tv_ganzPhone);
|
TextView tvGabePhone = (TextView) findViewById(R.id.tv_ganzPhone);
|
||||||
tvGanzPhone.setText(Constant.REGION_GANZ_PHONE);
|
tvGabePhone.setText(Constant.REGION_GANZ_PHONE);
|
||||||
tvYueName = (TextView) findViewById(R.id.tv_yueName);
|
TextView tvYueName = (TextView) findViewById(R.id.tv_yueName);
|
||||||
tvYueName.setText(Constant.REGION_YUE_NAME);
|
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);
|
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);
|
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);
|
tvYunPhone.setText(Constant.REGION_YUN_PHONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_contact) {
|
||||||
case R.id.iv_contact:
|
getActivity().finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class EventPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
public class EventPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivEventTask;
|
|
||||||
private XRecyclerView eventRecycler;
|
private XRecyclerView eventRecycler;
|
||||||
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
||||||
private EventPrefectureAdapter eventPrefectureAdapter;
|
private EventPrefectureAdapter eventPrefectureAdapter;
|
||||||
@ -132,7 +131,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivEventTask = findViewById(R.id.iv_event_task);
|
ImageView ivEventTask = findViewById(R.id.iv_event_task);
|
||||||
ivEventTask.setOnClickListener(this::onClick);
|
ivEventTask.setOnClickListener(this::onClick);
|
||||||
eventRecycler = findViewById(R.id.event_recycler);
|
eventRecycler = findViewById(R.id.event_recycler);
|
||||||
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
@ -167,10 +166,8 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_event_task) {
|
||||||
case R.id.iv_event_task:
|
getActivity().finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,14 @@ package com.navinfo.outdoor.fragment;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.slidingpanelayout.widget.SlidingPaneLayout;
|
|
||||||
|
|
||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
@ -24,14 +20,12 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.adapter.FilterAdapter;
|
import com.navinfo.outdoor.adapter.FilterAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
|
||||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.PoiDao;
|
import com.navinfo.outdoor.room.PoiDao;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
|
||||||
@ -39,7 +33,6 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -180,7 +173,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
poiEntity.setTelPhone(list.get(i).getTelephone() + "");
|
poiEntity.setTelPhone(list.get(i).getTelephone() + "");
|
||||||
poiEntity.setPrecision(list.get(i).getPrice()+"");
|
poiEntity.setPrecision(list.get(i).getPrice()+"");
|
||||||
poiEntity.setDist(list.get(i).getDist()+"");
|
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();
|
String geo = list.get(i).getGeo();
|
||||||
poiEntity.setGeoWkt(geo);
|
poiEntity.setGeoWkt(geo);
|
||||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
@ -213,21 +206,21 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
poiEntities = new ArrayList<>();
|
poiEntities = new ArrayList<>();
|
||||||
clNumber = findViewById(R.id.cl_number);
|
clNumber = findViewById(R.id.cl_number);
|
||||||
clNumber.setOnClickListener(this::onClick);
|
clNumber.setOnClickListener(this);
|
||||||
tvNumber = findViewById(R.id.tv_number);
|
tvNumber = findViewById(R.id.tv_number);
|
||||||
tvNumber.setText(Constant.NUMBER + "");
|
tvNumber.setText(Constant.NUMBER + "");
|
||||||
clPhotograph = findViewById(R.id.cl_photograph);
|
clPhotograph = findViewById(R.id.cl_photograph);
|
||||||
clPhotograph.setOnClickListener(this::onClick);
|
clPhotograph.setOnClickListener(this);
|
||||||
tvPhotograph = findViewById(R.id.tv_photograph);
|
tvPhotograph = findViewById(R.id.tv_photograph);
|
||||||
if (Constant.LIMIT_TTPE == -1) {//"全部", "普通任务", "专属任务"
|
if (Constant.LIMIT_TYPE == -1) {//"全部", "普通任务", "专属任务"
|
||||||
tvPhotograph.setText("全部");
|
tvPhotograph.setText("全部");
|
||||||
} else if (Constant.LIMIT_TTPE == 0) {
|
} else if (Constant.LIMIT_TYPE == 0) {
|
||||||
tvPhotograph.setText("普通任务");
|
tvPhotograph.setText("普通任务");
|
||||||
} else if (Constant.LIMIT_TTPE == 1) {
|
} else if (Constant.LIMIT_TYPE == 1) {
|
||||||
tvPhotograph.setText("专属任务");
|
tvPhotograph.setText("专属任务");
|
||||||
}
|
}
|
||||||
clExclusive = findViewById(R.id.cl_exclusive);
|
clExclusive = findViewById(R.id.cl_exclusive);
|
||||||
clExclusive.setOnClickListener(this::onClick);
|
clExclusive.setOnClickListener(this);
|
||||||
tvExclusive = findViewById(R.id.tv_exclusive);
|
tvExclusive = findViewById(R.id.tv_exclusive);
|
||||||
if (Constant.TASK_TYPE == -1) {//"全部", "poi", "充电站", "POI录像", "道路录像", "其他", "面状任务"
|
if (Constant.TASK_TYPE == -1) {//"全部", "poi", "充电站", "POI录像", "道路录像", "其他", "面状任务"
|
||||||
tvExclusive.setText("全部");
|
tvExclusive.setText("全部");
|
||||||
@ -245,22 +238,22 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
tvExclusive.setText("面状任务");
|
tvExclusive.setText("面状任务");
|
||||||
}
|
}
|
||||||
clType = findViewById(R.id.cl_type);
|
clType = findViewById(R.id.cl_type);
|
||||||
clType.setOnClickListener(this::onClick);
|
clType.setOnClickListener(this);
|
||||||
tvType = findViewById(R.id.tv_type);
|
tvType = findViewById(R.id.tv_type);
|
||||||
if (Constant.TASK_STASTUS == -1) {//"未领取", "已领取", "未保存", "已保存"
|
if (Constant.TASK_STARTUP == -1) {//"未领取", "已领取", "未保存", "已保存"
|
||||||
tvType.setText("全部");
|
tvType.setText("全部");
|
||||||
} else if (Constant.TASK_STASTUS == 0) {
|
} else if (Constant.TASK_STARTUP == 0) {
|
||||||
tvType.setText("未领取");
|
tvType.setText("未领取");
|
||||||
} else if (Constant.TASK_STASTUS == 1) {
|
} else if (Constant.TASK_STARTUP == 1) {
|
||||||
tvType.setText("已领取");
|
tvType.setText("已领取");
|
||||||
}/* else if (Constant.TASK_STASTUS == 2) {
|
}/* else if (Constant.TASK_STATUS == 2) {
|
||||||
tvType.setText("未保存");
|
tvType.setText("未保存");
|
||||||
} else if (Constant.TASK_STASTUS == 3) {
|
} else if (Constant.TASK_STATUS == 3) {
|
||||||
tvType.setText("已保存");
|
tvType.setText("已保存");
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
btnFilter = findViewById(R.id.btn_filter);
|
btnFilter = findViewById(R.id.btn_filter);
|
||||||
btnFilter.setOnClickListener(this::onClick);
|
btnFilter.setOnClickListener(this);
|
||||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||||
recyclerFilter = findViewById(R.id.recycler_filter);
|
recyclerFilter = findViewById(R.id.recycler_filter);
|
||||||
if (slidingPaneLayout!=null) {
|
if (slidingPaneLayout!=null) {
|
||||||
@ -360,13 +353,13 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
tvPhotograph.setText(text);
|
tvPhotograph.setText(text);
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
Constant.LIMIT_TTPE = -1;
|
Constant.LIMIT_TYPE = -1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Constant.LIMIT_TTPE = 0;
|
Constant.LIMIT_TYPE = 0;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Constant.LIMIT_TTPE = 1;
|
Constant.LIMIT_TYPE = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
@ -378,7 +371,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
1 "POI"
|
1 "POI"
|
||||||
2 "充电站"
|
2 "充电站"
|
||||||
3 "POI录像"
|
3 "POI录像"
|
||||||
@ -430,19 +423,19 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
tvType.setText(text);
|
tvType.setText(text);
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
Constant.TASK_STASTUS = -1;
|
Constant.TASK_STARTUP = -1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Constant.TASK_STASTUS = 0;
|
Constant.TASK_STARTUP = 0;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Constant.TASK_STASTUS = 1;
|
Constant.TASK_STARTUP = 1;
|
||||||
break;
|
break;
|
||||||
/* case 3:
|
/* case 3:
|
||||||
Constant.TASK_STASTUS = 2;
|
Constant.TASK_STATUS = 2;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Constant.TASK_STASTUS = 3;
|
Constant.TASK_STATUS = 3;
|
||||||
break;*/
|
break;*/
|
||||||
}
|
}
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
|
@ -17,11 +17,6 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
*/
|
*/
|
||||||
public class FindFragment extends BaseFragment implements View.OnClickListener{
|
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) {
|
public static FindFragment newInstance(Bundle bundle) {
|
||||||
FindFragment fragment = new FindFragment();
|
FindFragment fragment = new FindFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -34,14 +29,16 @@ public class FindFragment extends BaseFragment implements View.OnClickListener{
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
linear_event_prefecture = findViewById(R.id.linear_event_prefecture);
|
LinearLayout linear_event_prefecture = findViewById(R.id.linear_event_prefecture);
|
||||||
linear_event_prefecture.setOnClickListener(this::onClick);
|
linear_event_prefecture.setOnClickListener(this);
|
||||||
linear_task_prefecture =findViewById(R.id.linear_task_prefecture);
|
//任务专区
|
||||||
linear_task_prefecture.setOnClickListener(this::onClick);
|
LinearLayout linear_task_prefecture = findViewById(R.id.linear_task_prefecture);
|
||||||
linear_task_explain =findViewById(R.id.linear_task_explain);
|
linear_task_prefecture.setOnClickListener(this);
|
||||||
linear_task_explain.setOnClickListener(this::onClick);
|
//任务说明
|
||||||
linearEnd = findViewById(R.id.linear_end);
|
LinearLayout linear_task_explain = findViewById(R.id.linear_task_explain);
|
||||||
linearEnd.setOnClickListener(this::onClick);
|
linear_task_explain.setOnClickListener(this);
|
||||||
|
LinearLayout linearEnd = findViewById(R.id.linear_end);
|
||||||
|
linearEnd.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -27,14 +27,14 @@ import com.navinfo.outdoor.util.RegexUtil;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 忘记密码页面
|
* 忘记密码页面
|
||||||
*/
|
*/
|
||||||
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
|
public class ForgetPawFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivFinish;
|
|
||||||
private TextView forgetPawGetNote;
|
private TextView forgetPawGetNote;
|
||||||
private EditText etForgetPawPhone, etForgetPawNote, etForgetPawPaw, etForgetPawConfirmPaw;
|
private EditText etForgetPawPhone, etForgetPawNote, etForgetPawPaw, etForgetPawConfirmPaw;
|
||||||
private Button btnForgetPaw;
|
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
private CountDownTimer timer;
|
private CountDownTimer timer;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivFinish = findViewById(R.id.iv_forgePaw_finish);
|
ImageView ivFinish = findViewById(R.id.iv_forgePaw_finish);
|
||||||
ivFinish.setOnClickListener(this);
|
ivFinish.setOnClickListener(this);
|
||||||
etForgetPawPhone = findViewById(R.id.et_forgetPaw_phone);
|
etForgetPawPhone = findViewById(R.id.et_forgetPaw_phone);
|
||||||
etForgetPawNote = findViewById(R.id.et_forgetPaw_note);
|
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);
|
etForgetPawConfirmPaw = findViewById(R.id.et_forgetPaw_confirm_paw);
|
||||||
forgetPawGetNote = findViewById(R.id.forgetPaw_get_note);
|
forgetPawGetNote = findViewById(R.id.forgetPaw_get_note);
|
||||||
forgetPawGetNote.setOnClickListener(this);
|
forgetPawGetNote.setOnClickListener(this);
|
||||||
btnForgetPaw = findViewById(R.id.btn_forgetPaw);
|
Button btnForgetPaw = findViewById(R.id.btn_forgetPaw);
|
||||||
btnForgetPaw.setOnClickListener(this::onClick);
|
btnForgetPaw.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_forgePaw_finish:
|
case R.id.iv_forgePaw_finish:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.forgetPaw_get_note:
|
case R.id.forgetPaw_get_note:
|
||||||
if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())){
|
if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())){
|
||||||
@ -94,14 +94,14 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
httpParams.put("mobile", mobile);
|
httpParams.put("mobile", mobile);
|
||||||
}
|
}
|
||||||
String code = etForgetPawNote.getText().toString().trim();
|
String code = etForgetPawNote.getText().toString().trim();
|
||||||
if (code == null || code.equals("")) {
|
if (code.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("code", code);
|
httpParams.put("code", code);
|
||||||
}
|
}
|
||||||
String password = etForgetPawPaw.getText().toString().trim();
|
String password = etForgetPawPaw.getText().toString().trim();
|
||||||
if (password == null || password.equals("")) {
|
if (password.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -112,7 +112,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String conFirmPaw = etForgetPawConfirmPaw.getText().toString().trim();
|
String conFirmPaw = etForgetPawConfirmPaw.getText().toString().trim();
|
||||||
if (conFirmPaw == null || conFirmPaw.equals("")) {
|
if (conFirmPaw.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
obtain.what=Constant.REGISTER_WORD;
|
obtain.what=Constant.REGISTER_WORD;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
@ -183,7 +183,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
private void initGetNote() {
|
private void initGetNote() {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
String mobile = etForgetPawPhone.getText().toString().trim();
|
String mobile = etForgetPawPhone.getText().toString().trim();
|
||||||
if (mobile == null || mobile.equals("")) {
|
if (mobile.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,7 +48,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
public class GatherGetFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
private Button btnCancelGet, btnGetTask, btnGather, btnFinishGather;
|
||||||
private TextView tvTitle, tvMoney, tvTime, tvDistance, tvDescribe;
|
|
||||||
private PoiEntity poiEntity;
|
private PoiEntity poiEntity;
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private ChargingPileDao chargingPileDao;
|
private ChargingPileDao chargingPileDao;
|
||||||
@ -75,6 +74,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||||
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
|
assert getArguments() != null;
|
||||||
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.GATHER_GET_RETURN;
|
obtain.what = Constant.GATHER_GET_RETURN;
|
||||||
@ -102,19 +102,21 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
chargingPileDao = poiDatabase.getChargingPileDao();
|
chargingPileDao = poiDatabase.getChargingPileDao();
|
||||||
tvTitle = findViewById(R.id.tv_title);
|
TextView tvTitle = findViewById(R.id.tv_title);
|
||||||
tvMoney = findViewById(R.id.tv_money);
|
TextView tvMoney = findViewById(R.id.tv_money);
|
||||||
tvTime = findViewById(R.id.tv_time);
|
TextView tvTime = findViewById(R.id.tv_time);
|
||||||
tvDistance = findViewById(R.id.tv_distance);
|
TextView tvDistance = findViewById(R.id.tv_distance);
|
||||||
tvDescribe = findViewById(R.id.tv_describe);
|
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 = findViewById(R.id.btn_cancel_get);//取消领取
|
||||||
btnCancelGet.setOnClickListener(this::onClick);
|
btnCancelGet.setOnClickListener(this);
|
||||||
btnGetTask = findViewById(R.id.btn_get_task);//领取任务
|
btnGetTask = findViewById(R.id.btn_get_task);//领取任务
|
||||||
btnGetTask.setOnClickListener(this::onClick);
|
btnGetTask.setOnClickListener(this);
|
||||||
btnGather = findViewById(R.id.btn_gather);//立即采集
|
btnGather = findViewById(R.id.btn_gather);//立即采集
|
||||||
btnGather.setOnClickListener(this::onClick);
|
btnGather.setOnClickListener(this);
|
||||||
btnFinishGather = findViewById(R.id.btn_finish_gather);//结束采集
|
btnFinishGather = findViewById(R.id.btn_finish_gather);//结束采集
|
||||||
btnFinishGather.setOnClickListener(this::onClick);
|
btnFinishGather.setOnClickListener(this);
|
||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
if (arguments != null) {//poiEntity
|
if (arguments != null) {//poiEntity
|
||||||
poiEntity = (PoiEntity) arguments.getSerializable("poiEntity");
|
poiEntity = (PoiEntity) arguments.getSerializable("poiEntity");
|
||||||
@ -123,7 +125,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (poiEntity.getPrecision() == null) {
|
if (poiEntity.getPrecision() == null) {
|
||||||
tvMoney.setText("¥" + 0);
|
tvMoney.setText("¥" + 0);
|
||||||
} else {
|
} else {
|
||||||
tvMoney.setText("¥" + format2(Double.valueOf(poiEntity.getPrecision())));
|
tvMoney.setText("¥" + format2(Double.parseDouble(poiEntity.getPrecision())));
|
||||||
}
|
}
|
||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
if (poiEntity.getDescribe() != null && !"".equals(poiEntity.getDescribe())) {
|
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) {
|
if (poiEntity.getDist() != null) {
|
||||||
tvDistance.setText("距离:" + format5(Double.valueOf(poiEntity.getDist()) / 1000) + "km");
|
tvDistance.setText("距离:" + format5(Double.valueOf(poiEntity.getDist()) / 1000) + "km");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
assert poiEntity != null;
|
||||||
int taskStatus = poiEntity.getTaskStatus();
|
int taskStatus = poiEntity.getTaskStatus();
|
||||||
initViewByTaskStatus(taskStatus);
|
initViewByTaskStatus(taskStatus);
|
||||||
}
|
}
|
||||||
@ -191,6 +195,18 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
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://结束领取
|
case R.id.btn_cancel_get://结束领取
|
||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity.getTaskId(), poiEntity);
|
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 latitude = Constant.currentLocation.getLatitude();
|
||||||
double longitude = Constant.currentLocation.getLongitude();
|
double longitude = Constant.currentLocation.getLongitude();
|
||||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
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);
|
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
||||||
if (geometry > 5000) {
|
if (geometry > 5000) {
|
||||||
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
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 {
|
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivGathering, imageBank;
|
|
||||||
private Button btnBank;
|
|
||||||
private TextView tvBank;
|
private TextView tvBank;
|
||||||
private TextView tvName;
|
|
||||||
private EditText etBankNum;
|
private EditText etBankNum;
|
||||||
private ImageView gatheringCamera;
|
private ImageView gatheringCamera;
|
||||||
|
|
||||||
@ -89,18 +86,18 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivGathering = findViewById(R.id.iv_gathering);
|
ImageView ivGathering = findViewById(R.id.iv_gathering);
|
||||||
ivGathering.setOnClickListener(this::onClick);
|
ivGathering.setOnClickListener(this);
|
||||||
imageBank = findViewById(R.id.iv_bank);
|
ImageView imageBank = findViewById(R.id.iv_bank);
|
||||||
imageBank.setOnClickListener(this::onClick);
|
imageBank.setOnClickListener(this);
|
||||||
tvBank = findViewById(R.id.tv_bank);
|
tvBank = findViewById(R.id.tv_bank);
|
||||||
tvBank.setOnClickListener(this::onClick);
|
tvBank.setOnClickListener(this);
|
||||||
btnBank = findViewById(R.id.btn_bank);
|
Button btnBank = findViewById(R.id.btn_bank);
|
||||||
btnBank.setOnClickListener(this::onClick);
|
btnBank.setOnClickListener(this);
|
||||||
tvName = (TextView) findViewById(R.id.tv_name);
|
TextView tvName = (TextView) findViewById(R.id.tv_name);
|
||||||
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
etBankNum = (EditText) findViewById(R.id.et_bank_num);
|
||||||
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
gatheringCamera = (ImageView) findViewById(R.id.gathering_camera);
|
||||||
gatheringCamera.setOnClickListener(this::onClick);
|
gatheringCamera.setOnClickListener(this);
|
||||||
if (Constant.NAME!=null){
|
if (Constant.NAME!=null){
|
||||||
tvName.setText(Constant.NAME);
|
tvName.setText(Constant.NAME);
|
||||||
}
|
}
|
||||||
@ -126,7 +123,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
case R.id.iv_bank:
|
case R.id.iv_bank:
|
||||||
String bankJson = new GetJsonDataUtil().getJson(getContext(), "bank.json");//获取assets目录下的json文件数据
|
String bankJson = new GetJsonDataUtil().getJson(getContext(), "bank.json");//获取assets目录下的json文件数据
|
||||||
//用Gson 转成实体
|
//用Gabon 转成实体
|
||||||
jsonBean = parseData(bankJson);
|
jsonBean = parseData(bankJson);
|
||||||
Dialog dialog = new Dialog(getContext());
|
Dialog dialog = new Dialog(getContext());
|
||||||
//弹窗点击周围空白处弹出层自动消失弹窗消失(false时为点击周围空白处弹出层不自动消失)
|
//弹窗点击周围空白处弹出层自动消失弹窗消失(false时为点击周围空白处弹出层不自动消失)
|
||||||
@ -181,8 +178,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
String gatheringCameraTag = (String) gatheringCamera.getTag();
|
String gatheringCameraTag = (String) gatheringCamera.getTag();
|
||||||
gatheringList.add(new File(gatheringCameraTag));
|
gatheringList.add(new File(gatheringCameraTag));
|
||||||
String etBankAccount = etBankNum.getText().toString().trim();
|
String etBankAccount = etBankNum.getText().toString().trim();
|
||||||
if (etBankAccount == null || etBankAccount.equals("")) {
|
if (etBankAccount.equals("")) {
|
||||||
|
|
||||||
if (!etBankAccount.matches("^\\\\d{19}$\"")) {
|
if (!etBankAccount.matches("^\\\\d{19}$\"")) {
|
||||||
Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
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<>();
|
ArrayList<BankPathBean> detail = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
JSONArray data = new JSONArray(result);
|
JSONArray data = new JSONArray(result);
|
||||||
|
@ -7,13 +7,12 @@ import android.widget.ImageView;
|
|||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的等级页面的fragment
|
* 我的等级页面的fragment
|
||||||
*/
|
*/
|
||||||
public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||||
|
|
||||||
private ImageView ivGrade;
|
|
||||||
|
|
||||||
public static GradeFragment newInstance(Bundle bundle) {
|
public static GradeFragment newInstance(Bundle bundle) {
|
||||||
GradeFragment fragment = new GradeFragment();
|
GradeFragment fragment = new GradeFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -32,16 +31,16 @@ public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
|
|
||||||
ivGrade = findViewById(R.id.iv_grade);super.initView();
|
ImageView ivGrade = findViewById(R.id.iv_grade);
|
||||||
|
super.initView();
|
||||||
ivGrade.setOnClickListener(this);
|
ivGrade.setOnClickListener(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
if (v.getId() == R.id.iv_grade) {
|
||||||
case R.id.iv_grade:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
}
|
||||||
break; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import com.navinfo.outdoor.activity.FragmentManagement;
|
|||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
@ -26,29 +25,23 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
public class HasSubmitFragment extends BaseFragment implements View.OnClickListener {
|
public class HasSubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
private ConstraintLayout clPoi;
|
|
||||||
private TextView auditProcess;
|
private TextView auditProcess;
|
||||||
private TextView auditThrough;
|
private TextView auditThrough;
|
||||||
private TextView auditNotThrough;
|
private TextView auditNotThrough;
|
||||||
private ConstraintLayout clCharging;
|
|
||||||
private TextView tvCharging;
|
private TextView tvCharging;
|
||||||
private TextView chargingAuditProcess;
|
private TextView chargingAuditProcess;
|
||||||
private TextView chargingAuditThrough;
|
private TextView chargingAuditThrough;
|
||||||
private TextView chargingAuditNotThrough;
|
private TextView chargingAuditNotThrough;
|
||||||
private ConstraintLayout clRoad;
|
|
||||||
private TextView tvRoad;
|
private TextView tvRoad;
|
||||||
private TextView roadAuditProcess;
|
private TextView roadAuditProcess;
|
||||||
private TextView roadAuditThrough;
|
private TextView roadAuditThrough;
|
||||||
private TextView roadAuditNotThrough;
|
private TextView roadAuditNotThrough;
|
||||||
private ConstraintLayout clOther;
|
|
||||||
private TextView otherAuditProcess;
|
private TextView otherAuditProcess;
|
||||||
private TextView otherAuditThrough;
|
private TextView otherAuditThrough;
|
||||||
private TextView otherAuditNotThrough;
|
private TextView otherAuditNotThrough;
|
||||||
private ConstraintLayout clPoiVideo;
|
|
||||||
private TextView tvPoiVideo;
|
|
||||||
private TextView poiVideoAuditProcess;
|
private TextView poiVideoAuditProcess;
|
||||||
private TextView poiVideoAuditThrough;
|
private TextView poiVideoAuditThrough;
|
||||||
private TextView poiVideoAuditProcessauditNotThrough;
|
private TextView poiVideoAuditProcessableNotThrough;
|
||||||
private int hasPage;
|
private int hasPage;
|
||||||
|
|
||||||
public static HasSubmitFragment newInstance(Bundle bundle) {
|
public static HasSubmitFragment newInstance(Bundle bundle) {
|
||||||
@ -64,41 +57,41 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
clPoi = (ConstraintLayout) findViewById(R.id.cl_poi);
|
ConstraintLayout clPoi = (ConstraintLayout) findViewById(R.id.cl_poi);
|
||||||
clPoi.setOnClickListener(this::onClick);
|
clPoi.setOnClickListener(this);
|
||||||
auditProcess = (TextView) findViewById(R.id.audit_process);
|
auditProcess = (TextView) findViewById(R.id.audit_process);
|
||||||
auditThrough = (TextView) findViewById(R.id.audit_through);
|
auditThrough = (TextView) findViewById(R.id.audit_through);
|
||||||
auditNotThrough = (TextView) findViewById(R.id.audit_not_through);
|
auditNotThrough = (TextView) findViewById(R.id.audit_not_through);
|
||||||
|
|
||||||
clRoad = (ConstraintLayout) findViewById(R.id.cl_road);
|
ConstraintLayout clRoad = (ConstraintLayout) findViewById(R.id.cl_road);
|
||||||
clRoad.setOnClickListener(this::onClick);
|
clRoad.setOnClickListener(this);
|
||||||
roadAuditProcess = (TextView) findViewById(R.id.road_audit_process);
|
roadAuditProcess = (TextView) findViewById(R.id.road_audit_process);
|
||||||
roadAuditThrough = (TextView) findViewById(R.id.road_audit_through);
|
roadAuditThrough = (TextView) findViewById(R.id.road_audit_through);
|
||||||
roadAuditNotThrough = (TextView) findViewById(R.id.road_audit_not_through);
|
roadAuditNotThrough = (TextView) findViewById(R.id.road_audit_not_through);
|
||||||
clCharging = (ConstraintLayout) findViewById(R.id.cl_charging);
|
ConstraintLayout clCharging = (ConstraintLayout) findViewById(R.id.cl_charging);
|
||||||
clCharging.setOnClickListener(this::onClick);
|
clCharging.setOnClickListener(this);
|
||||||
chargingAuditProcess = (TextView) findViewById(R.id.charging_audit_process);
|
chargingAuditProcess = (TextView) findViewById(R.id.charging_audit_process);
|
||||||
chargingAuditThrough = (TextView) findViewById(R.id.charging_audit_through);
|
chargingAuditThrough = (TextView) findViewById(R.id.charging_audit_through);
|
||||||
chargingAuditNotThrough = (TextView) findViewById(R.id.charging_audit_not_through);
|
chargingAuditNotThrough = (TextView) findViewById(R.id.charging_audit_not_through);
|
||||||
|
|
||||||
clOther = (ConstraintLayout) findViewById(R.id.cl_other);
|
ConstraintLayout clOther = (ConstraintLayout) findViewById(R.id.cl_other);
|
||||||
clOther.setOnClickListener(this::onClick);
|
clOther.setOnClickListener(this);
|
||||||
otherAuditProcess = (TextView) findViewById(R.id.other_audit_process);
|
otherAuditProcess = (TextView) findViewById(R.id.other_audit_process);
|
||||||
otherAuditThrough = (TextView) findViewById(R.id.other_audit_through);
|
otherAuditThrough = (TextView) findViewById(R.id.other_audit_through);
|
||||||
otherAuditNotThrough = (TextView) findViewById(R.id.other_audit_not_through);
|
otherAuditNotThrough = (TextView) findViewById(R.id.other_audit_not_through);
|
||||||
|
|
||||||
clPoiVideo = (ConstraintLayout) findViewById(R.id.cl_poiVideo);
|
ConstraintLayout clPoiVideo = (ConstraintLayout) findViewById(R.id.cl_poiVideo);
|
||||||
clPoiVideo.setOnClickListener(this::onClick);
|
clPoiVideo.setOnClickListener(this);
|
||||||
tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo);
|
TextView tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo);
|
||||||
poiVideoAuditProcess = (TextView) findViewById(R.id.poiVideo_audit_process);
|
poiVideoAuditProcess = (TextView) findViewById(R.id.poiVideo_audit_process);
|
||||||
poiVideoAuditThrough = (TextView) findViewById(R.id.poiVideo_audit_through);
|
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();
|
initRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initRequest() {
|
public void initRequest() {
|
||||||
initPoiSubMitWork();//poi
|
initPoiSubMitWork();//poi
|
||||||
initChaningSubMitWork();//充电站
|
initCaningSubMitWork();//充电站
|
||||||
initPoiVideoSubMitWork();//poi录像
|
initPoiVideoSubMitWork();//poi录像
|
||||||
initRoadSubMitWork();//道路录像
|
initRoadSubMitWork();//道路录像
|
||||||
initOtherSubMitWork();//其他
|
initOtherSubMitWork();//其他
|
||||||
@ -144,7 +137,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initChaningSubMitWork() {
|
private void initCaningSubMitWork() {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("type", "2");
|
httpParams.put("type", "2");
|
||||||
httpParams.put("pageSize", "10");
|
httpParams.put("pageSize", "10");
|
||||||
@ -242,7 +235,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
poiVideoAuditProcessableNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
hasPage++;
|
hasPage++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -39,8 +39,6 @@ import okhttp3.OkHttpClient;
|
|||||||
* 常见问题页面的fragment
|
* 常见问题页面的fragment
|
||||||
*/
|
*/
|
||||||
public class IssueFragment extends BaseFragment implements View.OnClickListener {
|
public class IssueFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivIssueFinish;
|
|
||||||
private XRecyclerView mainIssueRecycler;
|
|
||||||
private IssueProblemAdapter issueProblemAdapter;
|
private IssueProblemAdapter issueProblemAdapter;
|
||||||
private int issuePage = 1;
|
private int issuePage = 1;
|
||||||
|
|
||||||
@ -98,8 +96,8 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivIssueFinish =findViewById(R.id.iv_issue_finish);
|
ImageView ivIssueFinish = findViewById(R.id.iv_issue_finish);
|
||||||
mainIssueRecycler =findViewById(R.id.main_issue_recycler);
|
XRecyclerView mainIssueRecycler = findViewById(R.id.main_issue_recycler);
|
||||||
ivIssueFinish.setOnClickListener(this::onClick);
|
ivIssueFinish.setOnClickListener(this::onClick);
|
||||||
mainIssueRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
mainIssueRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
//设置下划线
|
//设置下划线
|
||||||
|
@ -20,6 +20,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,9 +28,6 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
|
public class IssueWebFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivIssueWebFinish;
|
|
||||||
private WebView issueWebView;
|
|
||||||
|
|
||||||
public static IssueWebFragment newInstance(Bundle bundle) {
|
public static IssueWebFragment newInstance(Bundle bundle) {
|
||||||
IssueWebFragment fragment = new IssueWebFragment();
|
IssueWebFragment fragment = new IssueWebFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -44,15 +42,13 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivIssueWebFinish = findViewById(R.id.iv_issueWeb_finish);
|
ImageView ivIssueWebFinish = findViewById(R.id.iv_issueWeb_finish);
|
||||||
issueWebView = (WebView) findViewById(R.id.issue_webView);
|
WebView issueWebView = (WebView) findViewById(R.id.issue_webView);
|
||||||
ivIssueWebFinish.setOnClickListener(this::onClick);
|
ivIssueWebFinish.setOnClickListener(this);
|
||||||
issueWebView.getSettings().setBlockNetworkImage(false);
|
issueWebView.getSettings().setBlockNetworkImage(false);
|
||||||
WebSettings settings = issueWebView.getSettings();
|
WebSettings settings = issueWebView.getSettings();
|
||||||
settings.setJavaScriptEnabled(true);
|
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);
|
settings.setBuiltInZoomControls(false);
|
||||||
issueWebView.loadUrl("http://172.23.139.4:10001/#/serveclause");
|
issueWebView.loadUrl("http://172.23.139.4:10001/#/serveclause");
|
||||||
// issueWebView.loadUrl("http://www.navinfo.com");
|
// issueWebView.loadUrl("http://www.navinfo.com");
|
||||||
@ -61,10 +57,8 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_issueWeb_finish) {
|
||||||
case R.id.iv_issueWeb_finish:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,14 +8,13 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地图下载的Fragment
|
* 地图下载的Fragment
|
||||||
*/
|
*/
|
||||||
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
|
public class MapDownloadFragment extends BaseFragment implements View.OnClickListener{
|
||||||
|
|
||||||
private ImageView ivDownLoad;
|
|
||||||
private XRecyclerView recyclerView;
|
|
||||||
|
|
||||||
public static MapDownloadFragment newInstance(Bundle bundle) {
|
public static MapDownloadFragment newInstance(Bundle bundle) {
|
||||||
MapDownloadFragment fragment = new MapDownloadFragment();
|
MapDownloadFragment fragment = new MapDownloadFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -30,9 +29,9 @@ public class MapDownloadFragment extends BaseFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivDownLoad = findViewById(R.id.iv_download);
|
ImageView ivDownLoad = findViewById(R.id.iv_download);
|
||||||
ivDownLoad.setOnClickListener(this);
|
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
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
if (v.getId() == R.id.iv_download) {
|
||||||
case R.id.iv_download:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,16 +26,14 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 寻宝-消息的Fragment
|
* 寻宝-消息的Fragment
|
||||||
*/
|
*/
|
||||||
public class MessageFragment extends BaseFragment implements View.OnClickListener {
|
public class MessageFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView messageFinal;
|
|
||||||
private XRecyclerView messageRecycler;
|
|
||||||
private MessageAdapter messageAdapter;
|
private MessageAdapter messageAdapter;
|
||||||
private TextView tvRoad;
|
|
||||||
private int messagePage = 1;
|
private int messagePage = 1;
|
||||||
|
|
||||||
public static MessageFragment newInstance(Bundle bundle) {
|
public static MessageFragment newInstance(Bundle bundle) {
|
||||||
@ -52,12 +50,12 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
messageFinal = (ImageView) findViewById(R.id.message_final);
|
ImageView messageFinal = (ImageView) findViewById(R.id.message_final);
|
||||||
messageFinal.setOnClickListener(this::onClick);
|
messageFinal.setOnClickListener(this);
|
||||||
messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
|
XRecyclerView messageRecycler = (XRecyclerView) findViewById(R.id.message_recycler);
|
||||||
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
tvRoad = findViewById(R.id.tv_read);
|
TextView tvRoad = findViewById(R.id.tv_read);
|
||||||
tvRoad.setOnClickListener(this::onClick);
|
tvRoad.setOnClickListener(this);
|
||||||
messageRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
messageRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||||
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
messageRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
messageRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
@ -133,7 +131,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.message_final:
|
case R.id.message_final:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.tv_read:
|
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.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的Fragment
|
* 我的Fragment
|
||||||
* 2021-5-25
|
* 2021-5-25
|
||||||
*/
|
*/
|
||||||
public class MineFragment extends BaseFragment implements View.OnClickListener {
|
public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView imageHeard, imageShare, imageSign;
|
private TextView tvMoney;
|
||||||
private TextView tvName, tvMoney;
|
|
||||||
private Button btnWithdraw, btnQuit;
|
|
||||||
private RelativeLayout rlGrade, rlPrivilege, rlMap, rlIssue, rlContact, rlSet, rlAbout;
|
|
||||||
|
|
||||||
public static MineFragment newInstance(Bundle bundle) {
|
public static MineFragment newInstance(Bundle bundle) {
|
||||||
MineFragment fragment = new MineFragment();
|
MineFragment fragment = new MineFragment();
|
||||||
@ -64,35 +63,35 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
imageHeard = findViewById(R.id.image_heard);
|
ImageView imageHeard = findViewById(R.id.image_heard);
|
||||||
Glide.with(getActivity()).load(R.drawable.mine_harder).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(imageHeard);
|
Glide.with(Objects.requireNonNull(getActivity())).load(R.drawable.mine_harder).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(imageHeard);
|
||||||
imageHeard.setOnClickListener(this::onClick);
|
imageHeard.setOnClickListener(this);
|
||||||
tvName = findViewById(R.id.tv_name);
|
TextView tvName = findViewById(R.id.tv_name);
|
||||||
tvName.setText(Constant.USER_NAME);
|
tvName.setText(Constant.USER_NAME);
|
||||||
tvName.setOnClickListener(this::onClick);
|
tvName.setOnClickListener(this);
|
||||||
tvMoney = findViewById(R.id.tv_money);
|
tvMoney = findViewById(R.id.tv_money);
|
||||||
imageShare = findViewById(R.id.image_share);
|
ImageView imageShare = findViewById(R.id.image_share);
|
||||||
imageShare.setOnClickListener(this::onClick);
|
imageShare.setOnClickListener(this);
|
||||||
imageSign = findViewById(R.id.image_sign);
|
ImageView imageSign = findViewById(R.id.image_sign);
|
||||||
imageSign.setOnClickListener(this::onClick);
|
imageSign.setOnClickListener(this);
|
||||||
btnWithdraw = findViewById(R.id.btn_withdraw);
|
Button btnWithdraw = findViewById(R.id.btn_withdraw);
|
||||||
btnWithdraw.setOnClickListener(this::onClick);
|
btnWithdraw.setOnClickListener(this);
|
||||||
rlGrade = findViewById(R.id.rl_grade);
|
RelativeLayout rlGrade = findViewById(R.id.rl_grade);
|
||||||
rlGrade.setOnClickListener(this::onClick);
|
rlGrade.setOnClickListener(this);
|
||||||
rlPrivilege = findViewById(R.id.rl_privilege);
|
RelativeLayout rlPrivilege = findViewById(R.id.rl_privilege);
|
||||||
rlPrivilege.setOnClickListener(this::onClick);
|
rlPrivilege.setOnClickListener(this);
|
||||||
rlMap = findViewById(R.id.rl_map);
|
RelativeLayout rlMap = findViewById(R.id.rl_map);
|
||||||
rlMap.setOnClickListener(this::onClick);
|
rlMap.setOnClickListener(this);
|
||||||
rlIssue = findViewById(R.id.rl_issue);
|
RelativeLayout rlIssue = findViewById(R.id.rl_issue);
|
||||||
rlIssue.setOnClickListener(this::onClick);
|
rlIssue.setOnClickListener(this);
|
||||||
rlContact = findViewById(R.id.rl_contact);
|
RelativeLayout rlContact = findViewById(R.id.rl_contact);
|
||||||
rlContact.setOnClickListener(this::onClick);
|
rlContact.setOnClickListener(this);
|
||||||
rlSet = findViewById(R.id.rl_set);
|
RelativeLayout rlSet = findViewById(R.id.rl_set);
|
||||||
rlSet.setOnClickListener(this::onClick);
|
rlSet.setOnClickListener(this);
|
||||||
rlAbout = findViewById(R.id.rl_about);
|
RelativeLayout rlAbout = findViewById(R.id.rl_about);
|
||||||
rlAbout.setOnClickListener(this::onClick);
|
rlAbout.setOnClickListener(this);
|
||||||
btnQuit = findViewById(R.id.btn_quit);
|
Button btnQuit = findViewById(R.id.btn_quit);
|
||||||
btnQuit.setOnClickListener(this::onClick);
|
btnQuit.setOnClickListener(this);
|
||||||
initNetWork();
|
initNetWork();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,59 +153,47 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
startActivity(intentUser);
|
startActivity(intentUser);
|
||||||
break;
|
break;
|
||||||
case R.id.image_share://分享
|
case R.id.image_share://分享
|
||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
|
||||||
break;
|
|
||||||
case R.id.image_sign://签到
|
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();
|
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||||
break;
|
break;
|
||||||
case R.id.btn_withdraw://提现页面
|
case R.id.btn_withdraw://提现页面
|
||||||
|
|
||||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentWithdraw.putExtra("tag", 15);
|
intentWithdraw.putExtra("tag", 15);
|
||||||
startActivity(intentWithdraw);
|
startActivity(intentWithdraw);
|
||||||
break;
|
break;
|
||||||
case R.id.rl_grade://我的等级
|
// Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
|
||||||
// Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
|
||||||
// intentGrade.putExtra("tag", 17);
|
// intentGrade.putExtra("tag", 17);
|
||||||
// startActivity(intentGrade);
|
// startActivity(intentGrade);
|
||||||
break;
|
// Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
||||||
case R.id.rl_privilege://我的特权
|
|
||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
|
||||||
// Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
|
||||||
// intentPrivilege.putExtra("tag", 18);
|
// intentPrivilege.putExtra("tag", 18);
|
||||||
// startActivity(intentPrivilege);
|
// startActivity(intentPrivilege);
|
||||||
break;
|
// Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||||
case R.id.rl_map://地图下载
|
|
||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
|
||||||
// Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
|
||||||
// intentMap.putExtra("tag", 19);
|
// intentMap.putExtra("tag", 19);
|
||||||
// startActivity(intentMap);
|
// startActivity(intentMap);
|
||||||
break;
|
// Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||||
case R.id.rl_issue://常见问题
|
|
||||||
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
|
||||||
// Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
|
||||||
// intentIssue.putExtra("tag", 20);
|
// intentIssue.putExtra("tag", 20);
|
||||||
// startActivity(intentIssue);
|
// startActivity(intentIssue);
|
||||||
break;
|
// Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||||
|
// intentSet.putExtra("tag", 22);
|
||||||
|
// startActivity(intentSet);
|
||||||
case R.id.rl_contact://联系我们
|
case R.id.rl_contact://联系我们
|
||||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentContact.putExtra("tag", 21);
|
intentContact.putExtra("tag", 21);
|
||||||
startActivity(intentContact);
|
startActivity(intentContact);
|
||||||
break;
|
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://关于
|
case R.id.rl_about://关于
|
||||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||||
intentAbout.putExtra("tag", 23);
|
intentAbout.putExtra("tag", 23);
|
||||||
startActivity(intentAbout);
|
startActivity(intentAbout);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_quit://退出登录
|
case R.id.btn_quit://退出登录
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,15 +97,12 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
private ImageView ivPictures;
|
private ImageView ivPictures;
|
||||||
private TextView tvPictures;
|
private TextView tvPictures;
|
||||||
private Button btnOtherLocal;
|
private Button btnOtherLocal;
|
||||||
private Button btnOtherUploading;
|
|
||||||
private PoiDatabase poiDatabase;
|
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
private int station_type = 5;
|
private int station_type = 5;
|
||||||
private ArrayList<File> otherUploadList;
|
private ArrayList<File> otherUploadList;
|
||||||
private CheckBox checkPot;
|
private CheckBox checkPot;
|
||||||
private File file;
|
private File file;
|
||||||
private NestedScrollView nestedScrollView;
|
|
||||||
private Marker markerOther;
|
private Marker markerOther;
|
||||||
private Point screenOtherPositions;
|
private Point screenOtherPositions;
|
||||||
|
|
||||||
@ -138,7 +135,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
if (arguments != null) {
|
if (arguments != null) {
|
||||||
isSliding = arguments.getBoolean("isSliding", true);
|
isSliding = arguments.getBoolean("isSliding", true);
|
||||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
Log.d("TAG", "onCaresses: " + isSliding);
|
||||||
}
|
}
|
||||||
if (isSliding) {
|
if (isSliding) {
|
||||||
// 监听到返回按钮点击事件
|
// 监听到返回按钮点击事件
|
||||||
@ -164,7 +161,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
spinnerOther = findViewById(R.id.spinner_other);
|
spinnerOther = findViewById(R.id.spinner_other);
|
||||||
ArrayAdapter<String> adapterOthers = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, others);
|
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) {
|
if (slidingPaneLayout != null) {
|
||||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||||
}
|
}
|
||||||
editTaskName = findViewById(R.id.et_task_name);
|
editTaskName = findViewById(R.id.et_task_name);
|
||||||
rlPicture = findViewById(R.id.rl_picture);
|
rlPicture = findViewById(R.id.rl_picture);
|
||||||
rlPicture.setOnClickListener(this::onClick);
|
rlPicture.setOnClickListener(this);
|
||||||
ivPicture = findViewById(R.id.iv_picture);
|
ivPicture = findViewById(R.id.iv_picture);
|
||||||
tvPicture = findViewById(R.id.tv_picture);
|
tvPicture = findViewById(R.id.tv_picture);
|
||||||
tvPictures = findViewById(R.id.tv_pictures);
|
tvPictures = findViewById(R.id.tv_pictures);
|
||||||
rlPictures = findViewById(R.id.rl_pictures);
|
rlPictures = findViewById(R.id.rl_pictures);
|
||||||
rlPictures.setOnClickListener(this::onClick);
|
rlPictures.setOnClickListener(this);
|
||||||
ivPictures = findViewById(R.id.iv_pictures);
|
ivPictures = findViewById(R.id.iv_pictures);
|
||||||
editOtherDescribe = findViewById(R.id.edit_other_describe);
|
editOtherDescribe = findViewById(R.id.edit_other_describe);
|
||||||
btnOtherLocal = findViewById(R.id.btn_other_local);
|
btnOtherLocal = findViewById(R.id.btn_other_local);
|
||||||
btnOtherLocal.setOnClickListener(this::onClick);
|
btnOtherLocal.setOnClickListener(this);
|
||||||
btnOtherUploading = findViewById(R.id.btn_other_uploading);
|
Button btnOtherUploading = findViewById(R.id.btn_other_uploading);
|
||||||
btnOtherUploading.setOnClickListener(this::onClick);
|
btnOtherUploading.setOnClickListener(this);
|
||||||
//数据展示
|
//数据展示
|
||||||
initShowPoi();
|
initShowPoi();
|
||||||
//禁用所有操作控件
|
//禁用所有操作控件
|
||||||
|
@ -77,6 +77,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
|
||||||
@ -95,10 +96,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private ArrayList<PhoneBean> poiBeans;
|
private ArrayList<PhoneBean> poiBeans;
|
||||||
private Button btnSaveLocal;
|
private Button btnSaveLocal;
|
||||||
private Button btnUploading;
|
private Button btnUploading;
|
||||||
private PoiDatabase poiDatabase;
|
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private CheckBox checkBoxLife;
|
private CheckBox checkBoxLife;
|
||||||
private CheckBox checkBoxRight;
|
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
private int existence = 0;
|
private int existence = 0;
|
||||||
@ -113,7 +112,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private ContactView contactView;
|
private ContactView contactView;
|
||||||
private ArrayList<File> poiPicList;
|
private ArrayList<File> poiPicList;
|
||||||
private File file;
|
private File file;
|
||||||
private NestedScrollView nestedScrollView;
|
|
||||||
private Marker markerPoi;
|
private Marker markerPoi;
|
||||||
private Point screenPoiPositions;
|
private Point screenPoiPositions;
|
||||||
|
|
||||||
@ -174,10 +172,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
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() {
|
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -220,19 +218,19 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
|
|
||||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||||
if (slidingPaneLayout != null) {
|
if (slidingPaneLayout != null) {
|
||||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||||
}
|
}
|
||||||
checkBoxRight.setVisibility(View.GONE);
|
checkBoxRight.setVisibility(View.GONE);
|
||||||
btnSaveLocal = findViewById(R.id.btn_save_local);
|
btnSaveLocal = findViewById(R.id.btn_save_local);
|
||||||
btnSaveLocal.setOnClickListener(this::onClick);
|
btnSaveLocal.setOnClickListener(this);
|
||||||
btnUploading = findViewById(R.id.btn_uploading);
|
btnUploading = findViewById(R.id.btn_uploading);
|
||||||
btnUploading.setOnClickListener(this::onClick);
|
btnUploading.setOnClickListener(this);
|
||||||
editNameContent = findViewById(R.id.tv_name_content);
|
editNameContent = findViewById(R.id.tv_name_content);
|
||||||
editSiteContent = findViewById(R.id.tv_site_content);
|
editSiteContent = findViewById(R.id.tv_site_content);
|
||||||
tvPoiExamine = findViewById(R.id.tv_poi_examine);
|
tvPoiExamine = findViewById(R.id.tv_poi_examine);
|
||||||
tvPoiExamine.setOnClickListener(this::onClick);
|
tvPoiExamine.setOnClickListener(this);
|
||||||
editDescribe = findViewById(R.id.edit_describe);
|
editDescribe = findViewById(R.id.edit_describe);
|
||||||
ivPanorama = findViewById(R.id.iv_panorama);
|
ivPanorama = findViewById(R.id.iv_panorama);
|
||||||
tvPanorama = findViewById(R.id.tv_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);
|
tvElse = findViewById(R.id.tv_else);
|
||||||
linearContact = findViewById(R.id.linear_contact);
|
linearContact = findViewById(R.id.linear_contact);
|
||||||
rlPanorama = findViewById(R.id.rl_panorama);
|
rlPanorama = findViewById(R.id.rl_panorama);
|
||||||
rlPanorama.setOnClickListener(this::onClick);
|
rlPanorama.setOnClickListener(this);
|
||||||
rlName = findViewById(R.id.rl_name);
|
rlName = findViewById(R.id.rl_name);
|
||||||
rlName.setOnClickListener(this::onClick);
|
rlName.setOnClickListener(this);
|
||||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
rlInternalPhotos.setOnClickListener(this);
|
||||||
rlCard = findViewById(R.id.rl_card);
|
rlCard = findViewById(R.id.rl_card);
|
||||||
rlCard.setOnClickListener(this::onClick);
|
rlCard.setOnClickListener(this);
|
||||||
rlElse = findViewById(R.id.rl_else);
|
rlElse = findViewById(R.id.rl_else);
|
||||||
rlElse.setOnClickListener(this::onClick);
|
rlElse.setOnClickListener(this);
|
||||||
linearExist = findViewById(R.id.linear_exist);
|
linearExist = findViewById(R.id.linear_exist);
|
||||||
spinnerExist = findViewById(R.id.spinner_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); //设置下拉列表框的下拉选项样式
|
adapterExist.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerExist.setAdapter(adapterExist);
|
spinnerExist.setAdapter(adapterExist);
|
||||||
spinnerExist.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinnerExist.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@ -297,7 +295,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivPanorama.setImageDrawable(null);
|
ivPanorama.setImageDrawable(null);
|
||||||
@ -311,7 +309,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivName.setImageDrawable(null);
|
ivName.setImageDrawable(null);
|
||||||
@ -325,7 +323,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivElse.setImageDrawable(null);
|
ivElse.setImageDrawable(null);
|
||||||
@ -339,7 +337,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivInternal.setImageDrawable(null);
|
ivInternal.setImageDrawable(null);
|
||||||
@ -353,7 +351,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
ivCard.setImageDrawable(null);
|
ivCard.setImageDrawable(null);
|
||||||
@ -367,7 +365,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
|
assert getArguments() != null;
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
|
assert showPoiEntity != null;
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
tvPoiExamine.setVisibility(View.GONE);
|
tvPoiExamine.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
@ -375,7 +375,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (name != null && !name.equals("")) {
|
||||||
editNameContent.setText(name + "");
|
editNameContent.setText(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
String address = showPoiEntity.getAddress();//地址
|
String address = showPoiEntity.getAddress();//地址
|
||||||
@ -397,7 +397,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
initPhone();
|
initPhone();
|
||||||
String memo = showPoiEntity.getMemo();//任务描述
|
String memo = showPoiEntity.getMemo();//任务描述
|
||||||
if (memo != null && !memo.equals("")) {
|
if (memo != null && !memo.equals("")) {
|
||||||
editDescribe.setText(memo + "");
|
editDescribe.setText(memo);
|
||||||
}
|
}
|
||||||
String telPhone = showPoiEntity.getTelPhone();
|
String telPhone = showPoiEntity.getTelPhone();
|
||||||
if (telPhone != null && !telPhone.equals("") && !telPhone.equals("null")) {
|
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 (!StringUtils.isEmpty(phones[i])) {
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
String[] split = phones[i].split("-");
|
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));
|
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (phones[i] != null) {
|
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
|
||||||
} else {
|
|
||||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||||
String[] split = phones[i].split("-");
|
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));
|
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
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 photo = showPoiEntity.getPhotoInfo().get(i).getPhoto();
|
||||||
String[] split = photo.split("/");
|
String[] split = photo.split("/");
|
||||||
if (split[split.length - 1].startsWith("a")) {
|
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);
|
tvPanorama.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("b")) {
|
} 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);
|
tvPoiNamePic.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("c")) {
|
} 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);
|
tvInternal.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("d")) {
|
} 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);
|
tvCard.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("e")) {
|
} else if (split[split.length - 1].startsWith("e")) {
|
||||||
Glide.with(getActivity()).load(photo).into(ivElse);
|
Glide.with(getActivity()).load(photo).into(ivElse);
|
||||||
@ -490,7 +486,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录-已提交-poi任务列表
|
* 记录-已提交-poi任务列表
|
||||||
*/
|
*/
|
||||||
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
|
public class PoiTaskFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivPoiTaskFinish;
|
|
||||||
private XRecyclerView poiTaskXrv;
|
private XRecyclerView poiTaskXrv;
|
||||||
private int type;
|
private int type;
|
||||||
private PoiTaskAdapter poiTaskAdapter;
|
private PoiTaskAdapter poiTaskAdapter;
|
||||||
private TextView tvTaskTitle;
|
|
||||||
private int page=1;
|
private int page=1;
|
||||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
tvTaskTitle = findViewById(R.id.tv_poiTask_title);
|
TextView tvTaskTitle = findViewById(R.id.tv_poiTask_title);
|
||||||
switch (type){
|
switch (type){
|
||||||
case 1:
|
case 1:
|
||||||
tvTaskTitle.setText("POI任务列表");
|
tvTaskTitle.setText("POI任务列表");
|
||||||
@ -75,8 +74,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
tvTaskTitle.setText("其他任务列表");
|
tvTaskTitle.setText("其他任务列表");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
ImageView ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
||||||
ivPoiTaskFinish.setOnClickListener(this::onClick);
|
ivPoiTaskFinish.setOnClickListener(this);
|
||||||
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
|
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
|
||||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
@ -105,6 +104,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
assert getArguments() != null;
|
||||||
type = getArguments().getInt("type", 0);
|
type = getArguments().getInt("type", 0);
|
||||||
listBeans = new ArrayList<>();
|
listBeans = new ArrayList<>();
|
||||||
initWork(type,true);
|
initWork(type,true);
|
||||||
@ -182,10 +182,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_poiTask_finish) {
|
||||||
case R.id.iv_poiTask_finish:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 寻宝-点击上传弹窗-poi录像
|
* 寻宝-点击上传弹窗-poi录像
|
||||||
@ -85,12 +86,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
private RadioButton rbCar, rbBicycle, rbWalking, rbManual;
|
private RadioButton rbCar, rbBicycle, rbWalking, rbManual;
|
||||||
private EditText etDesc;
|
private EditText etDesc;
|
||||||
private Button btnRoadSave;
|
private Button btnRoadSave;
|
||||||
private PoiDatabase poiDatabase;
|
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private Button btnPoiVideoUpload;
|
|
||||||
private File fileZip;
|
private File fileZip;
|
||||||
private FrameLayout fmPoiVideoPic;
|
private FrameLayout fmPoiVideoPic;
|
||||||
private NestedScrollView nestedScrollView;
|
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
private Marker markerPoiVideo;
|
private Marker markerPoiVideo;
|
||||||
private TextView tvPicture;
|
private TextView tvPicture;
|
||||||
@ -125,7 +123,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
if (arguments != null) {
|
if (arguments != null) {
|
||||||
isSliding = arguments.getBoolean("isSliding", true);
|
isSliding = arguments.getBoolean("isSliding", true);
|
||||||
Log.d("TAG", "onCreatessss: " + isSliding);
|
Log.d("TAG", "onCaresses: " + isSliding);
|
||||||
}
|
}
|
||||||
if (isSliding) {
|
if (isSliding) {
|
||||||
// 监听到返回按钮点击事件
|
// 监听到返回按钮点击事件
|
||||||
@ -152,14 +150,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
tvPictures = (TextView) findViewById(R.id.tv_pictures);//拍照
|
tvPictures = (TextView) findViewById(R.id.tv_pictures);//拍照
|
||||||
tvPictures.setOnClickListener(this::onClick);
|
tvPictures.setOnClickListener(this);
|
||||||
tvPicture = (TextView) findViewById(R.id.tv_picture);//录像
|
tvPicture = (TextView) findViewById(R.id.tv_picture);//录像
|
||||||
tvPicture.setOnClickListener(this::onClick);
|
tvPicture.setOnClickListener(this);
|
||||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||||
nestedScrollView = findViewById(R.id.nested_scroll_view);
|
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
|
||||||
if (slidingPaneLayout != null) {
|
if (slidingPaneLayout != null) {
|
||||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||||
}
|
}
|
||||||
@ -169,9 +167,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
etDesc = (EditText) findViewById(R.id.et_desc);
|
etDesc = (EditText) findViewById(R.id.et_desc);
|
||||||
fmPoiVideoPic = findViewById(R.id.fm_poi_video_picture);
|
fmPoiVideoPic = findViewById(R.id.fm_poi_video_picture);
|
||||||
btnRoadSave = (Button) findViewById(R.id.btn_poi_video_save);
|
btnRoadSave = (Button) findViewById(R.id.btn_poi_video_save);
|
||||||
btnRoadSave.setOnClickListener(this::onClick);
|
btnRoadSave.setOnClickListener(this);
|
||||||
btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload);
|
Button btnPoiVideoUpload = findViewById(R.id.btn_poi_video_upload);
|
||||||
btnPoiVideoUpload.setOnClickListener(this::onClick);
|
btnPoiVideoUpload.setOnClickListener(this);
|
||||||
rgType = (RadioGroup) findViewById(R.id.rg_type);
|
rgType = (RadioGroup) findViewById(R.id.rg_type);
|
||||||
rbCar =findViewById(R.id.rb_car);
|
rbCar =findViewById(R.id.rb_car);
|
||||||
rbBicycle =findViewById(R.id.rb_bicycle);
|
rbBicycle =findViewById(R.id.rb_bicycle);
|
||||||
@ -197,7 +195,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
||||||
@ -217,11 +215,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
|
|
||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
|
assert getArguments() != null;
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (name != null && !name.equals("")) {
|
||||||
etRoadName.setText(name + "");
|
etRoadName.setText(name);
|
||||||
}
|
}
|
||||||
String x = showPoiEntity.getX();
|
String x = showPoiEntity.getX();
|
||||||
String y = showPoiEntity.getY();
|
String y = showPoiEntity.getY();
|
||||||
@ -241,12 +240,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
String describe = showPoiEntity.getMemo();//任务描述
|
String describe = showPoiEntity.getMemo();//任务描述
|
||||||
if (describe != null && !describe.equals("")) {
|
if (describe != null && !describe.equals("")) {
|
||||||
etDesc.setText(describe + "");
|
etDesc.setText(describe);
|
||||||
}
|
}
|
||||||
String photoList = showPoiEntity.getPhoto();
|
String photoList = showPoiEntity.getPhoto();
|
||||||
int record_way = showPoiEntity.getRecord_way();
|
int record_way = showPoiEntity.getRecord_way();
|
||||||
if (record_way == 1) {//录像
|
if (record_way == 1) {//录像
|
||||||
isRequest = 0x101;
|
isRequest = 0x101;
|
||||||
|
tvPictures.setEnabled(false);
|
||||||
if (!StringUtils.isEmpty(photoList)) {
|
if (!StringUtils.isEmpty(photoList)) {
|
||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
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) {//连拍
|
} else if (record_way == 2) {//连拍
|
||||||
isRequest = 0x102;
|
isRequest = 0x102;
|
||||||
|
if (work_type==3){
|
||||||
|
showWorkType(work_type);
|
||||||
|
}
|
||||||
|
tvPicture.setEnabled(false);
|
||||||
if (!StringUtils.isEmpty(photoList)) {
|
if (!StringUtils.isEmpty(photoList)) {
|
||||||
boolean isImageLoad = false;
|
boolean isImageLoad = false;
|
||||||
List<File> pictureFileListByUUID = AWMp4ParserHelper.getInstance().getJPGFileListByUUID(showPoiEntity.getId());
|
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).getPath().contains("0.jpg") && !pictureFileListByUUID.get(i).getPath().contains("paper.txt")) {
|
||||||
if (pictureFileListByUUID.get(i).exists() && !isImageLoad) {
|
if (pictureFileListByUUID.get(i).exists() && !isImageLoad) {
|
||||||
// 使用glide加载视频的第一帧
|
// 使用glide加载视频的第一帧
|
||||||
Glide.with(getActivity()).load(pictureFileListByUUID.get(i)).into(ivPoiVideoPicture);
|
Glide.with(Objects.requireNonNull(getActivity())).load(pictureFileListByUUID.get(i)).into(ivPoiVideoPicture);
|
||||||
isImageLoad = true;
|
isImageLoad = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -281,29 +285,64 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断是否是已做完任务并保存成功
|
//判断是否是已做完任务并保存成功
|
||||||
|
assert showPoiEntity != null;
|
||||||
if (showPoiEntity.getTaskStatus() == 3) {
|
if (showPoiEntity.getTaskStatus() == 3) {
|
||||||
disables();//禁用所有可操作的控件
|
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() {
|
private void disables() {
|
||||||
etRoadName.setEnabled(false);
|
etRoadName.setEnabled(false);
|
||||||
rgType.setEnabled(false);
|
|
||||||
ivPoiVideoPicture.setEnabled(false);
|
ivPoiVideoPicture.setEnabled(false);
|
||||||
tvPictures.setEnabled(false);
|
tvPictures.setEnabled(false);
|
||||||
tvPicture.setEnabled(false);
|
tvPicture.setEnabled(false);
|
||||||
etDesc.setEnabled(false);
|
etDesc.setEnabled(false);
|
||||||
btnRoadSave.setEnabled(false);
|
btnRoadSave.setEnabled(false);
|
||||||
|
rgType.setEnabled(false);
|
||||||
rbCar.setEnabled(false);
|
rbCar.setEnabled(false);
|
||||||
rbWalking.setEnabled(false);
|
rbWalking.setEnabled(false);
|
||||||
rbBicycle.setEnabled(false);
|
rbBicycle.setEnabled(false);
|
||||||
|
rbManual.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||||
if ((boolean) data.obj) {
|
if ((boolean) data.obj) {
|
||||||
|
|
||||||
initPoiVideoSharePre();
|
initPoiVideoSharePre();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -344,7 +383,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) {
|
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
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -352,7 +391,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -360,7 +399,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
@ -389,7 +427,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
poiVideoSave(poiEntity, isLocal);
|
poiVideoSave(poiEntity, isLocal);
|
||||||
@ -408,7 +446,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (never) {
|
if (never) {
|
||||||
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予权限", Toast.LENGTH_SHORT).show();
|
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() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
@ -545,6 +583,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
isRequest = 0x101;
|
isRequest = 0x101;
|
||||||
if (data != null && data.hasExtra(Constant.INTENT_VIDEO_PATH)) {
|
if (data != null && data.hasExtra(Constant.INTENT_VIDEO_PATH)) {
|
||||||
String videoPath = data.getStringExtra(Constant.INTENT_VIDEO_PATH);
|
String videoPath = data.getStringExtra(Constant.INTENT_VIDEO_PATH);
|
||||||
|
assert videoPath != null;
|
||||||
File videoFile = new File(videoPath);
|
File videoFile = new File(videoPath);
|
||||||
if (videoFile.exists()) {
|
if (videoFile.exists()) {
|
||||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
|
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) {
|
} else if (requestCode == 0x102 && resultCode == 0x102) {
|
||||||
tvPicture.setEnabled(false);
|
tvPicture.setEnabled(false);
|
||||||
isRequest = 0x102;
|
isRequest = 0x102;
|
||||||
|
|
||||||
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
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);
|
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||||
|
assert videoPath != null;
|
||||||
File pictureFile = new File(videoPath);
|
File pictureFile = new File(videoPath);
|
||||||
if (pictureFile.exists()) {
|
if (pictureFile.exists()) {
|
||||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(pictureFile).toString(), ivPoiVideoPicture, 500);
|
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);
|
poiEntity.setWork_type(pictureType);
|
||||||
}
|
}
|
||||||
String desc = etDesc.getText().toString().trim();
|
String desc = etDesc.getText().toString().trim();
|
||||||
if (desc != null && !desc.equals("")) {
|
if (!desc.equals("")) {
|
||||||
poiEntity.setMemo(desc);
|
poiEntity.setMemo(desc);
|
||||||
}
|
}
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
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.R;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的等级页面的fragment
|
* 我的等级页面的fragment
|
||||||
*/
|
*/
|
||||||
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener{
|
public class PrivilegeFragment extends BaseFragment implements View.OnClickListener{
|
||||||
|
|
||||||
private ImageView ivPrivilege;
|
|
||||||
|
|
||||||
public static PrivilegeFragment newInstance(Bundle bundle) {
|
public static PrivilegeFragment newInstance(Bundle bundle) {
|
||||||
PrivilegeFragment fragment = new PrivilegeFragment();
|
PrivilegeFragment fragment = new PrivilegeFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
@ -32,16 +32,14 @@ public class PrivilegeFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivPrivilege = findViewById(R.id.iv_privilege);
|
ImageView ivPrivilege = findViewById(R.id.iv_privilege);
|
||||||
ivPrivilege.setOnClickListener(this);
|
ivPrivilege.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
if (v.getId() == R.id.iv_privilege) {
|
||||||
case R.id.iv_privilege:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.navinfo.outdoor.util.NoSlideViewPager;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录的Fragment
|
* 记录的Fragment
|
||||||
@ -26,8 +27,6 @@ import java.util.ArrayList;
|
|||||||
public class RecordFragment extends BaseFragment implements View.OnClickListener {
|
public class RecordFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
private TabLayout tabRecord;
|
|
||||||
private NoSlideViewPager vpRecord;
|
|
||||||
private final String[] names = {"待提交", "已提交"};
|
private final String[] names = {"待提交", "已提交"};
|
||||||
private StaySubmitFragment staySubmitFragment; // 待提交
|
private StaySubmitFragment staySubmitFragment; // 待提交
|
||||||
private HasSubmitFragment hasSubmitFragment;// 已提交
|
private HasSubmitFragment hasSubmitFragment;// 已提交
|
||||||
@ -46,13 +45,14 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
tabRecord = (TabLayout) findViewById(R.id.tab_record);
|
TabLayout tabRecord = (TabLayout) findViewById(R.id.tab_record);
|
||||||
vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
NoSlideViewPager vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
||||||
ArrayList<Fragment> fragments = new ArrayList<>();
|
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||||
staySubmitFragment = new StaySubmitFragment();
|
staySubmitFragment = new StaySubmitFragment();
|
||||||
fragments.add(staySubmitFragment);
|
fragments.add(staySubmitFragment);
|
||||||
hasSubmitFragment = new HasSubmitFragment();
|
hasSubmitFragment = new HasSubmitFragment();
|
||||||
fragments.add(hasSubmitFragment);
|
fragments.add(hasSubmitFragment);
|
||||||
|
assert getFragmentManager() != null;
|
||||||
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
||||||
@NonNull
|
@NonNull
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -68,8 +68,8 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
});
|
});
|
||||||
|
|
||||||
tabRecord.setupWithViewPager(vpRecord);
|
tabRecord.setupWithViewPager(vpRecord);
|
||||||
tabRecord.getTabAt(0).setText(names[0]);
|
Objects.requireNonNull(tabRecord.getTabAt(0)).setText(names[0]);
|
||||||
tabRecord.getTabAt(1).setText(names[1]);
|
Objects.requireNonNull(tabRecord.getTabAt(1)).setText(names[1]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,18 +27,20 @@ import com.navinfo.outdoor.util.RegexUtil;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册页面
|
* 注册页面
|
||||||
*/
|
*/
|
||||||
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private EditText etRegisterPhone, etRegisterNote, etRegisterReferrer, etRegisterPaw, etRegisterConfirmPaw;
|
private EditText etRegisterPhone;
|
||||||
private ImageView ivFinish;
|
private EditText etRegisterNote;
|
||||||
private TextView haveGoLogin, registerGetNote;
|
private EditText etRegisterPaw;
|
||||||
private Button btnRegister;
|
private EditText etRegisterConfirmPaw;
|
||||||
|
private TextView registerGetNote;
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
private CountDownTimer timer;
|
private CountDownTimer timer;
|
||||||
private CheckBox ivRegisterCheck;
|
|
||||||
|
|
||||||
public static RegisterFragment newInstance(Bundle bundle) {
|
public static RegisterFragment newInstance(Bundle bundle) {
|
||||||
RegisterFragment fragment = new RegisterFragment();
|
RegisterFragment fragment = new RegisterFragment();
|
||||||
@ -54,20 +56,20 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivFinish = findViewById(R.id.iv_register_finish);
|
ImageView ivFinish = findViewById(R.id.iv_register_finish);
|
||||||
ivFinish.setOnClickListener(this::onClick);
|
ivFinish.setOnClickListener(this);
|
||||||
etRegisterPhone = findViewById(R.id.et_register_phone);
|
etRegisterPhone = findViewById(R.id.et_register_phone);
|
||||||
etRegisterNote = findViewById(R.id.et_register_note);
|
etRegisterNote = findViewById(R.id.et_register_note);
|
||||||
registerGetNote = findViewById(R.id.register_get_note);
|
registerGetNote = findViewById(R.id.register_get_note);
|
||||||
registerGetNote.setOnClickListener(this::onClick);
|
registerGetNote.setOnClickListener(this);
|
||||||
etRegisterReferrer = findViewById(R.id.et_register_referrer);
|
EditText etRegisterReferrer = findViewById(R.id.et_register_referrer);
|
||||||
etRegisterPaw = findViewById(R.id.et_register_paw);
|
etRegisterPaw = findViewById(R.id.et_register_paw);
|
||||||
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
|
etRegisterConfirmPaw = findViewById(R.id.et_register_confirm_paw);
|
||||||
ivRegisterCheck = findViewById(R.id.iv_register_check);
|
CheckBox ivRegisterCheck = findViewById(R.id.iv_register_check);
|
||||||
haveGoLogin = findViewById(R.id.have_go_login);
|
TextView haveGoLogin = findViewById(R.id.have_go_login);
|
||||||
haveGoLogin.setOnClickListener(this::onClick);
|
haveGoLogin.setOnClickListener(this);
|
||||||
btnRegister = findViewById(R.id.btn_register);
|
Button btnRegister = findViewById(R.id.btn_register);
|
||||||
btnRegister.setOnClickListener(this::onClick);
|
btnRegister.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -80,7 +82,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_register_finish:
|
case R.id.iv_register_finish:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.have_go_login:
|
case R.id.have_go_login:
|
||||||
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
||||||
@ -146,14 +148,14 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
httpParams.put("mobile", mobile);
|
httpParams.put("mobile", mobile);
|
||||||
}
|
}
|
||||||
String code = etRegisterNote.getText().toString().trim();
|
String code = etRegisterNote.getText().toString().trim();
|
||||||
if (code == null || code.equals("")) {
|
if (code.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请获取短信验证码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
httpParams.put("code", code);
|
httpParams.put("code", code);
|
||||||
}
|
}
|
||||||
String password = etRegisterPaw.getText().toString().trim();
|
String password = etRegisterPaw.getText().toString().trim();
|
||||||
if (password == null || password.equals("")) {
|
if (password.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入密码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -164,7 +166,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String conFirmPaw = etRegisterConfirmPaw.getText().toString().trim();
|
String conFirmPaw = etRegisterConfirmPaw.getText().toString().trim();
|
||||||
if (conFirmPaw == null || conFirmPaw.equals("")) {
|
if (conFirmPaw.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入确认密码", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -199,7 +201,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
obtain.what = Constant.REGISTER_WORD;
|
obtain.what = Constant.REGISTER_WORD;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
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.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.media.MediaMetadataRetriever;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.ContactsContract;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -29,7 +22,6 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.FileUtils;
|
|
||||||
import com.github.lazylibrary.util.StringUtils;
|
import com.github.lazylibrary.util.StringUtils;
|
||||||
import com.github.lazylibrary.util.ZipUtil;
|
import com.github.lazylibrary.util.ZipUtil;
|
||||||
import com.google.gson.Gson;
|
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.BaseDialog;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.lzy.okgo.OkGo;
|
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Response;
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.activity.PictureActivity;
|
import com.navinfo.outdoor.activity.PictureActivity;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
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.RoadSaveBean;
|
||||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
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.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.json.JSONException;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
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());
|
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
Intent intent = new Intent(getContext(), PictureActivity.class);
|
Intent intent = new Intent(getContext(), PictureActivity.class);
|
||||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalFile.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);
|
intent.putExtra("poiEntity", showPoiEntity);
|
||||||
startActivityForResult(intent, 0x101);
|
startActivityForResult(intent, 0x101);
|
||||||
}
|
}
|
||||||
@ -319,7 +302,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Intent intent = new Intent(getContext(), PictureActivity.class);
|
Intent intent = new Intent(getContext(), PictureActivity.class);
|
||||||
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
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_PATH, finalFile.getAbsolutePath());
|
||||||
intent.putExtra(Constant.INTENT_VIDEO_ORATATION, 0);
|
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||||
intent.putExtra("poiEntity", showPoiEntity);
|
intent.putExtra("poiEntity", showPoiEntity);
|
||||||
startActivityForResult(intent, 0x101);
|
startActivityForResult(intent, 0x101);
|
||||||
break;
|
break;
|
||||||
@ -553,7 +536,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Intent intentPanorama = new Intent(getActivity(), PictureActivity.class);
|
Intent intentPanorama = new Intent(getActivity(), PictureActivity.class);
|
||||||
File finalFile = AWMp4ParserHelper.getInstance().obtainMp4FilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
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_PATH, finalFile.getAbsolutePath());
|
||||||
intentPanorama.putExtra(Constant.INTENT_VIDEO_ORATATION, 0);
|
intentPanorama.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||||
startActivityForResult(intentPanorama, 0x101);
|
startActivityForResult(intentPanorama, 0x101);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -15,18 +15,14 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置页面的fragment
|
* 设置页面的fragment
|
||||||
*/
|
*/
|
||||||
public class SetFragment extends BaseFragment implements View.OnClickListener {
|
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.Editor navInfoEditor;
|
||||||
private SharedPreferences navInfo;
|
|
||||||
|
|
||||||
public static SetFragment newInstance(Bundle bundle) {
|
public static SetFragment newInstance(Bundle bundle) {
|
||||||
SetFragment fragment = new SetFragment();
|
SetFragment fragment = new SetFragment();
|
||||||
@ -46,21 +42,21 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.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();
|
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);
|
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.setChecked(navInfo.getBoolean("switchRealUpload", false));
|
||||||
switchRealUpload.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchRealUpload.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||||
//控制开关字体颜色
|
//控制开关字体颜色
|
||||||
navInfoEditor.putBoolean("switchRealUpload", 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.setChecked(navInfo.getBoolean("switchAutoSave", false));
|
||||||
switchAutoSave.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchAutoSave.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -70,7 +66,7 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
switchInform = findViewById(R.id.switch_inform);
|
Switch switchInform = findViewById(R.id.switch_inform);
|
||||||
switchInform.setChecked(navInfo.getBoolean("switchInform", false));
|
switchInform.setChecked(navInfo.getBoolean("switchInform", false));
|
||||||
switchInform.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchInform.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -80,7 +76,7 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
switchTrafficRemind = findViewById(R.id.switch_traffic_remind);
|
Switch switchTrafficRemind = findViewById(R.id.switch_traffic_remind);
|
||||||
switchTrafficRemind.setChecked(navInfo.getBoolean("switchTrafficRemind", false));
|
switchTrafficRemind.setChecked(navInfo.getBoolean("switchTrafficRemind", false));
|
||||||
switchTrafficRemind.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
switchTrafficRemind.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -94,10 +90,8 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_set) {
|
||||||
case R.id.iv_set:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -25,7 +24,6 @@ import com.kongzue.dialog.v3.BottomMenu;
|
|||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
|
||||||
import com.navinfo.outdoor.adapter.StaySubmitAdapter;
|
import com.navinfo.outdoor.adapter.StaySubmitAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
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.PoiDatabase;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.PoiSaveUtils;
|
import com.navinfo.outdoor.util.PoiSaveUtils;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录-待提交的fragment
|
* 记录-待提交的fragment
|
||||||
*/
|
*/
|
||||||
public class StaySubmitFragment extends BaseFragment implements View.OnClickListener {
|
public class StaySubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private RecyclerView stayXrv;
|
|
||||||
private CheckBox cbSelect;
|
|
||||||
private TextView tvDelete;
|
|
||||||
private Button btnStaySubmit;
|
|
||||||
private StaySubmitAdapter staySubmitAdapter;
|
private StaySubmitAdapter staySubmitAdapter;
|
||||||
private PoiDatabase roadDatabase;
|
|
||||||
private PoiDao roadDao;
|
private PoiDao roadDao;
|
||||||
private TextView tvStayType;
|
private TextView tvStayType;
|
||||||
private List<PoiEntity> roadEntities;
|
private List<PoiEntity> roadEntities;
|
||||||
@ -87,20 +79,20 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
roadDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||||
roadDao = roadDatabase.getPoiDao();
|
roadDao = roadDatabase.getPoiDao();
|
||||||
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
||||||
clStayType.setOnClickListener(this::onClick);
|
clStayType.setOnClickListener(this);
|
||||||
stayXrv = (RecyclerView) findViewById(R.id.stay_xrv);
|
RecyclerView stayXrv =findViewById(R.id.stay_xrv);
|
||||||
cbSelect = (CheckBox) findViewById(R.id.cb_select);
|
CheckBox cbSelect =findViewById(R.id.cb_select);
|
||||||
cbSelect.setOnClickListener(this::onClick);
|
cbSelect.setOnClickListener(this);
|
||||||
tvDelete = (TextView) findViewById(R.id.tv_delete);
|
TextView tvDelete =findViewById(R.id.tv_delete);
|
||||||
tvDelete.setOnClickListener(this::onClick);
|
tvDelete.setOnClickListener(this);
|
||||||
tvStayType = findViewById(R.id.tv_stay_type);
|
tvStayType = findViewById(R.id.tv_stay_type);
|
||||||
btnStaySubmit = (Button) findViewById(R.id.btn_stay_submit);
|
Button btnStaySubmit =findViewById(R.id.btn_stay_submit);
|
||||||
btnStaySubmit.setOnClickListener(this::onClick);
|
btnStaySubmit.setOnClickListener(this);
|
||||||
stayXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
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());
|
staySubmitAdapter = new StaySubmitAdapter(getContext());
|
||||||
stayXrv.setAdapter(staySubmitAdapter);
|
stayXrv.setAdapter(staySubmitAdapter);
|
||||||
//点击条目跳转
|
//点击条目跳转
|
||||||
@ -164,7 +156,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
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
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
@ -200,7 +192,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
|
|
||||||
case R.id.tv_delete:
|
case R.id.tv_delete:
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
initRequest(staySubmitAdapter.getAllRoad());
|
initRequest(staySubmitAdapter.getAllRoad());
|
||||||
@ -238,9 +230,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
public void run() {
|
public void run() {
|
||||||
ArrayList<PoiEntity> poiEntities = new ArrayList<>();
|
ArrayList<PoiEntity> poiEntities = new ArrayList<>();
|
||||||
synchronized (allRoad) {
|
synchronized (allRoad) {
|
||||||
Iterator iterator = allRoad.iterator();
|
for (PoiEntity poiEntity : allRoad) {
|
||||||
while (iterator.hasNext()) {
|
|
||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
|
||||||
if (poiEntity.isChecked()) {
|
if (poiEntity.isChecked()) {
|
||||||
poiEntities.add(poiEntity);
|
poiEntities.add(poiEntity);
|
||||||
}
|
}
|
||||||
@ -259,10 +249,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
auditIds += poiEntities.get(i).getBodyId()+",";
|
auditIds += poiEntities.get(i).getBodyId()+",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (taskIds!=null&&!taskIds.equals("")){
|
if (!taskIds.equals("")){
|
||||||
taskIds = taskIds.substring(0,taskIds.length() - 1);
|
taskIds = taskIds.substring(0,taskIds.length() - 1);
|
||||||
}
|
}
|
||||||
if (auditIds!=null&&!auditIds.equals("")){
|
if (!auditIds.equals("")){
|
||||||
auditIds = auditIds.substring(0,auditIds.length() - 1);
|
auditIds = auditIds.substring(0,auditIds.length() - 1);
|
||||||
}
|
}
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@ -314,7 +304,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoder();
|
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -29,12 +29,12 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-任务说明
|
* 发现-任务说明
|
||||||
*/
|
*/
|
||||||
public class TaskExplainFragment extends BaseFragment implements View.OnClickListener {
|
public class TaskExplainFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivFindTaskExplain;
|
|
||||||
private XRecyclerView taskExplainRecycle;
|
private XRecyclerView taskExplainRecycle;
|
||||||
|
|
||||||
private TaskExplainAdapter taskExplainAdapter;
|
private TaskExplainAdapter taskExplainAdapter;
|
||||||
@ -56,9 +56,9 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.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);
|
taskExplainRecycle =findViewById(R.id.task_explain_recycler);
|
||||||
ivFindTaskExplain.setOnClickListener(this::onClick);
|
ivFindTaskExplain.setOnClickListener(this);
|
||||||
|
|
||||||
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
//下划线
|
//下划线
|
||||||
@ -166,11 +166,8 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_find_task_explain) {
|
||||||
case R.id.iv_find_task_explain:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,15 +29,14 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现页面的任务说明的点击条目跳转第二个页面
|
* 发现页面的任务说明的点击条目跳转第二个页面
|
||||||
*/
|
*/
|
||||||
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivTaskExplain2;
|
|
||||||
private XRecyclerView taskExplain2Recycler;
|
private XRecyclerView taskExplain2Recycler;
|
||||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans2;
|
|
||||||
private TaskExplainAdapter2 taskExplainAdapter2;
|
private TaskExplainAdapter2 taskExplainAdapter2;
|
||||||
private int taskExplainPage = 1;
|
private int taskExplainPage = 1;
|
||||||
|
|
||||||
@ -56,9 +55,9 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.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);
|
taskExplain2Recycler = findViewById(R.id.task_explain2_recycler);
|
||||||
ivTaskExplain2.setOnClickListener(this::onClick);
|
ivTaskExplain2.setOnClickListener(this);
|
||||||
taskExplain2Recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
taskExplain2Recycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
//下划线
|
//下划线
|
||||||
// taskExplain2Recycler.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
|
// taskExplain2Recycler.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
|
||||||
@ -97,13 +96,13 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
dataBeans2 = new ArrayList<>();
|
ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans2 = new ArrayList<>();
|
||||||
initNetWork2();
|
initNetWork2();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWork2() {
|
private void initNetWork2() {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
String id = getActivity().getIntent().getStringExtra("id");
|
String id = Objects.requireNonNull(getActivity()).getIntent().getStringExtra("id");
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("fid", id);
|
httpParams.put("fid", id);
|
||||||
httpParams.put("pageNum", taskExplainPage);
|
httpParams.put("pageNum", taskExplainPage);
|
||||||
@ -124,7 +123,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
taskExplain2Recycler.refreshComplete();
|
taskExplain2Recycler.refreshComplete();
|
||||||
taskExplain2Recycler.loadMoreComplete();
|
taskExplain2Recycler.loadMoreComplete();
|
||||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,13 +30,13 @@ import org.json.JSONObject;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-任务专区
|
* 发现-任务专区
|
||||||
*/
|
*/
|
||||||
public class TaskPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
public class TaskPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView mIvFindTask;
|
|
||||||
private XRecyclerView taskRecycler;
|
private XRecyclerView taskRecycler;
|
||||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||||
@ -57,8 +57,8 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
mIvFindTask = findViewById(R.id.iv_find_task);
|
ImageView mIvFindTask = findViewById(R.id.iv_find_task);
|
||||||
mIvFindTask.setOnClickListener(this::onClick);
|
mIvFindTask.setOnClickListener(this);
|
||||||
taskRecycler = findViewById(R.id.task_recycler);
|
taskRecycler = findViewById(R.id.task_recycler);
|
||||||
taskRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
taskRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
@ -194,10 +194,8 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_find_task) {
|
||||||
case R.id.iv_find_task:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
@ -10,13 +9,11 @@ import android.graphics.BitmapFactory;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.location.Location;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
@ -25,11 +22,9 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.github.lazylibrary.util.DensityUtil;
|
import com.github.lazylibrary.util.DensityUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -44,7 +39,6 @@ import com.kongzue.dialog.v3.MessageDialog;
|
|||||||
import com.kongzue.dialog.v3.ShareDialog;
|
import com.kongzue.dialog.v3.ShareDialog;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Response;
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
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.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||||
import com.navinfo.outdoor.bean.RoadExtend;
|
|
||||||
import com.navinfo.outdoor.bean.UserBean;
|
import com.navinfo.outdoor.bean.UserBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
|
||||||
import com.navinfo.outdoor.room.PoiDao;
|
import com.navinfo.outdoor.room.PoiDao;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
@ -194,13 +185,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
dragView = findViewById(R.id.dragView);
|
dragView = findViewById(R.id.dragView);
|
||||||
frameLayout = findViewById(R.id.frame_layout);
|
frameLayout = findViewById(R.id.frame_layout);
|
||||||
ivRefish = findViewById(R.id.iv_refrish);
|
ivRefish = findViewById(R.id.iv_refrish);
|
||||||
ivRefish.setOnClickListener(this::onClick);
|
ivRefish.setOnClickListener(this);
|
||||||
ivFilter = findViewById(R.id.iv_filter);
|
ivFilter = findViewById(R.id.iv_filter);
|
||||||
ivFilter.setOnClickListener(this::onClick);
|
ivFilter.setOnClickListener(this);
|
||||||
ivSubmit = findViewById(R.id.iv_submit);
|
ivSubmit = findViewById(R.id.iv_submit);
|
||||||
ivSubmit.setOnClickListener(this::onClick);
|
ivSubmit.setOnClickListener(this);
|
||||||
ivMessage = findViewById(R.id.iv_message);
|
ivMessage = findViewById(R.id.iv_message);
|
||||||
ivMessage.setOnClickListener(this::onClick);
|
ivMessage.setOnClickListener(this);
|
||||||
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
||||||
tencentMap = treasureMap.getMap();
|
tencentMap = treasureMap.getMap();
|
||||||
MapManager.getInstance().init(getActivity(), tencentMap);
|
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 = (ImageView) findViewById(R.id.iv_zoom_add);
|
||||||
ivZoomAdd.setOnClickListener(this::onClick);
|
ivZoomAdd.setOnClickListener(this);
|
||||||
//地图缩小
|
//地图缩小
|
||||||
ivZoomDel = (ImageView) findViewById(R.id.iv_zoom_del);
|
ivZoomDel = (ImageView) findViewById(R.id.iv_zoom_del);
|
||||||
ivZoomDel.setOnClickListener(this::onClick);
|
ivZoomDel.setOnClickListener(this);
|
||||||
//回到定位位置
|
//回到定位位置
|
||||||
ivLocation = findViewById(R.id.iv_location);
|
ivLocation = findViewById(R.id.iv_location);
|
||||||
ivLocation.setOnClickListener(this::onClick);
|
ivLocation.setOnClickListener(this);
|
||||||
//样式
|
//样式
|
||||||
tencentMap.setMapStyle(2);
|
tencentMap.setMapStyle(2);
|
||||||
//启用3d视图
|
//启用3d视图
|
||||||
@ -281,9 +272,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 设置地图宽高为屏幕的宽高
|
// 设置地图宽高为屏幕的宽高
|
||||||
int[] widtHeight = DensityUtil.getDeviceInfo(getActivity());
|
int[] widthHeight = DensityUtil.getDeviceInfo(getActivity());
|
||||||
treasureMap.getLayoutParams().width = widtHeight[0];
|
treasureMap.getLayoutParams().width = widthHeight[0];
|
||||||
treasureMap.getLayoutParams().height = widtHeight[1];
|
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) {
|
public int getScrollableViewScrollPosition(View mScrollableView, boolean isSlidingUp) {
|
||||||
if (mScrollableView instanceof NestedScrollView) {
|
if (mScrollableView instanceof NestedScrollView) {
|
||||||
if (isSlidingUp) {
|
if (isSlidingUp) {
|
||||||
@ -383,8 +374,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
private void initList(TencentLocation tencentLocation) {
|
private void initList(TencentLocation tencentLocation) {
|
||||||
int task_type = Constant.TASK_TYPE;
|
int task_type = Constant.TASK_TYPE;
|
||||||
int limit_type = Constant.LIMIT_TTPE;
|
int limit_type = Constant.LIMIT_TYPE;
|
||||||
int taskStatus = Constant.TASK_STASTUS;
|
int taskStatus = Constant.TASK_STARTUP;
|
||||||
if (taskStatus == 1 || taskStatus == 2 || taskStatus == 3) {
|
if (taskStatus == 1 || taskStatus == 2 || taskStatus == 3) {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||||
@ -447,13 +438,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
latLng = GeometryTools.createLatLng(geo);
|
latLng = GeometryTools.createLatLng(geo);
|
||||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
BitmapDescriptor bitmapLine = null;
|
BitmapDescriptor bitmapLine = null;
|
||||||
if (Integer.valueOf(listBean.getType()) == 3) {//poi录像
|
if (listBean.getType() == 3) {//poi录像
|
||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
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);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||||
// 构造 PolylineOpitons
|
// 构造 PolylineOptions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
// 折线设置圆形线头
|
// 折线设置圆形线头
|
||||||
@ -492,19 +483,18 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
||||||
double x = centroid.getX();
|
double x = centroid.getX();
|
||||||
double y = centroid.getY();
|
double y = centroid.getY();
|
||||||
if (centroid != null) {
|
latLng = new LatLng();
|
||||||
latLng = new LatLng();
|
latLng.setLatitude(y);
|
||||||
latLng.setLatitude(y);
|
latLng.setLongitude(x);
|
||||||
latLng.setLongitude(x);
|
/* if (latPolygon != null && latPolygon.size() > 0) {
|
||||||
}
|
|
||||||
/* if (latPolygon != null && latPolygon.size() > 0) {
|
|
||||||
latLng = latPolygon.get(0);
|
latLng = latPolygon.get(0);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
switch (Integer.valueOf(list.get(i).getType())) {
|
switch (list.get(i).getType()) {
|
||||||
case 1://poi
|
case 1://poi
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
|
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)
|
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -516,6 +506,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 2://充电站
|
case 2://充电站
|
||||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg1);
|
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg1);
|
||||||
|
assert latLng != null;
|
||||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -528,6 +519,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 3://poi录像
|
case 3://poi录像
|
||||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
|
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)
|
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -539,6 +531,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 4://道路录像
|
case 4://道路录像
|
||||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||||
|
assert latLng != null;
|
||||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -551,6 +544,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 5://其他
|
case 5://其他
|
||||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
|
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
|
||||||
|
assert latLng != null;
|
||||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -562,6 +556,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 6://面状任务
|
case 6://面状任务
|
||||||
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_bg1);
|
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_bg1);
|
||||||
|
assert latLng != null;
|
||||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||||
.anchor(0.5f, 1.0f)
|
.anchor(0.5f, 1.0f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -681,6 +676,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
MapManager.getInstance().moveLatlng(latLng, null);
|
MapManager.getInstance().moveLatlng(latLng, null);
|
||||||
if (bigMarker == null) {
|
if (bigMarker == null) {
|
||||||
|
assert latLng != null;
|
||||||
bigMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(descriptor)
|
bigMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(descriptor)
|
||||||
.anchor(0.5f, 1f)
|
.anchor(0.5f, 1f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
@ -696,7 +692,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
sliding_layout.setPanelHeight(0);
|
sliding_layout.setPanelHeight(0);
|
||||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||||
frameLayout.setVisibility(View.VISIBLE);
|
frameLayout.setVisibility(View.VISIBLE);
|
||||||
setMainButtonVisiable(View.GONE);
|
setMainButtonVisitable(View.GONE);
|
||||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
/* bundle.putBoolean("boolean",aBoolean);*/
|
/* bundle.putBoolean("boolean",aBoolean);*/
|
||||||
@ -709,9 +705,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initThread() {
|
private void initThread() {
|
||||||
int taskStatus = Constant.TASK_STASTUS;
|
int taskStatus = Constant.TASK_STARTUP;
|
||||||
int type = Constant.TASK_TYPE;
|
int type = Constant.TASK_TYPE;
|
||||||
int limit = Constant.LIMIT_TTPE;
|
int limit = Constant.LIMIT_TYPE;
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -784,21 +780,19 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
||||||
double x = centroid.getX();
|
double x = centroid.getX();
|
||||||
double y = centroid.getY();
|
double y = centroid.getY();
|
||||||
if (centroid != null) {
|
latLng = new LatLng();
|
||||||
latLng = new LatLng();
|
latLng.setLatitude(y);
|
||||||
latLng.setLatitude(y);
|
latLng.setLongitude(x);
|
||||||
latLng.setLongitude(x);
|
/*if (latPolygon != null && latPolygon.size() > 0) {
|
||||||
}
|
|
||||||
/*if (latPolygon != null && latPolygon.size() > 0) {
|
|
||||||
latLng = latPolygon.get(0);
|
latLng = latPolygon.get(0);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (allTaskStatus.get(i).getX() != null && allTaskStatus.get(i).getY() != null) {
|
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
|
case 1://poi
|
||||||
BitmapDescriptor poiDescriptor = null;
|
BitmapDescriptor poiDescriptor = null;
|
||||||
if (poiEntity.getTaskStatus() == 1) {
|
if (poiEntity.getTaskStatus() == 1) {
|
||||||
@ -824,6 +818,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else {
|
} else {
|
||||||
chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
||||||
}
|
}
|
||||||
|
assert latLng != null;
|
||||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor)
|
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.anchor(0.5f, 1f)
|
.anchor(0.5f, 1f)
|
||||||
@ -930,7 +925,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
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);
|
// showPoiMarkerByType(1, newPoiLatLng);
|
||||||
showSlidingFragment(poiFragment);
|
showSlidingFragment(poiFragment);
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@ -946,7 +941,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
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);
|
// showPoiMarkerByType(4, newPoiLatLng);
|
||||||
showSlidingFragment(chargingStationFragment);
|
showSlidingFragment(chargingStationFragment);
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@ -962,7 +957,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
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);
|
// showPoiMarkerByType(2, newPoiLatLng);
|
||||||
showSlidingFragment(poiVideoFragment);
|
showSlidingFragment(poiVideoFragment);
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@ -978,7 +973,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
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);
|
// showPoiMarkerByType(3, newPoiLatLng);
|
||||||
showSlidingFragment(roadFragment);
|
showSlidingFragment(roadFragment);
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@ -994,7 +989,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
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);
|
// showPoiMarkerByType(5, newPoiLatLng);
|
||||||
showSlidingFragment(otherFragment);
|
showSlidingFragment(otherFragment);
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@ -1094,10 +1089,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
initCheckedMarker(Constant.OTHER_WORD);
|
initCheckedMarker(Constant.OTHER_WORD);
|
||||||
}
|
}
|
||||||
}*/ else if (data.what == Constant.TREASURE_FRAGMENT) {//抽屉界面的展示和隐藏
|
}*/ else if (data.what == Constant.TREASURE_FRAGMENT) {//抽屉界面的展示和隐藏
|
||||||
if ((boolean) data.obj == true) {
|
if ((boolean) data.obj) {
|
||||||
frameLayout.setVisibility(View.GONE);
|
frameLayout.setVisibility(View.GONE);
|
||||||
sliding_layout.setPanelHeight(0);
|
sliding_layout.setPanelHeight(0);
|
||||||
setMainButtonVisiable(View.VISIBLE);
|
setMainButtonVisitable(View.VISIBLE);
|
||||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||||
if (bigMarker != null) {
|
if (bigMarker != null) {
|
||||||
bigMarker.setVisible(false);
|
bigMarker.setVisible(false);
|
||||||
@ -1107,8 +1102,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
removableScreenMarker.clear();
|
removableScreenMarker.clear();
|
||||||
}
|
}
|
||||||
} else if (data.what == Constant.MAIN_BUTTON_VISIABLE) {//控制主界面各个按钮显隐状态的what值
|
} else if (data.what == Constant.MAIN_BUTTON_VISITABLE) {//控制主界面各个按钮显隐状态的what值
|
||||||
setMainButtonVisiable((Integer) data.obj);
|
setMainButtonVisitable((Integer) data.obj);
|
||||||
} else if (data.what == Constant.GATHER_GET_RETURN) {//item 点击页面的返回事件的处理
|
} else if (data.what == Constant.GATHER_GET_RETURN) {//item 点击页面的返回事件的处理
|
||||||
if ((boolean) data.obj) {
|
if ((boolean) data.obj) {
|
||||||
frameLayout.setVisibility(View.GONE);
|
frameLayout.setVisibility(View.GONE);
|
||||||
@ -1116,7 +1111,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||||
} else {
|
} else {
|
||||||
frameLayout.setVisibility(View.GONE);
|
frameLayout.setVisibility(View.GONE);
|
||||||
setMainButtonVisiable(View.VISIBLE);
|
setMainButtonVisitable(View.VISIBLE);
|
||||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||||
fragmentTransaction.remove(gatherGetFragment);
|
fragmentTransaction.remove(gatherGetFragment);
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
@ -1129,7 +1124,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
removableScreenMarker.clear();
|
removableScreenMarker.clear();
|
||||||
} else if (data.what == Constant.CHARGING_STATION) {//充电站的充电桩-新增
|
} 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;
|
HashMap<String, Object> stationHashMap = (HashMap<String, Object>) data.obj;
|
||||||
String showStation = (String) stationHashMap.get("showStation");
|
String showStation = (String) stationHashMap.get("showStation");
|
||||||
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) stationHashMap.get("chargingPileEntity");
|
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) stationHashMap.get("chargingPileEntity");
|
||||||
@ -1226,15 +1221,15 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
/**
|
/**
|
||||||
* 控制主界面各个按钮的显示状态
|
* 控制主界面各个按钮的显示状态
|
||||||
*/
|
*/
|
||||||
private void setMainButtonVisiable(int visiable) {
|
private void setMainButtonVisitable(int visitable) {
|
||||||
ivZoomAdd.setVisibility(visiable);
|
ivZoomAdd.setVisibility(visitable);
|
||||||
ivZoomDel.setVisibility(visiable);
|
ivZoomDel.setVisibility(visitable);
|
||||||
ivLocation.setVisibility(visiable);
|
ivLocation.setVisibility(visitable);
|
||||||
ivRefish.setVisibility(visiable);
|
ivRefish.setVisibility(visitable);
|
||||||
cbMapType.setVisibility(visiable);
|
cbMapType.setVisibility(visitable);
|
||||||
ivSubmit.setVisibility(visiable);
|
ivSubmit.setVisibility(visitable);
|
||||||
ivFilter.setVisibility(visiable);
|
ivFilter.setVisibility(visitable);
|
||||||
ivMessage.setVisibility(visiable);
|
ivMessage.setVisibility(visitable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* private void initPoiMarker(LatLng latLng) {
|
/* private void initPoiMarker(LatLng latLng) {
|
||||||
@ -1416,28 +1411,18 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
List<ShareDialog.Item> itemList = new ArrayList<>();
|
List<ShareDialog.Item> itemList = new ArrayList<>();
|
||||||
if (upload.contains(1)) {
|
if (upload.contains(1)) {
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (upload.contains(2)) {
|
if (upload.contains(2)) {
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (upload.contains(3)) {
|
if (upload.contains(3)) {
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.poi_video, "POI录像"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.poi_video, "POI录像"));
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (upload.contains(4)) {
|
if (upload.contains(4)) {
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (upload.contains(5)) {
|
if (upload.contains(5)) {
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
PoiEntity poiEntity = new PoiEntity();
|
PoiEntity poiEntity = new PoiEntity();
|
||||||
@ -1625,50 +1610,38 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
removableScreenMarker.clear();
|
removableScreenMarker.clear();
|
||||||
if (poiEntity.getTaskStatus()==1){//已领取
|
if (poiEntity.getTaskStatus()==1){//已领取
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity, true);
|
initMarker(poiEntity, true);
|
||||||
}else {
|
}else {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
switch (poiEntity.getType()) {
|
switch (poiEntity.getType()) {
|
||||||
case 1:
|
case 1:
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity,false);
|
initMarker(poiEntity,false);
|
||||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||||
showSlidingFragment(poiFragment);
|
showSlidingFragment(poiFragment);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity,false);
|
initMarker(poiEntity,false);
|
||||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||||
showSlidingFragment(chargingStationFragment);
|
showSlidingFragment(chargingStationFragment);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity,false);
|
initMarker(poiEntity,false);
|
||||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||||
showSlidingFragment(poiVideoFragment);
|
showSlidingFragment(poiVideoFragment);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity,false);
|
initMarker(poiEntity,false);
|
||||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||||
showSlidingFragment(roadFragment);
|
showSlidingFragment(roadFragment);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiEntity,false);
|
initMarker(poiEntity,false);
|
||||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||||
showSlidingFragment(otherFragment);
|
showSlidingFragment(otherFragment);
|
||||||
@ -1693,7 +1666,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
poiListEntity.setDist(listBean.getDist() + "");
|
poiListEntity.setDist(listBean.getDist() + "");
|
||||||
poiListEntity.setDescribe(listBean.getMemo());
|
poiListEntity.setDescribe(listBean.getMemo());
|
||||||
poiListEntity.setCreateTime(listBean.getEndDate());
|
poiListEntity.setCreateTime(listBean.getEndDate());
|
||||||
poiListEntity.setType(Integer.valueOf(listBean.getType()));
|
poiListEntity.setType(listBean.getType());
|
||||||
String geo = listBean.getGeo();
|
String geo = listBean.getGeo();
|
||||||
poiListEntity.setGeoWkt(geo);
|
poiListEntity.setGeoWkt(geo);
|
||||||
Geometry geometry = GeometryTools.createGeometry(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.setX(latPolygon.get(0).longitude + "");
|
||||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
if (marker!=null){
|
marker.remove();
|
||||||
marker.remove();
|
|
||||||
}
|
|
||||||
initMarker(poiListEntity, true);
|
initMarker(poiListEntity, true);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "数据为空", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "数据为空", Toast.LENGTH_SHORT).show();
|
||||||
@ -1739,8 +1710,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取屏幕中心点位置
|
* 获取屏幕中心点位置
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public LatLng getMapCenterPoint() {
|
public LatLng getMapCenterPoint() {
|
||||||
// int left = treasureMap.getLeft();
|
// 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 x = (int) (treasureMap.getX() + (right - left) / 2);
|
||||||
// int y = (int) (treasureMap.getY() + (bottom - top) / 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));
|
// LatLng pt = projection.fromScreenLocation(new Point(x, y));
|
||||||
return tencentMap.getCameraPosition().target;
|
return tencentMap.getCameraPosition().target;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ import com.navinfo.outdoor.util.PhotoUtils;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@ -47,9 +48,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
|
|
||||||
private ImageView ivAttestation2;
|
private ImageView ivAttestation2;
|
||||||
private ImageView ivAttestation1;
|
private ImageView ivAttestation1;
|
||||||
private ImageView ivAttestation;
|
|
||||||
private Button btnAttestation;
|
|
||||||
private ArrayList<NameAuthenticationBean> authenticationBeans;
|
|
||||||
private EditText etAttestationName;
|
private EditText etAttestationName;
|
||||||
private EditText etNamePhone;
|
private EditText etNamePhone;
|
||||||
private ImageView ivAttestation3;
|
private ImageView ivAttestation3;
|
||||||
@ -82,7 +80,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
authenticationBeans = new ArrayList<>();
|
ArrayList<NameAuthenticationBean> authenticationBeans = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -90,7 +88,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivAttestation = findViewById(R.id.iv_attestation);
|
ImageView ivAttestation = findViewById(R.id.iv_attestation);
|
||||||
ivAttestation.setOnClickListener(this);
|
ivAttestation.setOnClickListener(this);
|
||||||
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
ivAttestation1 = findViewById(R.id.iv_attestation1);
|
||||||
ivAttestation1.setOnClickListener(this);
|
ivAttestation1.setOnClickListener(this);
|
||||||
@ -98,9 +96,9 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
ivAttestation2.setOnClickListener(this);
|
ivAttestation2.setOnClickListener(this);
|
||||||
ivAttestation3 = findViewById(R.id.iv_attestation3);
|
ivAttestation3 = findViewById(R.id.iv_attestation3);
|
||||||
ivAttestation3.setOnClickListener(this);
|
ivAttestation3.setOnClickListener(this);
|
||||||
btnAttestation = (Button) findViewById(R.id.btn_attestation);
|
Button btnAttestation = (Button) findViewById(R.id.btn_attestation);
|
||||||
btnAttestation.setOnClickListener(this::onClick);
|
btnAttestation.setOnClickListener(this);
|
||||||
linearHint = findViewById(R.id.linear_hint);
|
LinearLayout linearHint = findViewById(R.id.linear_hint);
|
||||||
etAttestationName = (EditText) findViewById(R.id.et_attestationName);
|
etAttestationName = (EditText) findViewById(R.id.et_attestationName);
|
||||||
etNamePhone = (EditText) findViewById(R.id.et_namePhone);
|
etNamePhone = (EditText) findViewById(R.id.et_namePhone);
|
||||||
ivHera1 = (ImageView) findViewById(R.id.iv_hera1);
|
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);
|
tvCard2 = (TextView) findViewById(R.id.tv_card2);
|
||||||
ivHera3 = (ImageView) findViewById(R.id.iv_hera3);
|
ivHera3 = (ImageView) findViewById(R.id.iv_hera3);
|
||||||
tvCard3 = (TextView) findViewById(R.id.tv_card3);
|
tvCard3 = (TextView) findViewById(R.id.tv_card3);
|
||||||
tvTitle = findViewById(R.id.tv_title);
|
TextView tvTitle = findViewById(R.id.tv_title);
|
||||||
userAttestView = findViewById(R.id.user_attestation_view);
|
View userAttestView = findViewById(R.id.user_attestation_view);
|
||||||
linearLayout = findViewById(R.id.ll_pic);//身份证照片
|
LinearLayout linearLayout = findViewById(R.id.ll_pic);//身份证照片
|
||||||
useCamera = findViewById(R.id.user_attestation_camera);
|
useCamera = findViewById(R.id.user_attestation_camera);
|
||||||
useCamera.setOnClickListener(this::onClick);
|
useCamera.setOnClickListener(this);
|
||||||
if (Constant.AUDITSTATUS==-1){//审核中
|
if (Constant.AUDITSTATUS==-1){//审核中
|
||||||
if (Constant.NAME!=null&&Constant.ID_NUM!=null){
|
if (Constant.NAME!=null&&Constant.ID_NUM!=null){
|
||||||
tvTitle.setText("1.审核中");
|
tvTitle.setText("1.审核中");
|
||||||
@ -155,7 +153,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_attestation:
|
case R.id.iv_attestation:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.iv_attestation1:
|
case R.id.iv_attestation1:
|
||||||
Intent ivAttestationIntent1 = new Intent("android.media.action.IMAGE_CAPTURE");
|
Intent ivAttestationIntent1 = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||||
@ -176,7 +174,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
startActivityForResult(ivAttestationIntent3, 123);
|
startActivityForResult(ivAttestationIntent3, 123);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_attestation:
|
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();
|
Toast.makeText(getActivity(), "姓名不能为空,请输入姓名", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -184,7 +182,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
Toast.makeText(getActivity(), "请输入中文名字", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入中文名字", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!checkNum(etNamePhone.getText().toString().trim())) {
|
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||||
Toast.makeText(getActivity(), "身份证号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "身份证号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -202,16 +200,14 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
/***
|
/***
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public boolean checkNum(String text) {
|
public boolean checkNumber(String text) {
|
||||||
Pattern patternSfzhm1 = Pattern
|
Pattern patternSachs1 = Pattern
|
||||||
.compile("^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$");
|
.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)$");
|
.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 matcherSachs1 = patternSachs1.matcher(text);
|
||||||
Matcher matcherSfzhm2 = patternSfzhm2.matcher(text);
|
Matcher matcherSachs2 = patternSachs2.matcher(text);
|
||||||
if (!matcherSfzhm1.find() && !matcherSfzhm2.find())
|
return !matcherSachs1.find() && !matcherSachs2.find();
|
||||||
return false;
|
|
||||||
else return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,11 +222,12 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void nameAuthentication() {
|
private void nameAuthentication() {
|
||||||
if (etAttestationName.getText().toString() == null || etAttestationName.getText().toString().equals("")) {
|
|
||||||
|
if (etAttestationName.getText().toString().equals("")) {
|
||||||
Toast.makeText(getActivity(), "姓名不能为空,请输入姓名", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "姓名不能为空,请输入姓名", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!checkNum(etNamePhone.getText().toString().trim())) {
|
if (checkNumber(etNamePhone.getText().toString().trim())) {
|
||||||
Toast.makeText(getActivity(), "身份证错误,请重新输入", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "身份证错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -274,7 +271,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode()==200){
|
if (response.getCode()==200){
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.NAME=attestationName;
|
Constant.NAME=attestationName;
|
||||||
@ -286,7 +283,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
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.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现页面的fragment
|
* 提现页面的fragment
|
||||||
*/
|
*/
|
||||||
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
|
public class WithdrawFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivWithDraw;
|
private TextView tvUnit;
|
||||||
private TextView tvText;
|
private TextView tvAlready;
|
||||||
private TextView tvAll, tvUnit, tvAlready, tvTotal;
|
private TextView tvTotal;
|
||||||
private Button btWithdraw;
|
|
||||||
private double canExchangePrice;
|
private double canExchangePrice;
|
||||||
private EditText etAllPrice;
|
private EditText etAllPrice;
|
||||||
private TextView poiPushMoney;
|
private TextView poiPushMoney;
|
||||||
@ -76,12 +77,12 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
tvUnit = findViewById(R.id.tv_unit);//可提现
|
tvUnit = findViewById(R.id.tv_unit);//可提现
|
||||||
tvAlready = findViewById(R.id.tv_already);//已提现
|
tvAlready = findViewById(R.id.tv_already);//已提现
|
||||||
tvTotal = findViewById(R.id.tv_total);//总资产
|
tvTotal = findViewById(R.id.tv_total);//总资产
|
||||||
tvAll = findViewById(R.id.tv_all);
|
TextView tvAll = findViewById(R.id.tv_all);
|
||||||
tvAll.setOnClickListener(this::onClick);
|
tvAll.setOnClickListener(this::onClick);
|
||||||
etAllPrice = findViewById(R.id.et_allPrice);
|
etAllPrice = findViewById(R.id.et_allPrice);
|
||||||
ivWithDraw = findViewById(R.id.iv_withdraw);
|
ImageView ivWithDraw = findViewById(R.id.iv_withdraw);
|
||||||
ivWithDraw.setOnClickListener(this);
|
ivWithDraw.setOnClickListener(this);
|
||||||
tvText = findViewById(R.id.tv_text);
|
TextView tvText = findViewById(R.id.tv_text);
|
||||||
tvText.setOnClickListener(this::onClick);
|
tvText.setOnClickListener(this::onClick);
|
||||||
checkBox = findViewById(R.id.checkBox);
|
checkBox = findViewById(R.id.checkBox);
|
||||||
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
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);
|
btWithdraw.setOnClickListener(this::onClick);
|
||||||
poiPushMoney = (TextView) findViewById(R.id.poi_push_money);
|
poiPushMoney = (TextView) findViewById(R.id.poi_push_money);
|
||||||
poiReportMoney = (TextView) findViewById(R.id.poi_report_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) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_withdraw:
|
case R.id.iv_withdraw:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_text:
|
case R.id.tv_text:
|
||||||
Intent intentText = new Intent(getActivity(), FragmentManagement.class);
|
Intent intentText = new Intent(getActivity(), FragmentManagement.class);
|
||||||
@ -174,8 +175,8 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
|
|
||||||
case R.id.button:
|
case R.id.button:
|
||||||
String price = etAllPrice.getText().toString().trim();
|
String price = etAllPrice.getText().toString().trim();
|
||||||
if (price!=null&&!price.equals("")){
|
if (!price.equals("")){
|
||||||
double aDouble = Double.valueOf(price);
|
double aDouble = Double.parseDouble(price);
|
||||||
if (aDouble<10 ){
|
if (aDouble<10 ){
|
||||||
Toast.makeText(getActivity(), "提现金额不能低于10元", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "提现金额不能低于10元", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -191,7 +192,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
if (Constant.ID_NUMBER != null) {
|
if (Constant.ID_NUMBER != null) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
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
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
immediatelyPrice();
|
immediatelyPrice();
|
||||||
@ -232,7 +233,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
String unit = tvUnit.getText().toString();
|
String unit = tvUnit.getText().toString();
|
||||||
String price = etAllPrice.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();
|
String s = String.format("%.2f", v).toString();
|
||||||
tvUnit.setText(s);
|
tvUnit.setText(s);
|
||||||
}else {
|
}else {
|
||||||
|
@ -24,13 +24,13 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现记录:
|
* 提现记录:
|
||||||
*/
|
*/
|
||||||
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
|
public class WithdrawalRecordFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivWithdraw;
|
|
||||||
private XRecyclerView rxlWithdraw;
|
private XRecyclerView rxlWithdraw;
|
||||||
private WithdrawalAdapter withdrawalAdapter;
|
private WithdrawalAdapter withdrawalAdapter;
|
||||||
private int withPage = 1;
|
private int withPage = 1;
|
||||||
@ -49,7 +49,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivWithdraw = findViewById(R.id.iv_withdraw);
|
ImageView ivWithdraw = findViewById(R.id.iv_withdraw);
|
||||||
ivWithdraw.setOnClickListener(this);
|
ivWithdraw.setOnClickListener(this);
|
||||||
rxlWithdraw = (XRecyclerView) findViewById(R.id.rxl_withdraw);
|
rxlWithdraw = (XRecyclerView) findViewById(R.id.rxl_withdraw);
|
||||||
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
|
rxlWithdraw.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
@ -120,10 +120,8 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_withdraw) {
|
||||||
case R.id.iv_withdraw:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,34 +16,30 @@ import java.util.List;
|
|||||||
public interface ChargingPileDao {
|
public interface ChargingPileDao {
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Query("SELECT * FROM pile")
|
@Query("SELECT * FROM pile")
|
||||||
List<ChargingPileEntity> getChargingPile();
|
List<ChargingPileEntity> getChargingPile();
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Query("SELECT * FROM pile where fid = :fid")
|
@Query("SELECT * FROM pile where fid = :fid")
|
||||||
List<ChargingPileEntity> getChargingPileByStationId(String fid);
|
List<ChargingPileEntity> getChargingPileByStationId(String fid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
* @param chargingPileEntities
|
|
||||||
*/
|
*/
|
||||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
long[] insertChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
long[] insertChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
* @param chargingPileEntities
|
|
||||||
*/
|
*/
|
||||||
@Update
|
@Update
|
||||||
void updateChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
void updateChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
* @param chargingPileEntities
|
|
||||||
*/
|
*/
|
||||||
@Delete
|
@Delete
|
||||||
void deleteChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
void deleteChargingPileEntity(ChargingPileEntity... chargingPileEntities);
|
||||||
@ -54,7 +50,6 @@ public interface ChargingPileDao {
|
|||||||
void deleteChargingFidPileEntity(String fid);
|
void deleteChargingFidPileEntity(String fid);
|
||||||
/**
|
/**
|
||||||
*删除
|
*删除
|
||||||
* @param chargingPileEntities
|
|
||||||
*/
|
*/
|
||||||
@Delete
|
@Delete
|
||||||
void deleteAll(List<ChargingPileEntity> chargingPileEntities);
|
void deleteAll(List<ChargingPileEntity> chargingPileEntities);
|
||||||
@ -67,7 +62,6 @@ public interface ChargingPileDao {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 降序排列
|
* 降序排列
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Query("SELECT * FROM pile ORDER BY pileId DESC")
|
@Query("SELECT * FROM pile ORDER BY pileId DESC")
|
||||||
List<ChargingPileEntity> getAllChargingPileEntity();
|
List<ChargingPileEntity> getAllChargingPileEntity();
|
||||||
|
@ -101,7 +101,6 @@ public class ChargingPileEntity implements Serializable {
|
|||||||
public void setCp_availableState(int cp_availableState) {
|
public void setCp_availableState(int cp_availableState) {
|
||||||
this.cp_availableState = cp_availableState;
|
this.cp_availableState = cp_availableState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMemo() {
|
public String getMemo() {
|
||||||
return memo;
|
return memo;
|
||||||
}
|
}
|
||||||
|
@ -16,14 +16,12 @@ import java.util.List;
|
|||||||
public interface PoiDao {
|
public interface PoiDao {
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Query("SELECT * FROM poi")
|
@Query("SELECT * FROM poi")
|
||||||
List<PoiEntity> getAllPoi();
|
List<PoiEntity> getAllPoi();
|
||||||
|
|
||||||
@Query("SELECT * FROM poi where taskStatus > 1 and type!=6")
|
@Query("SELECT * FROM poi where taskStatus > 1 and type!=6")
|
||||||
List<PoiEntity> getAllPoiByRecoder();
|
List<PoiEntity> getAllPoiByRecoded();
|
||||||
|
|
||||||
@Query("SELECT * FROM poi where type=:type")
|
@Query("SELECT * FROM poi where type=:type")
|
||||||
List<PoiEntity> getAllPoiType(int type);
|
List<PoiEntity> getAllPoiType(int type);
|
||||||
@ -43,40 +41,30 @@ public interface PoiDao {
|
|||||||
PoiEntity getTaskIdPoiEntity(int taskId);
|
PoiEntity getTaskIdPoiEntity(int taskId);
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
|
||||||
* @param poiEntities
|
|
||||||
*/
|
*/
|
||||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
void insertPoiEntity(PoiEntity... poiEntities);
|
void insertPoiEntity(PoiEntity... poiEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
*
|
|
||||||
* @param poiEntities
|
|
||||||
*/
|
*/
|
||||||
@Update
|
@Update
|
||||||
void updatePoiEntity(PoiEntity... poiEntities);
|
void updatePoiEntity(PoiEntity... poiEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*
|
|
||||||
* @param poiEntities
|
|
||||||
*/
|
*/
|
||||||
@Delete
|
@Delete
|
||||||
void deletePoiEntity(PoiEntity... poiEntities);
|
void deletePoiEntity(PoiEntity... poiEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*
|
|
||||||
* @param poiEntities
|
|
||||||
*/
|
*/
|
||||||
@Delete
|
@Delete
|
||||||
void deleteAll(List<PoiEntity> poiEntities);
|
void deleteAll(List<PoiEntity> poiEntities);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件删除
|
* 根据条件删除
|
||||||
*
|
|
||||||
* @param taskStatus
|
|
||||||
*/
|
*/
|
||||||
@Query("DELETE FROM poi where taskStatus=:taskStatus")
|
@Query("DELETE FROM poi where taskStatus=:taskStatus")
|
||||||
void deleteFormName(int taskStatus);
|
void deleteFormName(int taskStatus);
|
||||||
@ -84,8 +72,6 @@ public interface PoiDao {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件删除
|
* 根据条件删除
|
||||||
*
|
|
||||||
* @param taskId
|
|
||||||
*/
|
*/
|
||||||
@Query("DELETE FROM poi where taskId=:taskId")
|
@Query("DELETE FROM poi where taskId=:taskId")
|
||||||
void deleteFormTaskID(int taskId);
|
void deleteFormTaskID(int taskId);
|
||||||
@ -98,8 +84,6 @@ public interface PoiDao {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 降序排列
|
* 降序排列
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Query("SELECT * FROM poi ORDER BY ID DESC")
|
@Query("SELECT * FROM poi ORDER BY ID DESC")
|
||||||
List<PoiEntity> getAllPoiEntity();
|
List<PoiEntity> getAllPoiEntity();
|
||||||
|
@ -24,7 +24,6 @@ public class APKVersionCodeUtils {
|
|||||||
* 获取版本号名称
|
* 获取版本号名称
|
||||||
*
|
*
|
||||||
* @param context 上下文
|
* @param context 上下文
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static String getVerName(Context context) {
|
public static String getVerName(Context context) {
|
||||||
String verName = "";
|
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
|
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
||||||
android:id="@+id/iv_map"
|
android:id="@+id/iv_map"
|
||||||
android:layout_width="100dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="157dp"
|
android:layout_height="157dp"
|
||||||
app:layout_constraintHeight_default="percent"
|
app:layout_constraintHeight_default="percent"
|
||||||
app:layout_constraintHeight_percent="0.3"
|
app:layout_constraintHeight_percent="0.4"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintWidth_default="percent"
|
app:layout_constraintWidth_default="percent"
|
||||||
app:layout_constraintWidth_percent="0.3" />
|
app:layout_constraintWidth_percent="0.4" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginRight="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:text="切换"
|
android:text="切换"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/capuret_picture"
|
android:id="@+id/capture_picture"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -65,7 +65,7 @@
|
|||||||
android:background="@drawable/uploding_shape"
|
android:background="@drawable/uploding_shape"
|
||||||
android:text="结束采集"
|
android:text="结束采集"
|
||||||
android:textColor="@color/colorBlue"
|
android:textColor="@color/colorBlue"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/capuret_picture"
|
app:layout_constraintBottom_toBottomOf="@id/capture_picture"
|
||||||
app:layout_constraintLeft_toRightOf="@id/capuret_picture"
|
app:layout_constraintLeft_toRightOf="@id/capture_picture"
|
||||||
app:layout_constraintRight_toRightOf="parent" />
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -6,17 +6,27 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="270dp"
|
android:layout_width="270dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="15dp"
|
||||||
android:text="众包录像 测试3"
|
android:text="众包录像 测试3"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
android:layout_margin="20dp"
|
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/btn_delete" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_money"
|
android:id="@+id/tv_money"
|
||||||
@ -34,7 +44,7 @@
|
|||||||
android:id="@+id/tv_time"
|
android:id="@+id/tv_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="15dp"
|
||||||
android:text="到期时间:"
|
android:text="到期时间:"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
||||||
@ -70,47 +80,53 @@
|
|||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_describe">
|
app:layout_constraintTop_toBottomOf="@+id/tv_describe">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_cancel_get"
|
android:id="@+id/btn_cancel_get"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="15dp"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="取消领取" />
|
android:text="取消领取"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_get_task"
|
android:id="@+id/btn_get_task"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:visibility="visible"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="15dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="领取任务" />
|
android:text="领取任务"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_gather"
|
android:id="@+id/btn_gather"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:visibility="visible"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="15dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="立即采集" />
|
android:text="立即采集"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_finish_gather"
|
android:id="@+id/btn_finish_gather"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="15dp"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="结束采集" />
|
android:text="结束采集"
|
||||||
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -32,7 +32,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:text="01.选择情报类型"
|
android:text="@string/tv_other_type_01"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
@ -70,13 +70,14 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:background="@drawable/ic_baseline_arrow_drop"
|
android:background="@drawable/ic_baseline_arrow_drop"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -165,5 +165,6 @@
|
|||||||
地图寻宝App:作为专业众包作业工具,可作业道路、POI、充电站、公交站、门牌号等多类型任务。\n\n
|
地图寻宝App:作为专业众包作业工具,可作业道路、POI、充电站、公交站、门牌号等多类型任务。\n\n
|
||||||
地图寻宝小程序:简版众包作业工具,无需安装,可采集POI、充电站点类型任务\n\n
|
地图寻宝小程序:简版众包作业工具,无需安装,可采集POI、充电站点类型任务\n\n
|
||||||
地图寻宝小程序:微信小程序搜索-地图寻宝</string>
|
地图寻宝小程序:微信小程序搜索-地图寻宝</string>
|
||||||
|
<string name="tv_other_type_01">01.其他任务类型</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user