寻宝poi界面展示
This commit is contained in:
parent
65bf9a68f2
commit
e9e0c175f3
45
.idea/jarRepositories.xml
generated
Normal file
45
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven3" />
|
||||
<option name="name" value="maven3" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
ndkVersion '23.0.7123448'
|
||||
// ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
@ -22,9 +22,9 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
//efs {
|
||||
|
@ -71,7 +71,7 @@
|
||||
<activity android:name="com.navinfo.outdoor.activity.LoginActivity"></activity>
|
||||
<activity android:name="com.navinfo.outdoor.activity.HomeActivity"></activity>
|
||||
<activity android:name="com.navinfo.outdoor.activity.WebActivity"></activity>
|
||||
<activity android:name="com.navinfo.outdoor.activity.FragmentManagement"></activity>
|
||||
<activity android:name="com.navinfo.outdoor.activity.FragmentManagement" android:windowSoftInputMode="adjustPan"/>
|
||||
<activity android:name="com.navinfo.outdoor.activity.ImageShowActivity"></activity>
|
||||
<activity android:name="com.navinfo.outdoor.activity.UserActivity"></activity>
|
||||
</application>
|
||||
|
@ -21,6 +21,7 @@ import com.navinfo.outdoor.fragment.MineFragment;
|
||||
import com.navinfo.outdoor.fragment.PoiFragment;
|
||||
import com.navinfo.outdoor.fragment.PrivilegeFragment;
|
||||
import com.navinfo.outdoor.fragment.RecordFragment;
|
||||
import com.navinfo.outdoor.fragment.RoadFragment;
|
||||
import com.navinfo.outdoor.fragment.SetFragment;
|
||||
import com.navinfo.outdoor.fragment.TaskExWebFragment;
|
||||
import com.navinfo.outdoor.fragment.TaskExplainFragment;
|
||||
@ -30,7 +31,6 @@ import com.navinfo.outdoor.fragment.TaskPrefectureFragment;
|
||||
import com.navinfo.outdoor.fragment.RegisterFragment;
|
||||
import com.navinfo.outdoor.fragment.TreasureFragment;
|
||||
import com.navinfo.outdoor.fragment.UserAttestationFragment;
|
||||
import com.navinfo.outdoor.fragment.RoadFragment;
|
||||
import com.navinfo.outdoor.fragment.WithdrawFragment;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.navinfo.outdoor.fragment.WithdrawalRecordFragment;
|
||||
|
@ -176,6 +176,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
Toast.makeText(UserActivity.this, region_id, Toast.LENGTH_SHORT).show();
|
||||
String tx = opt1tx + " " + opt2tx + " " + opt3tx;
|
||||
region.setText(tx);
|
||||
|
||||
}
|
||||
}).setSubmitText("确定")//确定按钮文字
|
||||
.setCancelText("取消")//取消按钮文字
|
||||
@ -242,10 +243,12 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
Province_AreaList.add(City_AreaList);//添加该省所有地区数据
|
||||
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加城市数据
|
||||
*/
|
||||
options2Items.add(CityList);
|
||||
|
||||
/**
|
||||
* 添加地区数据
|
||||
*/
|
||||
|
@ -1,64 +1,108 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.tencent.tencentmap.mapsdk.maps.MapView;
|
||||
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
/**
|
||||
* 寻宝-点击上传弹窗点击poi
|
||||
* 记录的Fragment
|
||||
* 2021-5-25
|
||||
*/
|
||||
public class PoiFragment extends Fragment {
|
||||
public class PoiFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
private EditText editDescribe;
|
||||
private ImageView imagePanorama;
|
||||
private ImageView imageName;
|
||||
private ImageView imageInternalPhotos;
|
||||
private ImageView imageCard;
|
||||
private ImageView imageElse;
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public PoiFragment() {
|
||||
// Required empty public constructor
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.poi_fragment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment PoiFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static PoiFragment newInstance(String param1, String param2) {
|
||||
PoiFragment fragment = new PoiFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
editDescribe = findViewById(R.id.edit_describe);
|
||||
imagePanorama = findViewById(R.id.image_panorama);
|
||||
imagePanorama.setOnClickListener(this::onClick);
|
||||
imageName = findViewById(R.id.image_name);
|
||||
imageName.setOnClickListener(this::onClick);
|
||||
imageInternalPhotos = findViewById(R.id.image_internal_photos);
|
||||
imageInternalPhotos.setOnClickListener(this::onClick);
|
||||
imageCard = findViewById(R.id.image_card);
|
||||
imageCard.setOnClickListener(this::onClick);
|
||||
imageElse = findViewById(R.id.image_else);
|
||||
imageElse.setOnClickListener(this::onClick);
|
||||
}
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.image_panorama:
|
||||
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentPanorama, 101);
|
||||
break;
|
||||
case R.id.image_name:
|
||||
Intent intentName = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentName, 102);
|
||||
break;
|
||||
case R.id.image_internal_photos:
|
||||
Intent intentInternal = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentInternal, 103);
|
||||
break;
|
||||
case R.id.image_card:
|
||||
Intent intentCard = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentCard, 104);
|
||||
break;
|
||||
case R.id.image_else:
|
||||
Intent intentElse = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intentElse, 105);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_poi, container, false);
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 101 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imagePanorama.setImageBitmap(bitmap);//显示图像
|
||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imageName.setImageBitmap(bitmap);//显示图像
|
||||
}else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imageInternalPhotos.setImageBitmap(bitmap);//显示图像
|
||||
}else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imageCard.setImageBitmap(bitmap);//显示图像
|
||||
}else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||
Bundle extras = data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imageElse.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}
|
||||
}
|
@ -16,12 +16,16 @@ import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.ShareDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -44,6 +48,9 @@ import com.tencent.tencentmap.mapsdk.maps.model.CameraPosition;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
|
||||
|
||||
/**
|
||||
@ -61,6 +68,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private MyLocationStyle locationStyle;
|
||||
private OnLocationChangedListener locationChangedListener;
|
||||
private ImageView ivLocation;
|
||||
private ImageView ivSubmit;
|
||||
private ImageView ivRefish;
|
||||
|
||||
@Override
|
||||
@ -73,6 +81,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
super.initView();
|
||||
ivRefish = findViewById(R.id.iv_refrish);
|
||||
ivRefish.setOnClickListener(this::onClick);
|
||||
ivSubmit = findViewById(R.id.iv_submit);
|
||||
ivSubmit.setOnClickListener(this::onClick);
|
||||
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
||||
tencentMap = treasureMap.getMap();
|
||||
cbMapType = (CheckBox) findViewById(R.id.cb_map_type);
|
||||
@ -207,19 +217,53 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
tencentMap.animateCamera(cameraUpdateOut);
|
||||
break;
|
||||
case R.id.iv_location://定位:
|
||||
Constant.currentLocation.getLongitude();
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
19, //目标缩放级别
|
||||
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
if (Constant.currentLocation!=null){
|
||||
Constant.currentLocation.getLongitude();
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
19, //目标缩放级别
|
||||
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "无定位", Toast.LENGTH_SHORT).show();
|
||||
checkNetWork();
|
||||
}
|
||||
|
||||
break;
|
||||
case R.id.iv_refrish://
|
||||
Intent road = new Intent(getActivity(), FragmentManagement.class);
|
||||
road.putExtra("tag",28);
|
||||
startActivity(road);
|
||||
case R.id.iv_submit://弹窗
|
||||
//分享
|
||||
CharSequence title = "请选择上报类型";
|
||||
List<ShareDialog.Item> itemList = new ArrayList<>();
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
||||
ShareDialog.show((AppCompatActivity) getActivity(), itemList, new ShareDialog.OnItemClickListener() {
|
||||
@Override
|
||||
public boolean onClick(ShareDialog shareDialog, int index, ShareDialog.Item item) {
|
||||
switch (index){
|
||||
case 0:
|
||||
Intent poiIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
poiIntent.putExtra("tag",27);
|
||||
startActivity(poiIntent);
|
||||
break;
|
||||
case 1:
|
||||
Intent roadIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
roadIntent.putExtra("tag",28);
|
||||
startActivity(roadIntent);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
Toast.makeText(getContext(), item.getText(), Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).setTitle(title);
|
||||
break;
|
||||
case R.id.iv_refrish:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -257,7 +301,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
requestPermissions(permission, 0);
|
||||
} else {
|
||||
// 此处为某些5.0动态权限的手机
|
||||
//goSystemLocationActivity(); // TODO =======待删除======
|
||||
// goSystemLocationActivity(); // TODO =======待删除======
|
||||
tipPermissionAlertDialog();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,258 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.TranslateAnimation;
|
||||
import android.widget.ScrollView;
|
||||
|
||||
/**
|
||||
* 注意使用的时候需要放大的view,一般是第一个RelativeLayout或者LinearLayout。要加上 android:layout_gravity="center_horizontal"
|
||||
|
||||
*/
|
||||
|
||||
public class BounceZoomScrollView extends ScrollView {
|
||||
|
||||
private static final String TAG = "BounceScrollView";
|
||||
|
||||
|
||||
//----头部收缩属性--------
|
||||
|
||||
// 记录首次按下位置
|
||||
private float mFirstPosition = 0;
|
||||
// 头部图片是否正在放大
|
||||
private Boolean mScaling = false;
|
||||
private View dropZoomView;//需要被放大的view
|
||||
private int dropZoomViewWidth;
|
||||
private int dropZoomViewHeight;
|
||||
//----头部收缩属性end--------
|
||||
|
||||
//------尾部收缩属性--------
|
||||
private View inner;// 子View
|
||||
private float y;// 点击时y坐标
|
||||
private Rect normal = new Rect();// 矩形(这里只是个形式,只是用于判断是否需要动画.)
|
||||
|
||||
private boolean isCount = false;// 是否开始计算
|
||||
//最后的坐标
|
||||
private float lastX = 0;
|
||||
private float lastY = 0;
|
||||
//当前坐标
|
||||
private float currentX = 0;
|
||||
private float currentY = 0;
|
||||
//移动的坐标量
|
||||
private float distanceX = 0;
|
||||
private float distanceY = 0;
|
||||
private boolean upDownSlide = false; //判断上下滑动的flag
|
||||
//------尾部收缩属性end--------
|
||||
|
||||
public BounceZoomScrollView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
//初始化
|
||||
private void init() {
|
||||
setOverScrollMode(OVER_SCROLL_NEVER);
|
||||
|
||||
if (getChildAt(0) != null) {
|
||||
inner = getChildAt(0);//这个是底部收缩的view
|
||||
|
||||
//头部收缩的
|
||||
ViewGroup vg = (ViewGroup) getChildAt(0);
|
||||
if (vg.getChildAt(0) != null) {
|
||||
dropZoomView = vg.getChildAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 生成视图工作完成.该函数在生成视图的最后调用,在所有子视图添加完之后. 即使子类覆盖了 onFinishInflate
|
||||
* 方法,也应该调用父类的方法,使该方法得以执行.
|
||||
*/
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
//初始化
|
||||
init();
|
||||
super.onFinishInflate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
|
||||
//这里只是计算尾部坐标
|
||||
currentX = ev.getX();
|
||||
currentY = ev.getY();
|
||||
switch (ev.getAction()) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
distanceX = currentX - lastX;
|
||||
distanceY = currentY - lastY;
|
||||
if (Math.abs(distanceX) < Math.abs(distanceY) && Math.abs(distanceY) > 12) {
|
||||
upDownSlide = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
lastX = currentX;
|
||||
lastY = currentY;
|
||||
if (upDownSlide && inner != null) commOnTouchEvent(ev);
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
/***
|
||||
* 触摸事件
|
||||
*
|
||||
* @param ev
|
||||
*/
|
||||
public void commOnTouchEvent(MotionEvent ev) {
|
||||
|
||||
//头部缩放计算
|
||||
if (dropZoomViewWidth <= 0 || dropZoomViewHeight <= 0) {
|
||||
dropZoomViewWidth = dropZoomView.getMeasuredWidth();
|
||||
dropZoomViewHeight = dropZoomView.getMeasuredHeight();
|
||||
}
|
||||
|
||||
switch (ev.getAction()) {
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
//手指离开后头部恢复图片
|
||||
mScaling = false;
|
||||
replyImage();
|
||||
|
||||
// 手指松开尾部恢复
|
||||
if (isNeedAnimation()) {
|
||||
animation();
|
||||
isCount = false;
|
||||
}
|
||||
clear0();
|
||||
break;
|
||||
|
||||
//这里头尾分开处理,互不干扰
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
//尾部处理
|
||||
final float preY = y;// 按下时的y坐标
|
||||
float nowY = ev.getY();// 时时y坐标
|
||||
int deltaY = (int) (preY - nowY);// 滑动距离
|
||||
if (!isCount) {
|
||||
deltaY = 0; // 在这里要归0.
|
||||
}
|
||||
y = nowY;
|
||||
// 当滚动到最上或者最下时就不会再滚动,这时移动布局
|
||||
if (isNeedMove()) {
|
||||
// 初始化头部矩形
|
||||
if (normal.isEmpty()) {
|
||||
// 保存正常的布局位置
|
||||
normal.set(inner.getLeft(), inner.getTop(),
|
||||
inner.getRight(), inner.getBottom());
|
||||
}
|
||||
// 移动布局
|
||||
inner.layout(inner.getLeft(), inner.getTop() - deltaY / 2,
|
||||
inner.getRight(), inner.getBottom() - deltaY / 2);
|
||||
}
|
||||
isCount = true;
|
||||
//尾部处理end
|
||||
|
||||
//头部处理
|
||||
if (!mScaling) {
|
||||
if (getScrollY() == 0) {
|
||||
mFirstPosition = ev.getY();// 滚动到顶部时记录位置,否则正常返回
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
int distance = (int) ((ev.getY() - mFirstPosition) * 0.6); // 滚动距离乘以一个系数
|
||||
if (distance < 0) { // 当前位置比记录位置要小,正常返回
|
||||
break;
|
||||
}
|
||||
// 处理放大
|
||||
mScaling = true;
|
||||
setZoom(1 + distance);
|
||||
//头部处理end
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* 回缩动画,尾部往下缩动画
|
||||
*/
|
||||
public void animation() {
|
||||
// 开启移动动画
|
||||
TranslateAnimation ta = new TranslateAnimation(0, 0, inner.getTop(),
|
||||
normal.top);
|
||||
ta.setDuration(200);
|
||||
inner.startAnimation(ta);
|
||||
// 设置回到正常的布局位置
|
||||
inner.layout(normal.left, normal.top, normal.right, normal.bottom);
|
||||
|
||||
normal.setEmpty();
|
||||
|
||||
}
|
||||
|
||||
// 是否需要开启动画
|
||||
public boolean isNeedAnimation() {
|
||||
return !normal.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
// 回弹动画,header往上缩动画 (使用了属性动画)
|
||||
public void replyImage() {
|
||||
final float distance = dropZoomView.getMeasuredWidth() - dropZoomViewWidth;
|
||||
|
||||
// 设置动画
|
||||
ValueAnimator anim = ObjectAnimator.ofFloat(0.0F, 1.0F).setDuration((long) (distance * 0.7));
|
||||
|
||||
anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
float cVal = (Float) animation.getAnimatedValue();
|
||||
setZoom(distance - ((distance) * cVal));
|
||||
}
|
||||
});
|
||||
anim.start();
|
||||
|
||||
}
|
||||
|
||||
//头部缩放
|
||||
public void setZoom(float s) {
|
||||
if (dropZoomViewHeight <= 0 || dropZoomViewWidth <= 0) {
|
||||
return;
|
||||
}
|
||||
ViewGroup.LayoutParams lp = dropZoomView.getLayoutParams();
|
||||
lp.width = (int) (dropZoomViewWidth + s);
|
||||
lp.height = (int) (dropZoomViewHeight * ((dropZoomViewWidth + s) / dropZoomViewWidth));
|
||||
dropZoomView.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
/***
|
||||
* 是否需要移动布局 inner.getMeasuredHeight():获取的是控件的总高度
|
||||
*
|
||||
* getHeight():获取的是屏幕的高度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isNeedMove() {
|
||||
int offset = inner.getMeasuredHeight() - getHeight();
|
||||
int scrollY = getScrollY();
|
||||
// 0是顶部,后面那个是底部
|
||||
if (scrollY == 0 || scrollY == offset) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//清理尾部属性值
|
||||
private void clear0() {
|
||||
lastX = 0;
|
||||
lastY = 0;
|
||||
distanceX = 0;
|
||||
distanceY = 0;
|
||||
upDownSlide = false;
|
||||
}
|
||||
|
||||
}
|
BIN
app/src/main/res/drawable/push_chongdianzhuang.png
Normal file
BIN
app/src/main/res/drawable/push_chongdianzhuang.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 392 B |
BIN
app/src/main/res/drawable/push_poi.png
Normal file
BIN
app/src/main/res/drawable/push_poi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 629 B |
BIN
app/src/main/res/drawable/push_qingbao.png
Normal file
BIN
app/src/main/res/drawable/push_qingbao.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 363 B |
BIN
app/src/main/res/drawable/push_road.png
Normal file
BIN
app/src/main/res/drawable/push_road.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 507 B |
@ -3,5 +3,5 @@
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#fff"/>
|
||||
<stroke android:width="2dp"
|
||||
android:color="#FF9800"/>
|
||||
android:color="#D1D0CF"/>
|
||||
</shape>
|
411
app/src/main/res/layout/poi_fragment.xml
Normal file
411
app/src/main/res/layout/poi_fragment.xml
Normal file
@ -0,0 +1,411 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="65dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_poi">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/linear_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_01"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/road_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:background="@drawable/top_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="poi"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/road_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/road_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/road_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/road_bg" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/top_bg_line_left"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv1"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv1"
|
||||
app:layout_constraintTop_toTopOf="@id/tv1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@drawable/top_bg_line_right"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv1"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv1"
|
||||
app:layout_constraintTop_toTopOf="@id/tv1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="任务说明"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv1"
|
||||
app:layout_constraintRight_toRightOf="@id/tv1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="01基本资料填写"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_image" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_pot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_01"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_pot"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="点位*"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_pot_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="111111111.0,5555555555.0"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_pot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_pot"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="名称*"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_name_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_name"
|
||||
android:background="@color/white"
|
||||
android:hint="poi名称"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_site"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_site"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="地址*"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_site_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_site"
|
||||
android:background="@color/white"
|
||||
android:hint="poi地址"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_site"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="电话*"
|
||||
android:textColor="#333"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_phone_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@id/tv_phone"
|
||||
android:background="@color/white"
|
||||
android:text="010"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#333" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_02"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="02拍照"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_phone" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_photograph"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_02"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/image_panorama"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@mipmap/bg"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/image_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@mipmap/bg"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/image_internal_photos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@mipmap/bg"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/image_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@mipmap/bg"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/image_else"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@mipmap/bg"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_03"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="02拍照"
|
||||
android:layout_margin="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_photograph" />
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_describe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/underline"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_03"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
<EditText
|
||||
android:id="@+id/edit_describe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="top"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@color/white"
|
||||
android:hint="任务描述"
|
||||
android:textSize="15sp"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_describe">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save_local"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_red_radius_bg"
|
||||
android:text="保存本地"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_uploading"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_transparent_pink_radius_bg"
|
||||
android:text="上传" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_poi"
|
||||
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_poi"
|
||||
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_poi"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="编辑poi" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -11,8 +11,12 @@
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" >
|
||||
|
||||
</com.tencent.tencentmap.mapsdk.maps.MapView>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_map_type"
|
||||
@ -93,18 +97,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="请选择上报类型"
|
||||
android:textSize="15sp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:src="@drawable/icon_close"-->
|
||||
<!-- android:padding="10dp"-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
@ -41,9 +42,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="@+id/linear_hint"
|
||||
app:layout_constraintStart_toStartOf="@+id/linear_hint"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_attestation">
|
||||
|
||||
<LinearLayout
|
||||
@ -112,16 +115,16 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@mipmap/checkbox"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/checkbox" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_attestation2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@mipmap/checkbox"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/checkbox" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@ -131,10 +134,10 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_attestation"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="40dp"
|
||||
style="@style/user_data_style"
|
||||
android:text="认证" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,283 +0,0 @@
|
||||
<?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="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#1BA5F1"
|
||||
android:paddingTop="@dimen/top_pind_sp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:padding="15dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@drawable/icon_arrow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="用户资料" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
style="@style/text_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="账号信息"
|
||||
android:layout_margin="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/linearLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_user" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="480dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="#fff"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实名认证"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style" />
|
||||
<Button
|
||||
android:id="@+id/btn_attestation"
|
||||
style="@style/user_style"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="去认证"
|
||||
android:textColor="#fff" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="收款信息"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/btn_gathering"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="去绑定"
|
||||
android:textColor="#fff"
|
||||
style="@style/user_style"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_region"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/underline"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_region"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="所在地区*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/region"
|
||||
android:layout_toRightOf="@id/tv_region"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/user_hint_style"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请选择所在区域"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="手机号码*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_toRightOf="@id/tv_number"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/user_hint_style"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请输入手机号码"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qq"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ号码*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_qq"
|
||||
android:layout_toRightOf="@id/tv_qq"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请输入QQ号码 "
|
||||
style="@style/user_hint_style"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mailbox"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电子邮箱*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_mailbox"
|
||||
android:layout_toRightOf="@id/tv_mailbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请输入邮箱地址"
|
||||
style="@style/user_hint_style"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="微信"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<Button
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="去绑定"
|
||||
android:textColor="#fff"
|
||||
style="@style/user_style"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
<Button
|
||||
android:id="@+id/btn_save"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="保存"
|
||||
style="@style/main_style"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -48,8 +48,8 @@
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@mipmap/white_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/linear_hint"
|
||||
app:layout_constraintStart_toStartOf="@+id/linear_hint"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_withdraw">
|
||||
|
||||
<TextView
|
||||
|
Loading…
x
Reference in New Issue
Block a user