查看视频相册播放
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ public class HomeActivity extends BaseActivity{
|
|||||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
@@ -74,15 +73,13 @@ public class HomeActivity extends BaseActivity{
|
|||||||
fragments.add(recordFragment);
|
fragments.add(recordFragment);
|
||||||
fragments.add(new FindFragment());
|
fragments.add(new FindFragment());
|
||||||
fragments.add(new MineFragment());
|
fragments.add(new MineFragment());
|
||||||
mViewPager.setOffscreenPageLimit(3);
|
mViewPager.setOffscreenPageLimit(3);
|
||||||
|
|
||||||
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment getItem(int i) {
|
public Fragment getItem(int i) {
|
||||||
return fragments.get(i);
|
return fragments.get(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
return fragments.size();
|
return fragments.size();
|
||||||
@@ -90,9 +87,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
});
|
});
|
||||||
mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
@@ -102,9 +97,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) { }
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
mViewPager.setCanScroll(true);
|
mViewPager.setCanScroll(true);
|
||||||
mViewPager.setNoScrollAnim(false);
|
mViewPager.setNoScrollAnim(false);
|
||||||
@@ -130,16 +123,12 @@ public class HomeActivity extends BaseActivity{
|
|||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击table layout效果
|
//点击table layout效果
|
||||||
@Override
|
@Override
|
||||||
public void onTabUnselected(TabLayout.Tab tab) {
|
public void onTabUnselected(TabLayout.Tab tab) {}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTabReselected(TabLayout.Tab tab) {
|
public void onTabReselected(TabLayout.Tab tab) {}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -166,7 +155,6 @@ public class HomeActivity extends BaseActivity{
|
|||||||
if (!BackHandlerHelper.handleBackPress(this)) {
|
if (!BackHandlerHelper.handleBackPress(this)) {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
|||||||
super.initView();
|
super.initView();
|
||||||
imgUrl = getIntent().getStringArrayListExtra("info");
|
imgUrl = getIntent().getStringArrayListExtra("info");
|
||||||
type = getIntent().getIntExtra("type", 0);
|
type = getIntent().getIntExtra("type", 0);
|
||||||
|
|
||||||
Log.d("ImageShowActivity", "initData: " + imgUrl);
|
Log.d("ImageShowActivity", "initData: " + imgUrl);
|
||||||
image_pager = findViewById(R.id.image_pager);
|
image_pager = findViewById(R.id.image_pager);
|
||||||
ImageView imageShow = findViewById(R.id.iv_image_show);
|
ImageView imageShow = findViewById(R.id.iv_image_show);
|
||||||
@@ -40,7 +39,6 @@ public class ImageShowActivity extends BaseActivity implements View.OnClickListe
|
|||||||
initViewPager();
|
initViewPager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initViewPager() {
|
private void initViewPager() {
|
||||||
if (imgUrl != null && imgUrl.size() != 0) {
|
if (imgUrl != null && imgUrl.size() != 0) {
|
||||||
ImagePagerAdapter mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
ImagePagerAdapter mAdapter = new ImagePagerAdapter(getApplicationContext(), imgUrl);
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ import com.navinfo.outdoor.util.Md5Util;
|
|||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录页
|
* 登录页
|
||||||
*/
|
*/
|
||||||
@@ -272,6 +276,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
} else {//不需要升级
|
} else {//不需要升级
|
||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
@@ -185,11 +184,8 @@ public class MainActivity extends BaseActivity {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(MainActivity.this, e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
initTime();
|
initTime();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -232,7 +228,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
@@ -240,18 +235,14 @@ public class MainActivity extends BaseActivity {
|
|||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initTime() {
|
public void initTime() {
|
||||||
new CountDownTimer(3000, 1000) {
|
new CountDownTimer(3000, 1000) {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long l) {
|
public void onTick(long l) {}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
} else if (poiEntity.getType() == 4) {//道路录像
|
} else if (poiEntity.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.getLatLags(geo);
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
capturePicture.setText("开始采集");
|
capturePicture.setText("开始采集");
|
||||||
}
|
}
|
||||||
capturePicture.setChecked(false);
|
capturePicture.setChecked(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -279,7 +280,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
} else if (poiEntity.getType() == 4) {//道路录像
|
} else if (poiEntity.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.getLatLags(geo);
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
|
|||||||
@@ -8,20 +8,14 @@ import android.os.Message;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
|
||||||
import com.kongzue.dialog.v3.CustomDialog;
|
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
@@ -48,8 +42,6 @@ import com.tencent.tencentmap.mapsdk.maps.interfaces.Removable;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.CameraPosition;
|
import com.tencent.tencentmap.mapsdk.maps.model.CameraPosition;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.Circle;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.CircleOptions;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
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;
|
||||||
@@ -58,29 +50,21 @@ import com.tencent.tencentmap.mapsdk.maps.model.Polygon;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolygonOptions;
|
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.tencent.tencentmap.mapsdk.vector.utils.clustering.Cluster;
|
|
||||||
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.ClusterItem;
|
|
||||||
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.ClusterManager;
|
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.ClusterManager;
|
||||||
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.algo.NonHierarchicalDistanceBasedAlgorithm;
|
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.algo.NonHierarchicalDistanceBasedAlgorithm;
|
||||||
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.view.DefaultClusterRenderer;
|
import com.tencent.tencentmap.mapsdk.vector.utils.clustering.view.DefaultClusterRenderer;
|
||||||
import com.vividsolutions.jts.awt.PointShapeFactory;
|
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
|
||||||
import com.vividsolutions.jts.geom.MultiPoint;
|
import com.vividsolutions.jts.geom.MultiPoint;
|
||||||
import com.vividsolutions.jts.geom.Point;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
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_NO_CENTER;
|
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER;
|
||||||
|
|
||||||
public class TestActivity extends BaseActivity {
|
public class TestActivity extends BaseActivity {
|
||||||
@@ -180,7 +164,7 @@ public class TestActivity extends BaseActivity {
|
|||||||
} else if (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.getLatLags(geo);
|
||||||
// 构造 PolylineOptions
|
// 构造 PolylineOptions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)// 折线设置圆形线头
|
.addAll(latLineString)// 折线设置圆形线头
|
||||||
@@ -201,7 +185,7 @@ public class TestActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
||||||
addAll(latPolygon).//连接封闭图形的点
|
addAll(latPolygon).//连接封闭图形的点
|
||||||
fillColor(Color.parseColor("#97E0E7EC")). //填充颜色为红色
|
fillColor(Color.parseColor("#97E0E7EC")). //填充颜色为红色
|
||||||
@@ -431,7 +415,7 @@ public class TestActivity extends BaseActivity {
|
|||||||
break;
|
break;
|
||||||
case "LineString": //线
|
case "LineString": //线
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(beanGeo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(beanGeo);
|
||||||
assert latLineString != null;
|
assert latLineString != null;
|
||||||
poiListEntity.setX(latLineString.get(0).longitude + "");
|
poiListEntity.setX(latLineString.get(0).longitude + "");
|
||||||
poiListEntity.setY(latLineString.get(0).latitude + "");
|
poiListEntity.setY(latLineString.get(0).latitude + "");
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CommitPrefEdits")
|
@SuppressLint("CommitPrefEdits")
|
||||||
@@ -215,7 +214,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(UserBean response, int id) {
|
public void onSuccess(UserBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
if (response.getCode()==200) {
|
if (response.getCode()==200) {
|
||||||
MessageDialog.show(UserActivity.this, "提示","是否保存", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show(UserActivity.this, "提示","是否保存", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -304,7 +303,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
|
|
||||||
ArrayList<JsonBean> jsonBean = parseData(JsonData);//用Gson 转成实体
|
ArrayList<JsonBean> jsonBean = parseData(JsonData);//用Gson 转成实体
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 添加省份数据
|
* 添加省份数据
|
||||||
*
|
*
|
||||||
* 注意:如果是添加的JavaBean实体,则实体类需要实现 IPickerViewData 接口,
|
* 注意:如果是添加的JavaBean实体,则实体类需要实现 IPickerViewData 接口,
|
||||||
@@ -339,12 +338,12 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 添加城市数据
|
* 添加城市数据
|
||||||
*/
|
*/
|
||||||
options2Items.add(CityList);
|
options2Items.add(CityList);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* 添加地区数据
|
* 添加地区数据
|
||||||
*/
|
*/
|
||||||
options3Items.add(Province_AreaList);
|
options3Items.add(Province_AreaList);
|
||||||
@@ -352,7 +351,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<JsonBean> parseData(String result) {//Gson 解析
|
public ArrayList<JsonBean> parseData(String result) {//GOON 解析
|
||||||
ArrayList<JsonBean> detail = new ArrayList<>();
|
ArrayList<JsonBean> detail = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
JSONArray data = new JSONArray(result);
|
JSONArray data = new JSONArray(result);
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
private static 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) {
|
||||||
|
|
||||||
return super.shouldOverrideUrlLoading(view, url);
|
return super.shouldOverrideUrlLoading(view, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,7 +107,6 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
super.onPageFinished(view, url);
|
super.onPageFinished(view, url);
|
||||||
// html加载完成之后,添加监听图片的点击js函数
|
// html加载完成之后,添加监听图片的点击js函数
|
||||||
// addImageClickListener();
|
// addImageClickListener();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
@@ -121,9 +119,7 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||||
|
|
||||||
super.onReceivedError(view, errorCode, description, failingUrl);
|
super.onReceivedError(view, errorCode, description, failingUrl);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import okhttp3.MediaType;
|
import okhttp3.MediaType;
|
||||||
|
|
||||||
@@ -47,7 +48,6 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
private CapacityMeasureAdapter capacityMeasureAdapter;
|
private CapacityMeasureAdapter capacityMeasureAdapter;
|
||||||
private ArrayList<BolBean> baleen;
|
private ArrayList<BolBean> baleen;
|
||||||
private ArrayList<ExamBean> examBeans;
|
private ArrayList<ExamBean> examBeans;
|
||||||
|
|
||||||
private String examId;
|
private String examId;
|
||||||
private Gson gson;
|
private Gson gson;
|
||||||
|
|
||||||
@@ -81,13 +81,12 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
super.initData();
|
super.initData();
|
||||||
baleen = new ArrayList<>();
|
baleen = new ArrayList<>();
|
||||||
examBeans = new ArrayList<>();
|
examBeans = new ArrayList<>();
|
||||||
|
initNetWorks();
|
||||||
initNetWorks(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWorks(boolean b) {
|
private void initNetWorks() {
|
||||||
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("id", id);
|
httpParams.put("id", id);
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
@@ -100,32 +99,26 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(MeasureBean response, int id) {
|
public void onSuccess(MeasureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
|
|
||||||
//单选
|
//单选
|
||||||
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
||||||
//多选
|
//多选
|
||||||
List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice1 = response.getBody().getSingleChoice();
|
List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice1 = response.getBody().getSingleChoice();
|
||||||
|
|
||||||
if (multiChoice != null) {
|
if (multiChoice != null) {
|
||||||
for (int i = 0; i < multiChoice.size(); i++) {
|
for (int i = 0; i < multiChoice.size(); i++) {
|
||||||
baleen.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++) {
|
||||||
baleen.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 (baleen != null) {
|
if (baleen != null) {
|
||||||
capacityMeasureAdapter.setMeasureList(baleen);
|
capacityMeasureAdapter.setMeasureList(baleen);
|
||||||
}
|
}
|
||||||
|
Log.d("TAG", "onSuccess: " + response.toString() );
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -141,7 +134,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_measurement_finish:
|
case R.id.iv_measurement_finish:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.btn:
|
case R.id.btn:
|
||||||
try {
|
try {
|
||||||
@@ -165,7 +158,6 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
answerList.add(s);
|
answerList.add(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
examBean.setAnswer(answerList);
|
examBean.setAnswer(answerList);
|
||||||
examBeans.add(examBean);
|
examBeans.add(examBean);
|
||||||
}
|
}
|
||||||
@@ -186,7 +178,6 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
|
|
||||||
String json = gson.toJson(map);
|
String json = gson.toJson(map);
|
||||||
examBeans.clear();
|
examBeans.clear();
|
||||||
// Log.d("TAG", "initExamSubmit: " + jsonArray.toString());
|
|
||||||
OkGo
|
OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<ExamSubmitBean>post(HttpInterface.EXAM_SUBMIT)
|
.<ExamSubmitBean>post(HttpInterface.EXAM_SUBMIT)
|
||||||
@@ -199,7 +190,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.code()==200){
|
if (response.code()==200){
|
||||||
if (response.body().equals("0")) {
|
if (response.body().equals("0")) {
|
||||||
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(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
||||||
@@ -207,7 +198,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
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(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
||||||
@@ -218,10 +209,8 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<ExamSubmitBean> response) {
|
public void onError(Response<ExamSubmitBean> response) {
|
||||||
super.onError(response);
|
super.onError(response);
|
||||||
|
|||||||
@@ -324,12 +324,9 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
cp_floor = -5;
|
cp_floor = -5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNothingSelected(AdapterView<?> parent) {
|
public void onNothingSelected(AdapterView<?> parent) {}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
spinnerScutcheon = findViewById(R.id.spinner_scutcheon);
|
spinnerScutcheon = findViewById(R.id.spinner_scutcheon);
|
||||||
ArrayAdapter<String> adapterScutcheon = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, scutcheon);
|
ArrayAdapter<String> adapterScutcheon = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, scutcheon);
|
||||||
@@ -882,7 +879,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
obtains.what = Constant.PILE_MARKER_SHOW;
|
obtains.what = Constant.PILE_MARKER_SHOW;
|
||||||
obtains.obj = true;
|
obtains.obj = true;
|
||||||
EventBus.getDefault().post(obtains);
|
EventBus.getDefault().post(obtains);
|
||||||
// chargingPileByWork(chargingPileEntity);
|
// chargingPileByWork(chargingPileEntity);
|
||||||
getActivity().onBackPressed();
|
getActivity().onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.showShort(getActivity(), "充电桩保存失败,请重试!");
|
ToastUtil.showShort(getActivity(), "充电桩保存失败,请重试!");
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import android.widget.AdapterView;
|
|||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -87,6 +86,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private CheckBox checkBoxLife;
|
private CheckBox checkBoxLife;
|
||||||
private Spinner spinnerType;
|
private Spinner spinnerType;
|
||||||
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
String[] caye = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
|
|
||||||
private int existence = 0;
|
private int existence = 0;
|
||||||
@@ -312,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);
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, ctype);
|
ArrayAdapter<String> adapter = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, caye);
|
||||||
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() {
|
||||||
@@ -383,7 +383,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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);
|
||||||
@@ -397,7 +397,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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);
|
||||||
@@ -411,7 +411,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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);
|
||||||
@@ -425,7 +425,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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);
|
||||||
@@ -439,7 +439,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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);
|
||||||
@@ -463,7 +463,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (name != null && !name.equals("")) {
|
||||||
editNameContent.setText(name + "");
|
editNameContent.setText(name);
|
||||||
}
|
}
|
||||||
if (editNameContent.getText().toString()!=null||editNameContent!=null){
|
if (editNameContent.getText().toString()!=null||editNameContent!=null){
|
||||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@@ -566,19 +566,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
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);
|
||||||
tvNamePic.setTag(photo);
|
tvNamePic.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(ivElse);
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivElse);
|
||||||
tvElse.setTag(photo);
|
tvElse.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("e")) {
|
} else if (split[split.length - 1].startsWith("e")) {
|
||||||
Glide.with(getActivity()).load(photo).into(ivScutcheon);
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivScutcheon);
|
||||||
tvScutcheon.setTag(photo);
|
tvScutcheon.setTag(photo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -587,7 +587,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
List<ChargingPileEntity> chargingPileList = chargingPileDao.getChargingPileByStationId(showPoiEntity.getId());
|
List<ChargingPileEntity> chargingPileList = chargingPileDao.getChargingPileByStationId(showPoiEntity.getId());
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
chargingPileAdapter.setChargingPileEntities(chargingPileList);
|
chargingPileAdapter.setChargingPileEntities(chargingPileList);
|
||||||
@@ -605,7 +605,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
|
|
||||||
private void initPile() {
|
private void initPile() {
|
||||||
//根据保存时所用的name属性,获取SharedPreferences对象
|
//根据保存时所用的name属性,获取SharedPreferences对象
|
||||||
SharedPreferences dataFile = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
|
SharedPreferences dataFile = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
|
||||||
String pileFileString = dataFile.getString("chargingPileEntity", null);
|
String pileFileString = dataFile.getString("chargingPileEntity", null);
|
||||||
if (pileFileString != null) {
|
if (pileFileString != null) {
|
||||||
ChargingPileEntity chargingPileEntity = new Gson().fromJson(pileFileString, ChargingPileEntity.class);
|
ChargingPileEntity chargingPileEntity = new Gson().fromJson(pileFileString, ChargingPileEntity.class);
|
||||||
@@ -646,7 +646,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||||
if (!code.equals(Constant.CODE)){
|
if (!code.equals(Constant.CODE)){
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "此地区区号为"+code+",请手动修改", "确定","取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为"+code+",请手动修改", "确定","取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.CODE = code;
|
Constant.CODE = code;
|
||||||
@@ -680,7 +680,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
//一个以该参数命名的.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方法,以键值对的形式添加新值。
|
||||||
@@ -821,7 +821,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 5) {
|
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
initRoadSaveLocal(true);
|
initRoadSaveLocal(true);
|
||||||
@@ -830,7 +830,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
} else {
|
} else {
|
||||||
// 首先批量保存充电站对应的充电桩数据
|
// 首先批量保存充电站对应的充电桩数据
|
||||||
saveChargingPileByChargingStation(poiDaoPoiEntity);
|
saveChargingPileByChargingStation(poiDaoPoiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
stationUploadByNetWork(poiDaoPoiEntity, chargingStationList);
|
stationUploadByNetWork(poiDaoPoiEntity, chargingStationList);
|
||||||
@@ -1002,7 +1002,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@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() {
|
||||||
chargingStationSaveByWork(poiEntity, isLocal);
|
chargingStationSaveByWork(poiEntity, isLocal);
|
||||||
@@ -1021,7 +1021,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1032,6 +1032,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
setLoadingDialogText("上传中...");
|
setLoadingDialogText("上传中...");
|
||||||
if (poiEntity == null || poiEntity.getBodyId() == 0) {
|
if (poiEntity == null || poiEntity.getBodyId() == 0) {
|
||||||
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||||
|
assert poiEntity != null;
|
||||||
Log.e("TAG", "poiUploadByNetWork: " + poiEntity.getBodyId() + chargingStationList);
|
Log.e("TAG", "poiUploadByNetWork: " + poiEntity.getBodyId() + chargingStationList);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1049,7 +1050,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
HttpParams httpParams=new HttpParams();
|
HttpParams httpParams=new HttpParams();
|
||||||
@@ -1184,7 +1185,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
// 充电站数据已经保存在服务上,批量保存充电桩数据
|
// 充电站数据已经保存在服务上,批量保存充电桩数据
|
||||||
saveChargingPileByChargingStation(poiEntity);
|
saveChargingPileByChargingStation(poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
@@ -1296,7 +1297,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
//表示文件名,系统将会在/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方法,
|
||||||
@@ -1305,7 +1306,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
//以键值对的形式添加新值。
|
//以键值对的形式添加新值。
|
||||||
edit.putString("poiEntity", newPoiEntity);
|
edit.putString("poiEntity", newPoiEntity);
|
||||||
//提交新值。必须执行,否则前面的操作都无效。
|
//提交新值。必须执行,否则前面的操作都无效。
|
||||||
edit.commit();
|
edit.apply();
|
||||||
Log.d("TAG", "initPoiSharePre: " + newPoiEntity);
|
Log.d("TAG", "initPoiSharePre: " + newPoiEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1377,6 +1378,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.params(httpParams).getSynchronization();
|
.params(httpParams).getSynchronization();
|
||||||
if(execute!=null){
|
if(execute!=null){
|
||||||
|
assert execute.body() != null;
|
||||||
String responseBodyStr = execute.body().string();
|
String responseBodyStr = execute.body().string();
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ 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
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +97,7 @@ public class ContactFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_contact) {
|
if (v.getId() == R.id.iv_contact) {
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-活动专区
|
* 发现-活动专区
|
||||||
@@ -84,7 +85,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -132,7 +133,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ImageView ivEventTask = findViewById(R.id.iv_event_task);
|
ImageView ivEventTask = findViewById(R.id.iv_event_task);
|
||||||
ivEventTask.setOnClickListener(this::onClick);
|
ivEventTask.setOnClickListener(this);
|
||||||
eventRecycler = findViewById(R.id.event_recycler);
|
eventRecycler = findViewById(R.id.event_recycler);
|
||||||
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
eventRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
eventRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
@@ -167,7 +168,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_event_task) {
|
if (v.getId() == R.id.iv_event_task) {
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,12 +177,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
poiEntity.setX(latLng.longitude + "");
|
poiEntity.setX(latLng.longitude + "");
|
||||||
poiEntity.setY(latLng.latitude + "");
|
poiEntity.setY(latLng.latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
assert latLineString != null;
|
assert latLineString != null;
|
||||||
poiEntity.setX(latLineString.get(0).longitude + "");
|
poiEntity.setX(latLineString.get(0).longitude + "");
|
||||||
poiEntity.setY(latLineString.get(0).latitude + "");
|
poiEntity.setY(latLineString.get(0).latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
assert latPolygon != null;
|
assert latPolygon != null;
|
||||||
poiEntity.setX(latPolygon.get(0).longitude + "");
|
poiEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
poiEntity.setY(latPolygon.get(0).latitude + "");
|
poiEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
@@ -269,10 +269,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
recyclerFilter.setAdapter(filterAdapter);
|
recyclerFilter.setAdapter(filterAdapter);
|
||||||
recyclerFilter.setScrollAlphaChangeListener(new XRecyclerView.ScrollAlphaChangeListener() {
|
recyclerFilter.setScrollAlphaChangeListener(new XRecyclerView.ScrollAlphaChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAlphaChange(int alpha) {
|
public void onAlphaChange(int alpha) { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int setLimitHeight() {
|
public int setLimitHeight() {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ public class FindFragment extends BaseFragment implements View.OnClickListener{
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -202,7 +202,6 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
sessionId = response.getBody();
|
sessionId = response.getBody();
|
||||||
|
|
||||||
Toast.makeText(getActivity(), "验证码已发送", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "验证码已发送", Toast.LENGTH_SHORT).show();
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
|
|||||||
@@ -29,18 +29,13 @@ import com.navinfo.outdoor.room.PoiDatabase;
|
|||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.Marker;
|
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
|
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -124,13 +119,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
tvTitle.setText(poiEntity.getName());
|
tvTitle.setText(poiEntity.getName());
|
||||||
if (poiEntity.getPrecision() == null) {
|
if (poiEntity.getPrecision() == null) {
|
||||||
tvMoney.setText("¥" + 0);
|
tvMoney.setText("¥"+0);
|
||||||
} else {
|
} else {
|
||||||
tvMoney.setText("¥" + format2(Double.parseDouble(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())) {
|
||||||
tvDescribe.setText("任务描述:" + poiEntity.getDescribe());
|
tvDescribe.setText("任务描述:"+poiEntity.getDescribe());
|
||||||
}
|
}
|
||||||
if (poiEntity.getCreateTime() != null && !"".equals(poiEntity.getCreateTime())) {
|
if (poiEntity.getCreateTime() != null && !"".equals(poiEntity.getCreateTime())) {
|
||||||
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
|
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
|
||||||
@@ -151,7 +146,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存小数点后两位
|
* 保存小数点后两位
|
||||||
*
|
|
||||||
* @param value
|
* @param value
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -159,7 +153,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
df.setRoundingMode(RoundingMode.HALF_UP);
|
df.setRoundingMode(RoundingMode.HALF_UP);
|
||||||
return df.format(value);
|
return df.format(value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViewByTaskStatus(int taskStatus) {
|
private void initViewByTaskStatus(int taskStatus) {
|
||||||
@@ -354,12 +347,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
chargingStationEntity.setY(latLng.latitude + "");
|
chargingStationEntity.setY(latLng.latitude + "");
|
||||||
break;
|
break;
|
||||||
case "LineString": //线
|
case "LineString": //线
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
chargingStationEntity.setX(latLineString.get(0).longitude + "");
|
chargingStationEntity.setX(latLineString.get(0).longitude + "");
|
||||||
chargingStationEntity.setY(latLineString.get(0).latitude + "");
|
chargingStationEntity.setY(latLineString.get(0).latitude + "");
|
||||||
break;
|
break;
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
chargingStationEntity.setX(latPolygon.get(0).longitude + "");
|
chargingStationEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
chargingStationEntity.setY(latPolygon.get(0).latitude + "");
|
chargingStationEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
break;
|
break;
|
||||||
@@ -473,11 +466,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
polygonEntity.setX(latLng.longitude + "");
|
polygonEntity.setX(latLng.longitude + "");
|
||||||
polygonEntity.setY(latLng.latitude + "");
|
polygonEntity.setY(latLng.latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
polygonEntity.setX(latLineString.get(0).longitude + "");
|
polygonEntity.setX(latLineString.get(0).longitude + "");
|
||||||
polygonEntity.setY(latLineString.get(0).latitude + "");
|
polygonEntity.setY(latLineString.get(0).latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
polygonEntity.setX(latPolygon.get(0).longitude + "");
|
polygonEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
polygonEntity.setY(latPolygon.get(0).latitude + "");
|
polygonEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
@@ -722,11 +715,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setX(latLng.longitude + "");
|
poiListEntity.setX(latLng.longitude + "");
|
||||||
poiListEntity.setY(latLng.latitude + "");
|
poiListEntity.setY(latLng.latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
poiListEntity.setX(latLineString.get(0).longitude + "");
|
poiListEntity.setX(latLineString.get(0).longitude + "");
|
||||||
poiListEntity.setY(latLineString.get(0).latitude + "");
|
poiListEntity.setY(latLineString.get(0).latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
@@ -845,11 +838,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setX(latLng.longitude + "");
|
poiListEntity.setX(latLng.longitude + "");
|
||||||
poiListEntity.setY(latLng.latitude + "");
|
poiListEntity.setY(latLng.latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
poiListEntity.setX(latLineString.get(0).longitude + "");
|
poiListEntity.setX(latLineString.get(0).longitude + "");
|
||||||
poiListEntity.setY(latLineString.get(0).latitude + "");
|
poiListEntity.setY(latLineString.get(0).latitude + "");
|
||||||
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.gathering_fragment;
|
return R.layout.gathering_fragment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -110,7 +109,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.et_bank_num:
|
case R.id.et_bank_num:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case R.id.iv_bank:
|
case R.id.iv_bank:
|
||||||
String bankJson = new GetJsonDataUtil().getJson(Objects.requireNonNull(getContext()), "bank.json");//获取assets目录下的json文件数据
|
String bankJson = new GetJsonDataUtil().getJson(Objects.requireNonNull(getContext()), "bank.json");//获取assets目录下的json文件数据
|
||||||
@@ -129,7 +127,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
bankAdapter.setOnBankClick(new BankAdapter.OnBankClick() {
|
bankAdapter.setOnBankClick(new BankAdapter.OnBankClick() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(int pos) {
|
public void onClick(int pos) {
|
||||||
|
|
||||||
tvBank.setText(jsonBean.get(pos).getLabel());
|
tvBank.setText(jsonBean.get(pos).getLabel());
|
||||||
value = jsonBean.get(pos).getValue();
|
value = jsonBean.get(pos).getValue();
|
||||||
bankAdapter.notifyDataSetChanged();
|
bankAdapter.notifyDataSetChanged();
|
||||||
@@ -177,13 +174,12 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
|
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
|
|
||||||
httpParams.put("userid", Constant.USHERED);
|
httpParams.put("userid", Constant.USHERED);
|
||||||
httpParams.put("bankAccount", value);//银行id
|
httpParams.put("bankAccount", value);//银行id
|
||||||
httpParams.put("idNumber", etBankAccount);//银行卡号
|
httpParams.put("idNumber", etBankAccount);//银行卡号
|
||||||
OkGoBuilder.getInstance().Builder(getActivity())
|
OkGoBuilder.getInstance()
|
||||||
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.USER_BANKCARD_UP_DATA)
|
.url(HttpInterface.USER_BANKCARD_UP_DATA)
|
||||||
.cls(BankPhoneBean.class)
|
.cls(BankPhoneBean.class)
|
||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
@@ -244,10 +240,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), "请拍银行卡照片", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请拍银行卡照片", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||||
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||||
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
hasPage++;
|
hasPage++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import org.json.JSONObject;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
@@ -98,10 +99,10 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
super.initView();
|
super.initView();
|
||||||
ImageView ivIssueFinish = findViewById(R.id.iv_issue_finish);
|
ImageView ivIssueFinish = findViewById(R.id.iv_issue_finish);
|
||||||
XRecyclerView mainIssueRecycler = findViewById(R.id.main_issue_recycler);
|
XRecyclerView mainIssueRecycler = findViewById(R.id.main_issue_recycler);
|
||||||
ivIssueFinish.setOnClickListener(this::onClick);
|
ivIssueFinish.setOnClickListener(this);
|
||||||
mainIssueRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
mainIssueRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
//设置下划线
|
//设置下划线
|
||||||
mainIssueRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
mainIssueRecycler.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
|
||||||
mainIssueRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
mainIssueRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
mainIssueRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
mainIssueRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
//取消下拉刷新上拉加载
|
//取消下拉刷新上拉加载
|
||||||
@@ -132,7 +133,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_issue_finish:
|
case R.id.iv_issue_finish:
|
||||||
getActivity().finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
messageRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
TextView tvRoad = findViewById(R.id.tv_read);
|
TextView tvRoad = findViewById(R.id.tv_read);
|
||||||
tvRoad.setOnClickListener(this);
|
tvRoad.setOnClickListener(this);
|
||||||
messageRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
messageRecycler.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getActivity()), DividerItemDecoration.VERTICAL));
|
||||||
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
messageRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
messageRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
messageRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
//取消上拉加载,刷新功能。
|
//取消上拉加载,刷新功能。
|
||||||
|
|||||||
@@ -121,14 +121,12 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
GetPriceBean.BodyBean body = response.getBody();
|
GetPriceBean.BodyBean body = response.getBody();
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
Double userPrice = body.getUserPrice();
|
Double userPrice = body.getUserPrice();
|
||||||
tvMoney.setText(userPrice + "");
|
tvMoney.setText(userPrice+"");
|
||||||
}
|
}
|
||||||
} 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.toString());
|
||||||
|
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "tttttttt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -187,7 +185,6 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
intentContact.putExtra("tag", 21);
|
intentContact.putExtra("tag", 21);
|
||||||
startActivity(intentContact);
|
startActivity(intentContact);
|
||||||
break;
|
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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
@@ -163,7 +164,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
PoiDatabase 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<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, others);
|
||||||
adapterOthers.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
adapterOthers.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
|
||||||
spinnerOther.setAdapter(adapterOthers);
|
spinnerOther.setAdapter(adapterOthers);
|
||||||
spinnerOther.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinnerOther.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@@ -260,7 +261,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@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) {
|
||||||
ivPicture.setImageDrawable(null);
|
ivPicture.setImageDrawable(null);
|
||||||
@@ -275,7 +276,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@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) {
|
||||||
ivPictures.setImageDrawable(null);
|
ivPictures.setImageDrawable(null);
|
||||||
@@ -311,11 +312,12 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
|
|
||||||
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("")) {
|
||||||
editTaskName.setText(name + "");
|
editTaskName.setText(name);
|
||||||
}
|
}
|
||||||
String x = showPoiEntity.getX();
|
String x = showPoiEntity.getX();
|
||||||
String y = showPoiEntity.getY();
|
String y = showPoiEntity.getY();
|
||||||
@@ -345,16 +347,17 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
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(ivPicture);
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPicture);
|
||||||
tvPicture.setTag(photo);
|
tvPicture.setTag(photo);
|
||||||
} else if (split[split.length - 1].startsWith("b")) {
|
} else if (split[split.length - 1].startsWith("b")) {
|
||||||
Glide.with(getActivity()).load(photo).into(ivPictures);
|
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivPictures);
|
||||||
tvPictures.setTag(photo);
|
tvPictures.setTag(photo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断是否是已完成作业并保存成功
|
//判断是否是已完成作业并保存成功
|
||||||
|
assert showPoiEntity != null;
|
||||||
if (showPoiEntity.getTaskStatus() == 3) {
|
if (showPoiEntity.getTaskStatus() == 3) {
|
||||||
disables();
|
disables();
|
||||||
}
|
}
|
||||||
@@ -381,7 +384,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
case R.id.btn_other_uploading:
|
case R.id.btn_other_uploading:
|
||||||
otherUploadList = new ArrayList<>();
|
otherUploadList = new ArrayList<>();
|
||||||
String name = editTaskName.getText().toString().trim();//名称
|
String name = editTaskName.getText().toString().trim();//名称
|
||||||
if (name == null || name.equals("")) {
|
if (name.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入poi 名称", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入poi 名称", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -408,7 +411,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
public void run() {
|
public void run() {
|
||||||
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() {
|
||||||
initPoiSaveLocal(true);
|
initPoiSaveLocal(true);
|
||||||
@@ -416,7 +419,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
otherUploadByNet(poiDaoPoiEntity.getBodyId(), otherUploadList);
|
otherUploadByNet(poiDaoPoiEntity.getBodyId(), otherUploadList);
|
||||||
@@ -449,7 +452,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@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() {
|
||||||
otherSaveByNetWork(poiEntity, isLocal);
|
otherSaveByNetWork(poiEntity, isLocal);
|
||||||
@@ -469,7 +472,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -503,7 +506,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
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();
|
||||||
@@ -560,7 +563,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@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() {
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
@@ -720,7 +723,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||||
ArrayList<Info> arrayList = new ArrayList<>();
|
ArrayList<Info> arrayList = new ArrayList<>();
|
||||||
String name = editTaskName.getText().toString().trim();//名称
|
String name = editTaskName.getText().toString().trim();//名称
|
||||||
if (name != null && !name.equals("")) {
|
if (!name.equals("")) {
|
||||||
poiEntity.setName(name);
|
poiEntity.setName(name);
|
||||||
}
|
}
|
||||||
if (latLng != null) {
|
if (latLng != null) {
|
||||||
@@ -730,7 +733,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
poiEntity.setY(String.valueOf(latLng.latitude));
|
poiEntity.setY(String.valueOf(latLng.latitude));
|
||||||
}
|
}
|
||||||
String describe = editOtherDescribe.getText().toString().trim();
|
String describe = editOtherDescribe.getText().toString().trim();
|
||||||
if (describe != null && !describe.equals("")) {
|
if (!describe.equals("")) {
|
||||||
poiEntity.setMemo(describe);
|
poiEntity.setMemo(describe);
|
||||||
}
|
}
|
||||||
String tagPicture = (String) tvPicture.getTag();
|
String tagPicture = (String) tvPicture.getTag();
|
||||||
|
|||||||
@@ -148,12 +148,10 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
for (int i = 0; i < fileBeans.size(); i++) {
|
for (int i = 0; i < fileBeans.size(); i++) {
|
||||||
photoAdapter.deleteFile(fileBeans.get(i));
|
photoAdapter.deleteFile(fileBeans.get(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
Toast.makeText(getContext(), "请选择要删除的数据后才可以删除", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请选择要删除的数据后才可以删除", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
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) {
|
||||||
// 监听到返回按钮点击事件
|
// 监听到返回按钮点击事件
|
||||||
@@ -238,10 +238,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
tvPoiNamePic = findViewById(R.id.tv_poi_name_pic);
|
tvPoiNamePic = findViewById(R.id.tv_poi_name_pic);
|
||||||
ivInternal = findViewById(R.id.iv_internal);
|
ivInternal = findViewById(R.id.iv_internal);
|
||||||
tvInternal = findViewById(R.id.tv_internal);
|
tvInternal = findViewById(R.id.tv_internal);
|
||||||
|
|
||||||
ivCard = findViewById(R.id.iv_card);
|
ivCard = findViewById(R.id.iv_card);
|
||||||
tvCard = findViewById(R.id.tv_card);
|
tvCard = findViewById(R.id.tv_card);
|
||||||
|
|
||||||
ivElse = findViewById(R.id.iv_else);
|
ivElse = findViewById(R.id.iv_else);
|
||||||
tvElse = findViewById(R.id.tv_else);
|
tvElse = findViewById(R.id.tv_else);
|
||||||
linearContact = findViewById(R.id.linear_contact);
|
linearContact = findViewById(R.id.linear_contact);
|
||||||
@@ -276,7 +274,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNothingSelected(AdapterView<?> parent) {
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
}
|
}
|
||||||
@@ -285,8 +282,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
initShowPoi();
|
initShowPoi();
|
||||||
//拍照长按删除
|
//拍照长按删除
|
||||||
onLongDel();
|
onLongDel();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//拍照长按删除
|
//拍照长按删除
|
||||||
@@ -516,7 +511,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||||
if (!Constant.CODE.equals(code)) {
|
if (!Constant.CODE.equals(code)) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.CODE = code;
|
Constant.CODE = code;
|
||||||
@@ -587,7 +582,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
case R.id.btn_uploading:
|
case R.id.btn_uploading:
|
||||||
poiPicList = new ArrayList<>();
|
poiPicList = new ArrayList<>();
|
||||||
String name = editNameContent.getText().toString().trim();//名称
|
String name = editNameContent.getText().toString().trim();//名称
|
||||||
if (name == null || name.equals("")) {
|
if (name.equals("")) {
|
||||||
Toast.makeText(getActivity(), "请输入poi 名称", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入poi 名称", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -627,14 +622,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
public void run() {
|
public void run() {
|
||||||
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() {
|
||||||
initPoiSaveLocal(true);
|
initPoiSaveLocal(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
|
poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
|
||||||
@@ -723,7 +718,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
btnSaveLocal.setEnabled(false);
|
btnSaveLocal.setEnabled(false);
|
||||||
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -775,7 +769,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -808,7 +802,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
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();
|
||||||
@@ -866,7 +860,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@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() {
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
@@ -910,7 +904,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
//表示文件名,系统将会在/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方法,
|
||||||
@@ -919,7 +913,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
//以键值对的形式添加新值。
|
//以键值对的形式添加新值。
|
||||||
edit.putString("poiEntity", newPoiEntity);
|
edit.putString("poiEntity", newPoiEntity);
|
||||||
//提交新值。必须执行,否则前面的操作都无效。
|
//提交新值。必须执行,否则前面的操作都无效。
|
||||||
edit.commit();
|
edit.apply();
|
||||||
Log.d("TAG", "initPoiSharePre: " + newPoiEntity);
|
Log.d("TAG", "initPoiSharePre: " + newPoiEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1130,11 +1124,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||||
ArrayList<Info> infoPhoto = new ArrayList<>();
|
ArrayList<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) {
|
||||||
@@ -1144,7 +1138,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
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();
|
||||||
|
|||||||
@@ -95,9 +95,6 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
||||||
poiTaskXrv.setAdapter(poiTaskAdapter);
|
poiTaskXrv.setAdapter(poiTaskAdapter);
|
||||||
poiTaskAdapter.notifyDataSetChanged();
|
poiTaskAdapter.notifyDataSetChanged();
|
||||||
/* xrv_yodq.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
|
||||||
xrv_yodq.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +130,6 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
}else {
|
}else {
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -175,16 +171,10 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_poiTask_finish) {
|
if (v.getId() == R.id.iv_poiTask_finish) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -481,7 +481,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -577,7 +576,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -617,7 +615,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() {
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
@@ -773,7 +771,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|
||||||
if (markerPoiVideo != null) {
|
if (markerPoiVideo != null) {
|
||||||
markerPoiVideo.remove();
|
markerPoiVideo.remove();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
fragments.add(hasSubmitFragment);
|
fragments.add(hasSubmitFragment);
|
||||||
assert getFragmentManager() != null;
|
assert getFragmentManager() != null;
|
||||||
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
||||||
@NonNull
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment getItem(int position) {
|
public Fragment getItem(int position) {
|
||||||
|
|||||||
@@ -164,10 +164,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
etDesc = (EditText) findViewById(R.id.et_desc);
|
etDesc = (EditText) findViewById(R.id.et_desc);
|
||||||
fmRoadPic = findViewById(R.id.fm_road_picture);
|
fmRoadPic = findViewById(R.id.fm_road_picture);
|
||||||
btnRoadSave = (Button) findViewById(R.id.btn_road_save);
|
btnRoadSave = (Button) findViewById(R.id.btn_road_save);
|
||||||
btnRoadSave.setOnClickListener(this::onClick);
|
btnRoadSave.setOnClickListener(this);
|
||||||
rgType = (RadioGroup) findViewById(R.id.rg_type);
|
rgType = (RadioGroup) findViewById(R.id.rg_type);
|
||||||
Button roadUpload = findViewById(R.id.road_upload);
|
Button roadUpload = findViewById(R.id.road_upload);
|
||||||
roadUpload.setOnClickListener(this::onClick);
|
roadUpload.setOnClickListener(this);
|
||||||
showPictureType(1);
|
showPictureType(1);
|
||||||
/*fmRoadPic.setOnClickListener(new View.OnClickListener() {
|
/*fmRoadPic.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -189,7 +189,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@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> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
@@ -654,11 +654,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
@@ -718,10 +716,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (!roadName.equals("")) {
|
if (!roadName.equals("")) {
|
||||||
poiEntity.setName(roadName);
|
poiEntity.setName(roadName);
|
||||||
} else {
|
} else {
|
||||||
DateFormat formatters = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
||||||
Calendar calendars = Calendar.getInstance();
|
Calendar calendars = Calendar.getInstance();
|
||||||
calendars.setTimeInMillis(System.currentTimeMillis());
|
calendars.setTimeInMillis(System.currentTimeMillis());
|
||||||
String formats = formatters.format(calendars.getTime());
|
String formats = formatter.format(calendars.getTime());
|
||||||
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
||||||
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
||||||
StringBuffer sb = new StringBuffer("道路录像上报");
|
StringBuffer sb = new StringBuffer("道路录像上报");
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
SharedPreferences navInfo = getActivity().getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
SharedPreferences navInfo = Objects.requireNonNull(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();
|
||||||
ImageView ivSet = findViewById(R.id.iv_set);
|
ImageView ivSet = findViewById(R.id.iv_set);
|
||||||
ivSet.setOnClickListener(this);
|
ivSet.setOnClickListener(this);
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +149,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
newEntities.add(poiEntity);
|
newEntities.add(poiEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return newEntities;
|
return newEntities;
|
||||||
}
|
}
|
||||||
@@ -218,12 +216,9 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
setLoadingDialogText("提交中...");
|
setLoadingDialogText("提交中...");
|
||||||
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +235,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
poiEntities.add(poiEntity);
|
poiEntities.add(poiEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
|
||||||
}
|
}
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
taskExplainAdapter = new TaskExplainAdapter(explainList,getActivity());
|
taskExplainAdapter = new TaskExplainAdapter(explainList,getActivity());
|
||||||
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
||||||
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh() {
|
public void onRefresh() {
|
||||||
taskPage=1;
|
taskPage=1;
|
||||||
@@ -82,10 +83,12 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
public void onLoadMore() {
|
public void onLoadMore() {
|
||||||
initNetWork(false);
|
initNetWork(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(int pos) {
|
public void onClick(int pos) {
|
||||||
|
|
||||||
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
itemIntent.putExtra("tag", 10);
|
itemIntent.putExtra("tag", 10);
|
||||||
itemIntent.putExtra("id",pos+"");
|
itemIntent.putExtra("id",pos+"");
|
||||||
@@ -129,7 +132,6 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
|
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -152,6 +154,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
} else {
|
} else {
|
||||||
if (taskPrefectureBean.getBody().getList() == null) {
|
if (taskPrefectureBean.getBody().getList() == null) {
|
||||||
taskExplainRecycle.setNoMore(true);
|
taskExplainRecycle.setNoMore(true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
taskExplainAdapter.notifyDataSetChanged();
|
taskExplainAdapter.notifyDataSetChanged();
|
||||||
|
|||||||
@@ -139,10 +139,8 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
if (v.getId() == R.id.iv_task_explain2_finish) {
|
||||||
case R.id.iv_task_explain2_finish:
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
getActivity().finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,6 @@ import com.lzy.okgo.OkGo;
|
|||||||
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.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.activity.TestActivity;
|
|
||||||
import com.navinfo.outdoor.adapter.MarkerAdapter;
|
import com.navinfo.outdoor.adapter.MarkerAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
@@ -190,13 +189,16 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
int messageTypeSpInt = messageTypeSp.getInt("messageType", 0);
|
int messageTypeSpInt = messageTypeSp.getInt("messageType", 0);
|
||||||
try {
|
try {
|
||||||
Date parse = formatter.parse(format);
|
Date parse = formatter.parse(format);
|
||||||
Date parse1 = formatter.parse(dataTime);
|
if (dataTime!=null){
|
||||||
if (parse.getTime() + parse1.getTime() >= 1) {
|
Date parse1 = formatter.parse(dataTime);
|
||||||
initMessageNotice();
|
if (parse.getTime() + parse1.getTime() >= 1) {
|
||||||
Log.d("TAG", "refreshFilterData: " + parse + "和" + parse1);
|
initMessageNotice();
|
||||||
} else {
|
Log.d("TAG", "refreshFilterData: " + parse + "和" + parse1);
|
||||||
return;
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -562,7 +564,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else if (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.getLatLags(geo);
|
||||||
// 构造 PolylineOptions
|
// 构造 PolylineOptions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
@@ -588,7 +590,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
||||||
//连接封闭图形的点
|
//连接封闭图形的点
|
||||||
addAll(latPolygon).
|
addAll(latPolygon).
|
||||||
@@ -763,7 +765,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else if (poiEntity.getType() == 4) {//道路录像
|
} else if (poiEntity.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.getLatLags(geo);
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.addAll(latLineString)
|
.addAll(latLineString)
|
||||||
@@ -785,7 +787,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
||||||
//连接封闭图形的点
|
//连接封闭图形的点
|
||||||
addAll(latPolygon).
|
addAll(latPolygon).
|
||||||
@@ -887,7 +889,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
} else if (type == 4) {//道路录像
|
} else if (type == 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.getLatLags(geo);
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions = new PolylineOptions()
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
.alpha(0.5f)
|
.alpha(0.5f)
|
||||||
@@ -909,16 +911,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
List<LatLng> latPolygon = GeometryTools.getLatLags(geo);
|
||||||
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().//连接封闭图形的点
|
||||||
//连接封闭图形的点
|
addAll(latPolygon).//填充颜色为浅蓝色
|
||||||
addAll(latPolygon).
|
fillColor(Color.parseColor("#97E0E7EC")).//边线颜色为黑色
|
||||||
//填充颜色为浅蓝色
|
strokeColor(0xff00ff00).//边线宽度15像素
|
||||||
fillColor(Color.parseColor("#97E0E7EC")).
|
strokeWidth(5));
|
||||||
//边线颜色为黑色
|
|
||||||
strokeColor(0xff00ff00).
|
|
||||||
//边线宽度15像素
|
|
||||||
strokeWidth(5));
|
|
||||||
polygon.setZIndex(MARKER_FACE);
|
polygon.setZIndex(MARKER_FACE);
|
||||||
removablesLocality.add(polygon);
|
removablesLocality.add(polygon);
|
||||||
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
|
||||||
@@ -1675,7 +1673,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (intersection == null) {
|
if (intersection == null) {
|
||||||
initEntity(marker, true);
|
initEntity(marker, true);
|
||||||
} else {
|
} else {
|
||||||
if (intersection.getGeometryType().equals("MultiPoint")) {
|
initEntity(marker, true);
|
||||||
|
/*if (intersection.getGeometryType().equals("MultiPoint")) {
|
||||||
List<LatLng> latList = GeometryTools.getLatList(intersection);
|
List<LatLng> latList = GeometryTools.getLatList(intersection);
|
||||||
for (int i = 0; i < latList.size(); i++) {
|
for (int i = 0; i < latList.size(); i++) {
|
||||||
LatLng latL = latList.get(i);
|
LatLng latL = latList.get(i);
|
||||||
@@ -1691,7 +1690,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
customDialog(poiEntityArrayList, marker);
|
customDialog(poiEntityArrayList, marker);
|
||||||
} else {
|
} else {
|
||||||
initEntity(marker, true);
|
initEntity(marker, true);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1795,7 +1794,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case "LineString": //线
|
case "LineString": //线
|
||||||
case "Polygon": //面
|
case "Polygon": //面
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
assert latLineString != null;
|
assert latLineString != null;
|
||||||
poiListEntity.setX(latLineString.get(0).longitude + "");
|
poiListEntity.setX(latLineString.get(0).longitude + "");
|
||||||
poiListEntity.setY(latLineString.get(0).latitude + "");
|
poiListEntity.setY(latLineString.get(0).latitude + "");
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
PoiEntity showPoiEntity = (PoiEntity) Objects.requireNonNull(getActivity()).getIntent().getSerializableExtra("showPoiEntity");
|
PoiEntity showPoiEntity = (PoiEntity) Objects.requireNonNull(getActivity()).getIntent().getSerializableExtra("showPoiEntity");
|
||||||
deleteFiles = new ArrayList<>();
|
deleteFiles = new ArrayList<>();
|
||||||
ArrayList<File> textFile = new ArrayList<>();
|
ArrayList<File> textFile = new ArrayList<>();
|
||||||
|
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
String id = showPoiEntity.getId();
|
String id = showPoiEntity.getId();
|
||||||
if (showPoiEntity.getRecord_way() == 1) {
|
if (showPoiEntity.getRecord_way() == 1) {
|
||||||
@@ -143,8 +142,6 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
Toast.makeText(getContext(), "请选择要删除的数据后才可以删除", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请选择要删除的数据后才可以删除", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,12 +76,12 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
tvAlready = findViewById(R.id.tv_already);//已提现
|
tvAlready = findViewById(R.id.tv_already);//已提现
|
||||||
tvTotal = findViewById(R.id.tv_total);//总资产
|
tvTotal = findViewById(R.id.tv_total);//总资产
|
||||||
TextView tvAll = findViewById(R.id.tv_all);
|
TextView tvAll = findViewById(R.id.tv_all);
|
||||||
tvAll.setOnClickListener(this::onClick);
|
tvAll.setOnClickListener(this);
|
||||||
etAllPrice = findViewById(R.id.et_allPrice);
|
etAllPrice = findViewById(R.id.et_allPrice);
|
||||||
ImageView ivWithDraw = findViewById(R.id.iv_withdraw);
|
ImageView ivWithDraw = findViewById(R.id.iv_withdraw);
|
||||||
ivWithDraw.setOnClickListener(this);
|
ivWithDraw.setOnClickListener(this);
|
||||||
TextView tvText = findViewById(R.id.tv_text);
|
TextView tvText = findViewById(R.id.tv_text);
|
||||||
tvText.setOnClickListener(this::onClick);
|
tvText.setOnClickListener(this);
|
||||||
checkBox = findViewById(R.id.checkBox);
|
checkBox = findViewById(R.id.checkBox);
|
||||||
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -97,7 +97,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
Button btWithdraw = findViewById(R.id.button);
|
Button btWithdraw = findViewById(R.id.button);
|
||||||
btWithdraw.setOnClickListener(this::onClick);
|
btWithdraw.setOnClickListener(this);
|
||||||
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);
|
||||||
poiVideoPushMoney = (TextView) findViewById(R.id.poiVideo_push_money);
|
poiVideoPushMoney = (TextView) findViewById(R.id.poiVideo_push_money);
|
||||||
@@ -108,9 +108,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
chargingReportMoney = (TextView) findViewById(R.id.charging_report_money);
|
chargingReportMoney = (TextView) findViewById(R.id.charging_report_money);
|
||||||
otherPushMoney = (TextView) findViewById(R.id.other_push_money);
|
otherPushMoney = (TextView) findViewById(R.id.other_push_money);
|
||||||
otherReportMoney = (TextView) findViewById(R.id.other_report_money);
|
otherReportMoney = (TextView) findViewById(R.id.other_report_money);
|
||||||
|
|
||||||
initNetWork();
|
initNetWork();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWork() {
|
private void initNetWork() {
|
||||||
@@ -128,8 +126,8 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
// Toast.makeText(getContext(), "获取成功", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "获取成功", Toast.LENGTH_SHORT).show();
|
||||||
if (response.getCode()==200){
|
if (response.getCode()==200){
|
||||||
Double userPrice = response.getBody().getUserPrice();
|
Double userPrice = response.getBody().getUserPrice();
|
||||||
canExchangePrice = response.getBody().getCanExchangePrice();
|
|
||||||
tvTotal.setText(userPrice + "");
|
tvTotal.setText(userPrice + "");
|
||||||
|
canExchangePrice = response.getBody().getCanExchangePrice();
|
||||||
tvUnit.setText(canExchangePrice + "");
|
tvUnit.setText(canExchangePrice + "");
|
||||||
tvAlready.setText(response.getBody().getHaveExchangePrice() + "");
|
tvAlready.setText(response.getBody().getHaveExchangePrice() + "");
|
||||||
poiPushMoney.setText(response.getBody().getPoiPushPrice() + "元");
|
poiPushMoney.setText(response.getBody().getPoiPushPrice() + "元");
|
||||||
@@ -145,8 +143,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}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.toString());
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "tttttttt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -170,7 +167,6 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
intentText.putExtra("tag", 26);
|
intentText.putExtra("tag", 26);
|
||||||
startActivity(intentText);
|
startActivity(intentText);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.button:
|
case R.id.button:
|
||||||
String price = etAllPrice.getText().toString().trim();
|
String price = etAllPrice.getText().toString().trim();
|
||||||
if (!price.equals("")){
|
if (!price.equals("")){
|
||||||
@@ -183,7 +179,6 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Toast.makeText(getActivity(), "提现金额不能为空", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "提现金额不能为空", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkBox.isChecked()) {
|
if (!checkBox.isChecked()) {
|
||||||
Toast.makeText(getActivity(), "请勾选银行卡", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请勾选银行卡", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@@ -201,8 +196,6 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Toast.makeText(getActivity(), "请先绑定银行卡", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先绑定银行卡", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case R.id.tv_all:
|
case R.id.tv_all:
|
||||||
etAllPrice.setText(canExchangePrice + "");
|
etAllPrice.setText(canExchangePrice + "");
|
||||||
@@ -214,7 +207,6 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
setLoadingDialogText("提现中...");
|
setLoadingDialogText("提现中...");
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
|
|
||||||
httpParams.put("exchangeMoney", etAllPrice.getText().toString());
|
httpParams.put("exchangeMoney", etAllPrice.getText().toString());
|
||||||
httpParams.put("payType", "1");
|
httpParams.put("payType", "1");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
@@ -239,7 +231,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
etAllPrice.getText().clear();
|
etAllPrice.getText().clear();
|
||||||
|
|
||||||
Log.d("TAG", "onSuccess: " + response.toString() + "tttttttt");
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
rxlWithdraw.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
rxlWithdraw.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
//取消上拉加载,刷新功能。
|
//取消上拉加载,刷新功能。
|
||||||
// taskRecycler.setPullRefreshEnabled(false);
|
// taskRecycler.setPullRefreshEnabled(false);
|
||||||
// taskRecycler.setLoadingMoreEnabled(false);
|
// taskRecycler.setLoadingMoreEnabled(false);
|
||||||
withdrawalAdapter = new WithdrawalAdapter(getContext());
|
withdrawalAdapter = new WithdrawalAdapter(getContext());
|
||||||
rxlWithdraw.setAdapter(withdrawalAdapter);
|
rxlWithdraw.setAdapter(withdrawalAdapter);
|
||||||
rxlWithdraw.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
rxlWithdraw.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ public class Geohash {
|
|||||||
|
|
||||||
private Geohash(){}
|
private Geohash(){}
|
||||||
|
|
||||||
private static class GeohashInstance{
|
private static class GeorasInstance {
|
||||||
private static final Geohash INSTANCE = new Geohash();
|
private static final Geohash INSTANCE = new Geohash();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Geohash getInstance(){
|
public static Geohash getInstance(){
|
||||||
return GeohashInstance.INSTANCE;
|
return GeorasInstance.INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int numbits = 6 * 5;
|
private static int nubbins = 6 * 5;
|
||||||
/*
|
/*
|
||||||
* final static char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7',
|
* final static char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7',
|
||||||
* '8', '9', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p',
|
* '8', '9', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p',
|
||||||
@@ -153,8 +153,8 @@ public class Geohash {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private BitSet getBits(double lat, double floor, double ceiling) {
|
private BitSet getBits(double lat, double floor, double ceiling) {
|
||||||
BitSet buffer = new BitSet(numbits);
|
BitSet buffer = new BitSet(nubbins);
|
||||||
for (int i = 0; i < numbits; i++) {
|
for (int i = 0; i < nubbins; i++) {
|
||||||
double mid = (floor + ceiling) / 2;
|
double mid = (floor + ceiling) / 2;
|
||||||
if (lat >= mid) {
|
if (lat >= mid) {
|
||||||
buffer.set(i);
|
buffer.set(i);
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,7 +62,6 @@ public class GeometryTools {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回点几何
|
* 返回点几何
|
||||||
*
|
|
||||||
* @param gp
|
* @param gp
|
||||||
* @param formatDouble5
|
* @param formatDouble5
|
||||||
* @return Geometry
|
* @return Geometry
|
||||||
@@ -115,7 +112,7 @@ public class GeometryTools {
|
|||||||
multiPolygon = factory.createMultiPolygon(polygons);
|
multiPolygon = factory.createMultiPolygon(polygons);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return multiPolygon;
|
return multiPolygon;
|
||||||
@@ -138,7 +135,7 @@ public class GeometryTools {
|
|||||||
multiLineString = factory.createMultiLineString(lineStrings);
|
multiLineString = factory.createMultiLineString(lineStrings);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return multiLineString;
|
return multiLineString;
|
||||||
@@ -164,7 +161,7 @@ public class GeometryTools {
|
|||||||
createMultiPoint = factory.createMultiPoint(coords);
|
createMultiPoint = factory.createMultiPoint(coords);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return createMultiPoint;
|
return createMultiPoint;
|
||||||
@@ -387,7 +384,7 @@ public class GeometryTools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static LatLng getLineStringCenter(String lineString) {
|
public static LatLng getLineStringCenter(String lineString) {
|
||||||
List<LatLng> points = getLatLngs(lineString);
|
List<LatLng> points = getLatLags(lineString);
|
||||||
return getLineStringCenter(points);
|
return getLineStringCenter(points);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,7 +535,7 @@ public class GeometryTools {
|
|||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static List<LatLng> getLatLngs(String str) {
|
public static List<LatLng> getLatLags(String str) {
|
||||||
if (isEmpty(str))
|
if (isEmpty(str))
|
||||||
return null;
|
return null;
|
||||||
List<LatLng> list = null;
|
List<LatLng> list = null;
|
||||||
@@ -621,7 +618,7 @@ public class GeometryTools {
|
|||||||
* @param list
|
* @param list
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static LineString getLineStrinGeo(List<LatLng> list) {
|
public static LineString getLineStainGeo(List<LatLng> list) {
|
||||||
|
|
||||||
if (list != null && list.size() > 1) {
|
if (list != null && list.size() > 1) {
|
||||||
int size = list.size();
|
int size = list.size();
|
||||||
@@ -659,7 +656,7 @@ public class GeometryTools {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static Polygon getPolygonEnvelope(List<LatLng> list) {
|
public static Polygon getPolygonEnvelope(List<LatLng> list) {
|
||||||
LineString lineString = getLineStrinGeo(list);
|
LineString lineString = getLineStainGeo(list);
|
||||||
if (lineString != null) {
|
if (lineString != null) {
|
||||||
Geometry geometry = lineString.getEnvelope();
|
Geometry geometry = lineString.getEnvelope();
|
||||||
if (geometry != null && geometry.getGeometryType().equals("Polygon")) {
|
if (geometry != null && geometry.getGeometryType().equals("Polygon")) {
|
||||||
@@ -845,7 +842,6 @@ public class GeometryTools {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -862,7 +858,6 @@ public class GeometryTools {
|
|||||||
|
|
||||||
if (isEmpty(lineString) ||isEmpty(point))
|
if (isEmpty(lineString) ||isEmpty(point))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Geometry lineGeo = createGeometry(lineString);
|
Geometry lineGeo = createGeometry(lineString);
|
||||||
|
|
||||||
Geometry pGeo = createGeometry(point);
|
Geometry pGeo = createGeometry(point);
|
||||||
@@ -885,7 +880,6 @@ public class GeometryTools {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断捕捉集合中是否包含传入的点位信息
|
* 判断捕捉集合中是否包含传入的点位信息
|
||||||
*
|
|
||||||
* @param geoList
|
* @param geoList
|
||||||
* @return int;
|
* @return int;
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
app:cameraVideoSizeMinHeight="1080"
|
app:cameraVideoSizeMinHeight="1080"
|
||||||
app:cameraVideoSizeMaxWidth="1920"
|
app:cameraVideoSizeMaxWidth="1920"
|
||||||
app:cameraVideoSizeMinWidth="1080"
|
app:cameraVideoSizeMinWidth="1080"
|
||||||
|
app:cameraPictureSizeAspectRatio="1920:1080"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:keepScreenOn="true"
|
android:keepScreenOn="true"
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
style="@style/user_style"
|
style="@style/user_style"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="点击录像"
|
android:text="点击录像"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
@@ -162,8 +162,9 @@
|
|||||||
style="@style/user_style"
|
style="@style/user_style"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
android:text="点击查看成果"
|
android:text="点击查看成果"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
@@ -183,7 +184,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="长按录像可删除"
|
android:text="长按录像可删除"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginStart="10dp"
|
||||||
/>
|
/>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_road_picture"
|
android:id="@+id/iv_road_picture"
|
||||||
@@ -209,7 +210,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:text="04.描述"
|
android:text="04.描述"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
@@ -237,7 +238,7 @@
|
|||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:hint="任务描述"
|
android:hint="任务描述"
|
||||||
android:paddingLeft="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="30dp"
|
android:paddingBottom="30dp"
|
||||||
android:textColor="@color/test_color_selector"
|
android:textColor="@color/test_color_selector"
|
||||||
|
|||||||
@@ -140,37 +140,33 @@
|
|||||||
android:id="@+id/ll_pictures"
|
android:id="@+id/ll_pictures"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/ll_mode"
|
app:layout_constraintLeft_toLeftOf="@id/ll_mode"
|
||||||
app:layout_constraintTop_toBottomOf="@id/ll_mode">
|
app:layout_constraintTop_toBottomOf="@id/ll_mode">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="03.录像 "
|
android:text="03.录像"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_picture"
|
android:id="@+id/tv_picture"
|
||||||
style="@style/user_style"
|
style="@style/user_style"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="点击录像"
|
android:text="点击录像"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_pictures"
|
android:id="@+id/tv_pictures"
|
||||||
style="@style/user_style"
|
style="@style/user_style"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="点击拍照"
|
android:text="点击拍照"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
@@ -178,15 +174,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_photo_album"
|
android:id="@+id/tv_photo_album"
|
||||||
style="@style/user_style"
|
style="@style/user_style"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="点击查看成果"
|
android:text="点击查看成果"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
@@ -201,8 +196,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="长按图片或者录像可删除"
|
android:text="长按图片或者录像可删除"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_marginLeft="10dp"/>
|
android:layout_marginStart="10dp"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_poi_video_picture"
|
android:id="@+id/iv_poi_video_picture"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -239,9 +233,9 @@
|
|||||||
android:id="@+id/tv_exist"
|
android:id="@+id/tv_exist"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="18dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:text="是否存在*"
|
android:text="是否存在*"
|
||||||
@@ -252,10 +246,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="18dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_toEndOf="@id/tv_exist"
|
android:layout_toEndOf="@id/tv_exist"
|
||||||
android:layout_toRightOf="@id/tv_exist"
|
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:textColor="#333"
|
android:textColor="#333"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
@@ -271,7 +264,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:text="04.描述"
|
android:text="04.描述"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
@@ -299,13 +292,11 @@
|
|||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:hint="任务描述"
|
android:hint="任务描述"
|
||||||
android:paddingLeft="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="30dp"
|
android:paddingBottom="30dp"
|
||||||
android:textColor="@color/test_color_selector"
|
android:textColor="@color/test_color_selector"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user