Merge branch 'secondaryExploit' of gitee.com:navinfo-out-door/navinfo-out-door-data-collect into secondaryExploit
This commit is contained in:
commit
7dd98af97d
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
//ndkVersion '23.0.7123448'
|
||||
ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -47,6 +47,7 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.WhiteScreen"
|
||||
tools:targetApi="n">
|
||||
<activity android:name=".activity.PhotoAlbumActivity"></activity>
|
||||
<activity android:name=".activity.LinkActivity" />
|
||||
<activity android:name=".activity.RegardMapActivity" />
|
||||
<activity android:name=".activity.StatementActivity" />
|
||||
|
@ -0,0 +1,78 @@
|
||||
package com.navinfo.outdoor.activity;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.PhotoAlbumAdapter;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class PhotoAlbumActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private android.widget.ImageView ivPhotoFinal;
|
||||
private android.widget.TextView tvPhotoAlbumDelete,tvPhotoChoose;
|
||||
private com.jcodecraeer.xrecyclerview.XRecyclerView photoAlbumRecycler;
|
||||
private PhotoAlbumAdapter photoAlbumAdapter;
|
||||
private List<File> fileListByUUID;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_photo_album;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
PoiEntity showPoiEntity = (PoiEntity) getIntent().getSerializableExtra("showPoiEntity");
|
||||
if (showPoiEntity!=null){
|
||||
String id = showPoiEntity.getId();
|
||||
if (showPoiEntity.getRecord_way()==1){
|
||||
fileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(id);
|
||||
}else if (showPoiEntity.getRecord_way()==2){
|
||||
fileListByUUID=AWMp4ParserHelper.getInstance().getJPGFileListByUUID(id);
|
||||
|
||||
}
|
||||
}
|
||||
ivPhotoFinal = (ImageView) findViewById(R.id.iv_photo_final);
|
||||
ivPhotoFinal.setOnClickListener(this::onClick);
|
||||
tvPhotoChoose = (TextView) findViewById(R.id.tv_photo_choose);
|
||||
tvPhotoChoose.setOnClickListener(this::onClick);
|
||||
tvPhotoAlbumDelete = (TextView) findViewById(R.id.tv_photo_album_delete);
|
||||
tvPhotoAlbumDelete.setOnClickListener(this::onClick);
|
||||
photoAlbumRecycler = (XRecyclerView) findViewById(R.id.photo_album_recycler);
|
||||
photoAlbumRecycler.setLayoutManager(new GridLayoutManager(this,4));
|
||||
photoAlbumAdapter = new PhotoAlbumAdapter(fileListByUUID,this);
|
||||
photoAlbumRecycler.setAdapter(photoAlbumAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_photo_final:
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_photo_album_delete:
|
||||
//photoAlbumAdapter.setDeletePhoto();
|
||||
break;
|
||||
|
||||
case R.id.tv_photo_choose:
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -158,13 +158,13 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
ivZoomAdd.setOnClickListener(this);
|
||||
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
||||
ivZoomDel.setOnClickListener(this);
|
||||
cbMapType = findViewById(R.id.cb_map_type);
|
||||
cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
}
|
||||
});
|
||||
// cbMapType = findViewById(R.id.cb_map_type);
|
||||
// cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
// @Override
|
||||
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
// }
|
||||
// });
|
||||
ivLocation = findViewById(R.id.iv_location);
|
||||
ivLocation.setOnClickListener(this);
|
||||
layerChange = findViewById(R.id.layer_change);
|
||||
@ -627,10 +627,9 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
isMapSlide = false;
|
||||
ivZoomAdd.setVisibility(View.GONE);
|
||||
ivZoomDel.setVisibility(View.GONE);
|
||||
cbMapType.setVisibility(View.GONE);
|
||||
ivLocation.setVisibility(View.GONE);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
cbMapType.setChecked(false);
|
||||
|
||||
}
|
||||
|
||||
//大图
|
||||
@ -638,7 +637,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
isMapSlide = true;
|
||||
ivZoomAdd.setVisibility(View.VISIBLE);
|
||||
ivZoomDel.setVisibility(View.VISIBLE);
|
||||
cbMapType.setVisibility(View.VISIBLE);
|
||||
ivLocation.setVisibility(View.VISIBLE);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
|
||||
|
@ -137,13 +137,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
ivZoomAdd.setOnClickListener(this);
|
||||
ivZoomDel =findViewById(R.id.iv_zoom_del);
|
||||
ivZoomDel.setOnClickListener(this);
|
||||
cbMapType =findViewById(R.id.cb_map_type);
|
||||
cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
}
|
||||
});
|
||||
// cbMapType =findViewById(R.id.cb_map_type);
|
||||
// cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
// @Override
|
||||
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
// }
|
||||
// });
|
||||
ivLocation =findViewById(R.id.iv_location);
|
||||
ivLocation.setOnClickListener(this);
|
||||
camera =findViewById(R.id.camera);
|
||||
@ -416,10 +416,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
isMapSlide = false;
|
||||
ivZoomAdd.setVisibility(View.GONE);
|
||||
ivZoomDel.setVisibility(View.GONE);
|
||||
cbMapType.setVisibility(View.GONE);
|
||||
|
||||
ivLocation.setVisibility(View.GONE);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
cbMapType.setChecked(false);
|
||||
|
||||
}
|
||||
|
||||
//大图
|
||||
@ -427,7 +427,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
isMapSlide = true;
|
||||
ivZoomAdd.setVisibility(View.VISIBLE);
|
||||
ivZoomDel.setVisibility(View.VISIBLE);
|
||||
cbMapType.setVisibility(View.VISIBLE);
|
||||
ivLocation.setVisibility(View.VISIBLE);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@ -37,13 +38,17 @@ public class RegardMapActivity extends BaseActivity implements View.OnClickLis
|
||||
finish();
|
||||
break;
|
||||
case R.id.tv_map_link:
|
||||
Intent linkIntent = new Intent(this, LinkActivity.class);
|
||||
linkIntent.putExtra("url","http://www.navinfo.com");
|
||||
startActivity(linkIntent);
|
||||
Uri uri = Uri.parse("http://www.navinfo.com");
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("android.intent.action.VIEW");
|
||||
intent.setData(uri);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case R.id.tv_official_link:
|
||||
Intent officialIntent = new Intent(this, LinkActivity.class);
|
||||
officialIntent.putExtra("url","https://dtxbmaps.navinfo.com/user");
|
||||
Uri officialUri = Uri.parse("https://dtxbmaps.navinfo.com/user");
|
||||
Intent officialIntent = new Intent();
|
||||
officialIntent.setAction("android.intent.action.VIEW");
|
||||
officialIntent.setData(officialUri);
|
||||
startActivity(officialIntent);
|
||||
break;
|
||||
}
|
||||
|
@ -40,7 +40,12 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.tvCapacity.setText(capacityList.get(position).getTitle());
|
||||
holder.tvResults.setText((Integer) capacityList.get(position).getStatus());
|
||||
if (capacityList.get(position).getStatus()!=null){
|
||||
holder.tvResults.setText((Integer) capacityList.get(position).getStatus());
|
||||
}else {
|
||||
holder.tvResults.setText("");
|
||||
}
|
||||
|
||||
Glide.with(context).load(capacityList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -0,0 +1,117 @@
|
||||
package com.navinfo.outdoor.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查看拍照成果的activity
|
||||
*/
|
||||
|
||||
public class PhotoAlbumAdapter extends RecyclerView.Adapter<PhotoAlbumAdapter.ViewHolder> {
|
||||
private List<File> files ;
|
||||
private Context context;
|
||||
|
||||
public PhotoAlbumAdapter(List<File> files, Context context) {
|
||||
this.files = files;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Handler handler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(@NonNull @NotNull Message msg) {
|
||||
super.handleMessage(msg);
|
||||
switch (msg.what) {
|
||||
case 0x107:
|
||||
notifyDataSetChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@NonNull
|
||||
@NotNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
|
||||
View inflate = LayoutInflater.from(context).inflate(R.layout.photo_album_item, parent, false);
|
||||
return new ViewHolder(inflate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull @NotNull ViewHolder holder, int position) {
|
||||
File file= files.get(position);
|
||||
if (file.exists()) {
|
||||
AWMp4ParserHelper.getInstance().loadFirstWithGlide(context, Uri.fromFile(file).toString(), holder.ivPhoto, 500);
|
||||
}
|
||||
|
||||
//点击每个条目
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (photoClickItem != null) {
|
||||
photoClickItem.item(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
holder.cbPhoto.setVisibility(View.VISIBLE);
|
||||
holder.cbPhoto.setChecked(true);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return files.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView ivPhoto;
|
||||
private CheckBox cbPhoto;
|
||||
|
||||
public ViewHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
ivPhoto = itemView.findViewById(R.id.iv_photo_album);
|
||||
cbPhoto = itemView.findViewById(R.id.cb_photo_album);
|
||||
}
|
||||
}
|
||||
|
||||
public photoClickItem photoClickItem;
|
||||
|
||||
public void setPhotoClickItem(photoClickItem photoClickItem) {
|
||||
this.photoClickItem = photoClickItem;
|
||||
}
|
||||
|
||||
public interface photoClickItem {
|
||||
void item(int aInt);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -41,6 +41,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//全选
|
||||
public void setAllDataChecked(boolean isChecked) {
|
||||
for (PoiEntity entity : this.allRoad) {
|
||||
entity.setChecked(isChecked);
|
||||
|
@ -11,6 +11,8 @@ import android.util.DisplayMetrics;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -19,6 +21,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.api.UserApplication;
|
||||
|
@ -6,6 +6,7 @@ import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@ -35,11 +36,16 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
protected void initData() {
|
||||
tencentMap = MapManager.getInstance().getTencentMap();
|
||||
super.initData();
|
||||
int mockGps = Constant.currentLocation.isMockGps();
|
||||
//1为是,0为否,-1为无法判断
|
||||
if (mockGps == 1) {
|
||||
onBackPressed();
|
||||
if (Constant.currentLocation!=null){
|
||||
int mockGps = Constant.currentLocation.isMockGps();
|
||||
//1为是,0为否,-1为无法判断
|
||||
if (mockGps == 1) {
|
||||
onBackPressed();
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "未开启定位服务", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
// else {
|
||||
// new GPSUtils(getActivity());
|
||||
// }
|
||||
|
@ -42,6 +42,7 @@ import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.activity.PhotoAlbumActivity;
|
||||
import com.navinfo.outdoor.activity.PictureActivity;
|
||||
import com.navinfo.outdoor.activity.PicturesActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -93,6 +94,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
private Marker markerPoiVideo;
|
||||
private TextView tvPicture;
|
||||
private int isRequest;
|
||||
private TextView tvPhotoAlbum;
|
||||
|
||||
public static PoiVideoFragment newInstance(Bundle bundle) {
|
||||
PoiVideoFragment fragment = new PoiVideoFragment();
|
||||
@ -175,6 +177,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
rbBicycle =findViewById(R.id.rb_bicycle);
|
||||
rbWalking =findViewById(R.id.rb_walking);
|
||||
rbManual = findViewById(R.id.rb_manual);
|
||||
tvPhotoAlbum = findViewById(R.id.tv_photo_album);
|
||||
tvPhotoAlbum.setOnClickListener(this::onClick);
|
||||
rgType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
@ -201,7 +205,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
List<File> videoFileListByUUID = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(showPoiEntity.getId());
|
||||
for (int i = 0; i < videoFileListByUUID.size(); i++) {
|
||||
videoFileListByUUID.get(i).delete();
|
||||
|
||||
}
|
||||
ivPoiVideoPicture.setImageDrawable(null);
|
||||
return false;
|
||||
@ -409,6 +412,17 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case R.id.tv_photo_album:
|
||||
if (tvPicture.isEnabled()){
|
||||
showPoiEntity.setRecord_way(1);
|
||||
}
|
||||
if (tvPictures.isEnabled()){
|
||||
showPoiEntity.setRecord_way(2);
|
||||
}
|
||||
Intent photoAlbumIntent = new Intent(getActivity(), PhotoAlbumActivity.class);
|
||||
photoAlbumIntent.putExtra("showPoiEntity",showPoiEntity);
|
||||
startActivity(photoAlbumIntent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
private List<PoiEntity> roadEntities;
|
||||
private ArrayList<PoiEntity> newEntities;
|
||||
private ArrayList<PoiEntity> poiEntities;
|
||||
private CheckBox cbSelect;
|
||||
|
||||
|
||||
public static StaySubmitFragment newInstance(Bundle bundle) {
|
||||
@ -84,7 +85,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
||||
clStayType.setOnClickListener(this);
|
||||
RecyclerView stayXrv =findViewById(R.id.stay_xrv);
|
||||
CheckBox cbSelect =findViewById(R.id.cb_select);
|
||||
cbSelect = findViewById(R.id.cb_select);
|
||||
cbSelect.setOnClickListener(this);
|
||||
TextView tvDelete =findViewById(R.id.tv_delete);
|
||||
tvDelete.setOnClickListener(this);
|
||||
@ -111,6 +112,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
|
||||
}
|
||||
});
|
||||
//全选
|
||||
cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
@ -124,6 +126,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
||||
cbSelect.setChecked(false);
|
||||
Toast.makeText(getActivity(), (String) data.obj, Toast.LENGTH_SHORT).show();
|
||||
dismissLoadingDialog();
|
||||
refreshData();
|
||||
@ -215,8 +218,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("提交中...");
|
||||
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "请选择要删除的条目数据", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -103,6 +103,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* 寻宝的Fragment
|
||||
@ -175,7 +177,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
dismissLoadingDialog();
|
||||
removableHashMap.clear();
|
||||
initThread(); // 刷新筛选的本地数据
|
||||
initList(Constant.currentLocation); // 刷新筛选的网络数据
|
||||
if (Constant.currentLocation!=null){
|
||||
initList(Constant.currentLocation); // 刷新筛选的网络数据
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "未开启定位服务", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -286,8 +293,23 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
treasureMap.getLayoutParams().width = widthHeight[0];
|
||||
treasureMap.getLayoutParams().height = widthHeight[1];
|
||||
|
||||
}
|
||||
//消息通知:
|
||||
|
||||
|
||||
}
|
||||
public class TimerTest {
|
||||
class MyTimerTask extends TimerTask {
|
||||
public void run() {
|
||||
|
||||
System.out.println("我爱你中国");
|
||||
}
|
||||
}
|
||||
public void main(String[] args) {
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(new MyTimerTask(), 0, 5000);
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 得到电话区号,电话位数
|
||||
*/
|
||||
|
66
app/src/main/res/layout/activity_photo_album.xml
Normal file
66
app/src/main/res/layout/activity_photo_album.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.PhotoAlbumActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_photo_album"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#1BA5F1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/top_pind_sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_photo_final"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@drawable/icon_arrow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_event"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="查看相册" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_photo_choose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="选择"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_photo_album"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_photo_album_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_photo_album"/>
|
||||
|
||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||
android:id="@+id/photo_album_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_photo_album_delete" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -52,17 +52,17 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_map_type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/atlas_selector"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||
<!-- <CheckBox-->
|
||||
<!-- android:id="@+id/cb_map_type"-->
|
||||
<!-- android:layout_width="50dp"-->
|
||||
<!-- android:layout_height="50dp"-->
|
||||
<!-- android:layout_marginTop="15dp"-->
|
||||
<!-- android:background="@drawable/atlas_selector"-->
|
||||
<!-- android:button="@null"-->
|
||||
<!-- android:checked="false"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_location"
|
||||
@ -71,8 +71,8 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/mine_location"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cb_map_type"
|
||||
app:layout_constraintTop_toBottomOf="@id/cb_map_type" />
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||
<Button
|
||||
android:id="@+id/btn_switch"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -59,17 +59,17 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_map_type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/atlas_selector"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||
<!-- <CheckBox-->
|
||||
<!-- android:id="@+id/cb_map_type"-->
|
||||
<!-- android:layout_width="50dp"-->
|
||||
<!-- android:layout_height="50dp"-->
|
||||
<!-- android:layout_marginTop="15dp"-->
|
||||
<!-- android:background="@drawable/atlas_selector"-->
|
||||
<!-- android:button="@null"-->
|
||||
<!-- android:checked="false"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_location"
|
||||
@ -78,8 +78,8 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/mine_location"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cb_map_type"
|
||||
app:layout_constraintTop_toBottomOf="@id/cb_map_type" />
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||
|
||||
|
||||
<Button
|
||||
|
@ -24,7 +24,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@drawable/icon_arrow"
|
||||
/>
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="全部已读"
|
||||
android:textColor="@color/black" />
|
||||
|
25
app/src/main/res/layout/photo_album_item.xml
Normal file
25
app/src/main/res/layout/photo_album_item.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_photo_album"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_photo_album"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintRight_toRightOf="@+id/iv_photo_album"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_photo_album" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -175,6 +175,16 @@
|
||||
android:text="点击拍照"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_photo_album"
|
||||
style="@style/user_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center"
|
||||
android:text="点击查看成果"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
<style name="text_style_toolbar_title">
|
||||
<item name="android:layout_height">45dp</item>
|
||||
<item name="android:layout_marginLeft">35dp</item>
|
||||
<item name="android:layout_marginLeft">15dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user