From 74306c806c6750537c5c21e0e32b9162c0840dc9 Mon Sep 17 00:00:00 2001
From: jianbo <263303411@qq.com>
Date: Thu, 27 Aug 2020 22:02:00 +0800
Subject: [PATCH] d
---
app/build.gradle | 7 +
app/src/main/AndroidManifest.xml | 14 +
.../seven/main/activity/SplashActivity.java | 87 ++++-
.../fenghoo/seven/main/find/FindFragment.java | 10 +
.../seven/main/kehu/Bean/LabelBean.java | 37 ++
.../kehu/activity/AddCustomerActivity.java | 38 ++
.../seven/main/kehu/activity/ShowAty.java | 10 +
.../main/kehu/adapter/AddCusAdapter.java | 29 ++
.../seven/main/kehu/ui/AddCusFragment.java | 268 +++++++++++++
.../seven/main/kehu/ui/AddCusParFragment.java | 171 ++++++++
.../drawable/bg_marking_username_edittext.xml | 9 +
.../main/res/layout/activity_add_customer.xml | 28 ++
app/src/main/res/layout/addcus_head_view.xml | 359 +++++++++++++++++
.../main/res/layout/addcus_head_viewtwo.xml | 369 ++++++++++++++++++
app/src/main/res/layout/findfragment.xml | 15 +-
.../res/layout/markquestionsadapter_item.xml | 28 ++
app/src/main/res/layout/mobanfragment.xml | 7 +-
app/src/main/res/xml/file_paths_public.xml | 21 +
18 files changed, 1485 insertions(+), 22 deletions(-)
create mode 100644 app/src/main/java/com/fenghoo/seven/main/kehu/Bean/LabelBean.java
create mode 100644 app/src/main/java/com/fenghoo/seven/main/kehu/activity/AddCustomerActivity.java
create mode 100644 app/src/main/java/com/fenghoo/seven/main/kehu/adapter/AddCusAdapter.java
create mode 100644 app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusFragment.java
create mode 100644 app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusParFragment.java
create mode 100644 app/src/main/res/drawable/bg_marking_username_edittext.xml
create mode 100644 app/src/main/res/layout/activity_add_customer.xml
create mode 100644 app/src/main/res/layout/addcus_head_view.xml
create mode 100644 app/src/main/res/layout/addcus_head_viewtwo.xml
create mode 100644 app/src/main/res/layout/markquestionsadapter_item.xml
create mode 100644 app/src/main/res/xml/file_paths_public.xml
diff --git a/app/build.gradle b/app/build.gradle
index 503223d..c12a626 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -70,4 +70,11 @@ dependencies {
// fragment快速实现(可选)
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
implementation('com.github.liuguangli:VerificationCodeInput:1.5')
+
+ implementation 'com.zhihu.android:matisse:0.5.2-beta2'
+ implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
+ implementation 'top.zibin:Luban:1.1.7'
+ //android 6.0权限处理
+ api 'pub.devrel:easypermissions:1.2.0'
+ implementation 'com.squareup.picasso:picasso:2.5.2'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index eaf25e4..26c9ed5 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -102,6 +102,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/fenghoo/seven/main/activity/SplashActivity.java b/app/src/main/java/com/fenghoo/seven/main/activity/SplashActivity.java
index 8f7d2c1..107c549 100644
--- a/app/src/main/java/com/fenghoo/seven/main/activity/SplashActivity.java
+++ b/app/src/main/java/com/fenghoo/seven/main/activity/SplashActivity.java
@@ -1,5 +1,6 @@
package com.fenghoo.seven.main.activity;
+import android.Manifest;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -7,10 +8,16 @@ import android.view.KeyEvent;
import android.view.WindowManager;
import com.fenghoo.seven.base.BaseActivity;
-import com.fenghoo.seven.utils.StatusBarUtil;
+import com.fenghoo.seven.utils.ToastUtils;
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
+import java.lang.ref.WeakReference;
+import java.util.List;
+
+import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import pub.devrel.easypermissions.AfterPermissionGranted;
+import pub.devrel.easypermissions.EasyPermissions;
/**
* SplashActivity
@@ -19,25 +26,41 @@ import androidx.annotation.Nullable;
* author:mengjuan
*/
-public class SplashActivity extends BaseActivity {
+public class SplashActivity extends BaseActivity implements EasyPermissions.PermissionCallbacks {
+ private static final int RC_CAMERA_AND_LOCATION = 100;
+ private class MyHandler extends Handler {
+ private final WeakReference mActivity;
+
+ public MyHandler(SplashActivity activity) {
+ mActivity = new WeakReference(activity);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ SplashActivity activity = mActivity.get();
+ if (activity != null) {
+ switch (msg.what) {
+ case 0:
+ startActivity();
+ break;
+ case 1:
+
+ break;
+ }
+ }
+ }
+ }
+
+ private final MyHandler handler = new MyHandler(this);
+
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//将屏幕设置为全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
- handler.sendEmptyMessageDelayed(0, 2000);
+ methodRequiresTwoPermission();
}
- private Handler handler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case 0:
- startActivity();
- break;
- }
- }
- };
private void startActivity(){
if (ProfileSpUtils.getInstance().isLogin()) {
@@ -53,4 +76,42 @@ public class SplashActivity extends BaseActivity {
//禁用返回
return true;
}
+
+
+ @AfterPermissionGranted(RC_CAMERA_AND_LOCATION)
+ private void methodRequiresTwoPermission() {
+ String[] perms = {Manifest.permission.WRITE_EXTERNAL_STORAGE
+ , Manifest.permission.CAMERA
+ };
+ if (EasyPermissions.hasPermissions(this, perms)) {
+
+ handler.sendEmptyMessageDelayed(0, 2000);
+
+ } else {
+ EasyPermissions.requestPermissions(this, "获取当前所在城市需要该权限",
+ RC_CAMERA_AND_LOCATION, perms);
+ }
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
+ }
+
+ //成功
+ @Override
+ public void onPermissionsGranted(int requestCode, List perms) {
+ ToastUtils.showToast(SplashActivity.this, "授权完成");
+
+ }
+
+ //失败
+ @Override
+ public void onPermissionsDenied(int requestCode, List perms) {
+
+ ToastUtils.showToast(SplashActivity.this, "获取部分权限失败,请重新授权");
+
+ }
+
}
diff --git a/app/src/main/java/com/fenghoo/seven/main/find/FindFragment.java b/app/src/main/java/com/fenghoo/seven/main/find/FindFragment.java
index 18f66dc..bab1e74 100644
--- a/app/src/main/java/com/fenghoo/seven/main/find/FindFragment.java
+++ b/app/src/main/java/com/fenghoo/seven/main/find/FindFragment.java
@@ -13,6 +13,7 @@ import com.fenghoo.seven.R;
import com.fenghoo.seven.main.find.ui.FindFragmenttwo;
import com.fenghoo.seven.main.kehu.activity.ShowAty;
import com.fenghoo.seven.test.BaseFragment;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
/**
* 发现
@@ -25,6 +26,7 @@ public class FindFragment extends BaseFragment {
private RelativeLayout dianpubuju;
private LinearLayout dianyuanbuju;
private TextView marking_fragment;
+ private FloatingActionButton floatingActionButton;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -48,6 +50,14 @@ public class FindFragment extends BaseFragment {
}
private void initView(View mContentView) {
+ floatingActionButton = (FloatingActionButton)view.findViewById(R.id.floatingActionButton);
+ floatingActionButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ //进入添加客户和完善信息
+ ShowAty.AddCustomerActivity(getActivity());
+ }
+ });
marking_fragment = (TextView)view.findViewById(R.id.marking_fragment);
dianpubuju = (RelativeLayout)view.findViewById(R.id.dianpubuju);
dianyuanbuju = (LinearLayout)view.findViewById(R.id.dianyuanbuju);
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/Bean/LabelBean.java b/app/src/main/java/com/fenghoo/seven/main/kehu/Bean/LabelBean.java
new file mode 100644
index 0000000..b1fd108
--- /dev/null
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/Bean/LabelBean.java
@@ -0,0 +1,37 @@
+package com.fenghoo.seven.main.kehu.Bean;
+
+public class LabelBean {
+
+
+ private String decoration;//家装阶段 1:毛坯,2:精装,3:旧房改造
+
+ public String getDecorationid() {
+ return decorationid;
+ }
+
+ public void setDecorationid(String decorationid) {
+ this.decorationid = decorationid;
+ }
+
+ private String decorationid;//家装阶段 1:毛坯,2:精装,3:旧房改造
+
+ public String getDecoration() {
+ return decoration;
+ }
+
+ public void setDecoration(String decoration) {
+ this.decoration = decoration;
+ }
+
+ public String getIf_sel_del() {
+ return if_sel_del;
+ }
+
+ public void setIf_sel_del(String if_sel_del) {
+ this.if_sel_del = if_sel_del;
+ }
+
+ private String if_sel_del="0";//是否选中 //0未选中 1为选中
+
+
+}
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/activity/AddCustomerActivity.java b/app/src/main/java/com/fenghoo/seven/main/kehu/activity/AddCustomerActivity.java
new file mode 100644
index 0000000..a56eeb8
--- /dev/null
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/activity/AddCustomerActivity.java
@@ -0,0 +1,38 @@
+package com.fenghoo.seven.main.kehu.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+
+import com.fenghoo.seven.R;
+import com.fenghoo.seven.main.kehu.ui.AddCusFragment;
+import com.fenghoo.seven.utils.StatusBarUtil;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+/**
+ *添加客户和完善信息
+ */
+public class AddCustomerActivity extends AppCompatActivity{
+ private static final int RC_CAMERA_AND_LOCATION = 100;
+ private static int REQUEST_CODE_CHOOSE = 100;
+ private AddCusFragment addCusFragment;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_add_customer);
+ StatusBarUtil.transparencyBar(this); //设置状态栏全透明
+ StatusBarUtil.setStatusBarColor(this,R.color.colortheme);
+ addCusFragment = new AddCusFragment();
+ getSupportFragmentManager().beginTransaction().replace(R.id.containerrr,addCusFragment).commit();
+
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (requestCode == REQUEST_CODE_CHOOSE && resultCode == RESULT_OK) {
+ addCusFragment.Result(data);
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/activity/ShowAty.java b/app/src/main/java/com/fenghoo/seven/main/kehu/activity/ShowAty.java
index db5320f..e7d8534 100644
--- a/app/src/main/java/com/fenghoo/seven/main/kehu/activity/ShowAty.java
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/activity/ShowAty.java
@@ -115,5 +115,15 @@ public class ShowAty {
ctx.startActivity(i);
}
+ /**
+ * @description 添加客户和完善信息
+ * @param
+ * @return
+ */
+ public static void AddCustomerActivity(Context ctx) {
+ Intent i = new Intent(ctx, AddCustomerActivity.class);
+ ctx.startActivity(i);
+ }
+
}
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/adapter/AddCusAdapter.java b/app/src/main/java/com/fenghoo/seven/main/kehu/adapter/AddCusAdapter.java
new file mode 100644
index 0000000..481f996
--- /dev/null
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/adapter/AddCusAdapter.java
@@ -0,0 +1,29 @@
+package com.fenghoo.seven.main.kehu.adapter;
+
+import android.content.Context;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.fenghoo.seven.R;
+import com.fenghoo.seven.main.entity.XikeInfoBean;
+import com.fenghoo.seven.utils.WidgetTools;
+
+import java.util.List;
+
+
+public class AddCusAdapter extends BaseQuickAdapter {
+ Context mcontext;
+ public AddCusAdapter(Context context, List list) {
+ super(R.layout.xikeinfo_item, list);
+ this.mcontext = context;
+ }
+ @Override
+ protected void convert(final BaseViewHolder helper, final XikeInfoBean.ResultBean.DataBean item) {
+ WidgetTools.setTextfive((TextView) helper.getView(R.id.xike_tv_01), "", item.getXike_remark());
+ WidgetTools.setTextfive((TextView) helper.getView(R.id.xike_tv_02), "", item.getTime());
+ WidgetTools.setTextfive((TextView) helper.getView(R.id.xike_tv_03), "", item.getXike_num());
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusFragment.java b/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusFragment.java
new file mode 100644
index 0000000..23ce477
--- /dev/null
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusFragment.java
@@ -0,0 +1,268 @@
+package com.fenghoo.seven.main.kehu.ui;
+
+import android.Manifest;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.net.Uri;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.fenghoo.seven.R;
+import com.fenghoo.seven.main.Fragment.MoFragment;
+import com.fenghoo.seven.main.kehu.Bean.LabelBean;
+import com.fenghoo.seven.main.kehu.adapter.AddCusAdapter;
+import com.fenghoo.seven.utils.GlideTools;
+import com.fenghoo.seven.utils.ToastUtils;
+import com.tbruyelle.rxpermissions2.RxPermissions;
+import com.zhihu.matisse.Matisse;
+import com.zhihu.matisse.MimeType;
+import com.zhihu.matisse.engine.impl.PicassoEngine;
+import com.zhihu.matisse.internal.entity.CaptureStrategy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.reactivex.disposables.Disposable;
+
+import static android.app.Activity.RESULT_OK;
+
+/**
+ * 添加客户
+ */
+public class AddCusFragment extends AddCusParFragment {
+
+ private RecyclerView recy_10;
+ private String selectType="1";
+ private ImageView imageView;
+ private static int REQUEST_CODE_CHOOSE = 100;
+ //调取系统摄像头的请求码
+ private static final int MY_ADD_CASE_CALL_PHONE = 6;
+ List result;
+ List resultPath;
+
+ public AddCusFragment() {
+ super();
+ }
+
+ @Override
+ public void initAdapter() {
+ mMarkingFragmentRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
+ AddCusAdapter markingtwoAdapter = new AddCusAdapter(mContext, null);
+ getAdpter(markingtwoAdapter);
+ final View headerView = getHeaderView();
+ markingtwoAdapter.addHeaderView(headerView);
+ mMarkingFragmentRecyclerView.setAdapter(markingtwoAdapter);
+ }
+
+ private View getHeaderView() {
+ View view = getLayoutInflater().inflate(R.layout.addcus_head_view, (ViewGroup) mMarkingFragmentRecyclerView.getParent(), false);
+ imageView = (ImageView) view.findViewById(R.id.imageView);
+ imageView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ getPermissions();
+ }
+ });
+ recy_10 = (RecyclerView) view.findViewById(R.id.recy_10);
+ ArrayList label = addData();
+ setLabel(label);
+ return view;
+ }
+
+ private ArrayList addData() {
+ ArrayList label = new ArrayList<>();
+ LabelBean labelBean = new LabelBean();
+ labelBean.setDecoration("毛坯");
+ labelBean.setDecorationid("1");
+ labelBean.setIf_sel_del("1");
+ label.add(labelBean);
+ LabelBean labelBean1 = new LabelBean();
+ labelBean1.setDecoration("精装");
+ labelBean1.setDecorationid("2");
+ labelBean1.setIf_sel_del("0");
+ label.add(labelBean1);
+ LabelBean labelBean2 = new LabelBean();
+ labelBean2.setDecoration("旧房改造");
+ labelBean2.setDecorationid("3");
+ labelBean2.setIf_sel_del("0");
+ label.add(labelBean2);
+ return label;
+ }
+ private void setLabel(final List label) {
+ if(label.size()>0){
+ if(isSelect(label)){
+ label.get(0).setIf_sel_del("1");
+ }
+ }
+ GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
+ recy_10.setLayoutManager(gridLayoutManager);
+ recy_10.setAdapter(new BaseQuickAdapter(R.layout.markquestionsadapter_item, label) {
+ @Override
+ protected void convert(final BaseViewHolder helper, final LabelBean item) {
+ TextView inboundListLocation = (TextView) helper.getView(R.id.inboundListLocation);
+ ImageView agree_provision_chk = (ImageView) helper.getView(R.id.agree_provision_chk);
+ LinearLayout ly_agree_provision_chk = (LinearLayout) helper.getView(R.id.ly_agree_provision_chk);
+ inboundListLocation.setText(item.getDecoration());
+ //当answer为空的时候,所有条目置为位选中状态,否则将能匹配到答案的选项置为选中状态。
+ if (item.getIf_sel_del().equals("0")) {
+ agree_provision_chk.setImageResource(R.mipmap.icon_cheched_false);
+ } else {
+ agree_provision_chk.setImageResource(R.mipmap.icon_cheched_true);
+ }
+ //做单选条件限制
+ ly_agree_provision_chk.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ //selectType 1为单选 2为多选
+ if (selectType.equals("1")) {
+ //先清除上次选中状态
+ for (int i = 0; i < label.size(); i++) {
+ String isselect = label.get(i).getIf_sel_del();
+ if (isselect.equals("1")) {
+ label.get(i).setIf_sel_del("0");
+ }
+ }
+ }
+ item.setIf_sel_del("1");
+ notifyDataSetChanged();
+ }
+ });
+ }
+
+ });
+ }
+ private boolean isSelect(List label) {
+ boolean isselect=true;
+ for(int i=0;i() {
+ @Override
+ public void onSubscribe(Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(Boolean aBoolean) {
+ if (aBoolean) {
+ selectImage();
+ } else {
+ ToastUtils.showToast(getActivity(), "获取权限失败,请重新授权");
+ }
+ }
+
+ @Override
+ public void onError(Throwable e) {
+
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+ /**
+ * 申请权限回调
+ *
+ * @param requestCode
+ * @param permissions
+ * @param grantResults
+ */
+ @Override
+ public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+
+ if (requestCode == MY_ADD_CASE_CALL_PHONE) {
+ if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+
+ } else {
+ //"权限拒绝");
+ // TODO: 2018/12/4 这里可以给用户一个提示,请求权限被拒绝了
+ }
+ }
+
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ }
+ private void selectImage() {
+ Matisse.from(getActivity())
+ .choose(MimeType.ofImage())//图片类型
+ .countable(false)//true:选中后显示数字;false:选中后显示对号
+ .maxSelectable(1)//可选的最大数
+ .capture(true)//选择照片时,是否显示拍照
+ .thumbnailScale(0.85f) // 缩略图的比例
+ .captureStrategy(new CaptureStrategy(true, "com.fenghoo.seven.fileprovider"))//参数1 true表示拍照存储在共有目录,false表示存储在私有目录;参数2与 AndroidManifest中authorities值相同,用于适配7.0系统 必须设置
+ .imageEngine(new PicassoEngine())//图片加载引擎
+ .showSingleMediaType(true)
+ .forResult(REQUEST_CODE_CHOOSE);//
+ }
+
+
+ @Override
+ public void requestData() {
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+
+ public void Result(Intent data){
+ result = Matisse.obtainResult(data);
+ resultPath = Matisse.obtainPathResult(data);
+// textView.setText(result.toString());
+ Uri uri = result.get(0);
+ String s = uri.toString();
+ Log.e("url==",s);
+ GlideTools.init(mContext).displaypic(imageView, resultPath.get(0), R.mipmap.icon_default_head);
+// // 图片选择结果回调
+// String paymentpaper = "";
+// selectList = PictureSelector.obtainMultipleResult(data);
+// StringBuffer sBuffer = new StringBuffer();
+// for (LocalMedia media : selectList) {
+//// Log.i("图片-----》", media.getPath());
+// File file;
+// if (media.isCompressed() || (media.isCut() && media.isCompressed())) {
+// path = media.getCompressPath();
+// } else if (media.isCut()) {
+// path = media.getCutPath();
+// } else {
+// path = media.getPath();
+// }
+// ImageCompressUtils.compressBmpToFile(path);
+// file = new File(path);
+// String resultt = AbImageUtil.bitmapToBase64(ImageUtils.getBitmap(file));
+// sBuffer.append(resultt);
+// paymentpaper = sBuffer.toString();
+// }
+// //引入黑名单的帮助类
+// heimingdanHelper = HeimingdanHelper.of(getActivity(), paymentpaper, cameraInfo, "", uid);
+// heimingdanHelper.huoqutuianlujing();
+// heimingdanHelper.setzhilujing(path);
+// //上传头像
+// upLoadAvatar(paymentpaper);
+ }
+}
diff --git a/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusParFragment.java b/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusParFragment.java
new file mode 100644
index 0000000..d68e261
--- /dev/null
+++ b/app/src/main/java/com/fenghoo/seven/main/kehu/ui/AddCusParFragment.java
@@ -0,0 +1,171 @@
+package com.fenghoo.seven.main.kehu.ui;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.fenghoo.seven.R;
+import com.fenghoo.seven.base.BaseFragment;
+import com.fenghoo.seven.main.entity.Savaselect;
+
+import java.util.List;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
+
+@SuppressLint("ValidFragment")
+public abstract class AddCusParFragment extends BaseFragment {
+ public static final String ARG_PAGE = "ARG_PAGE";
+ private boolean IS_LOADED = false;
+ private static int mSerial = 0;
+ private boolean isFirst = true;
+ @SuppressLint("HandlerLeak")
+ private Handler handler = new Handler() {
+ public void handleMessage(Message msg) {
+ Log.e("tag", "IS_LOADED=" + IS_LOADED);
+ if (!IS_LOADED) {
+ IS_LOADED = true;
+ //请求我的客户已流失数据
+ requesdata();
+ }
+ return;
+ }
+
+ };
+ public Savaselect savaselectbean;
+ private RelativeLayout rl_top;
+ private RelativeLayout layTop_left_tv;
+
+ public AddCusParFragment() {
+
+ }
+ public BaseQuickAdapter markingtwoAdapter;
+ public void sendMessage() {
+ Message message = handler.obtainMessage();
+ message.sendToTarget();
+ }
+
+ private String uid;
+ public RecyclerView mMarkingFragmentRecyclerView;
+ public int mNextRequestPage = 1;
+ private static final int PAGE_SIZE = 10;
+ View view;
+ public View notDataView;
+ public View errorView;
+ public TextView mLayTopTitle;
+ //头部图片(轮播图的高度)
+ public int mRecyclerHeaderBannerHeight;
+ //头部的高度
+ public int mRecyclerHeaderHeight;
+ private int mTextViewHeight;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mContext = getActivity();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ if (view != null) {
+ ViewGroup parent = (ViewGroup) view.getParent();
+ if (parent != null) {
+ parent.removeView(view);
+ }
+ return view;
+ }
+ view = inflater.inflate(R.layout.mobanfragment, container, false);
+ initView(view);
+ //设置页和当前页一致时加载,防止预加载
+ if (isFirst) {
+ isFirst = false;
+ sendMessage();
+ }
+ return view;
+ }
+
+ private void initView(View mContentView) {
+
+ rl_top = (RelativeLayout) view.findViewById(R.id.rl_top);
+ mLayTopTitle = (TextView) view.findViewById(R.id.layTop_title);
+ layTop_left_tv = (RelativeLayout) view.findViewById(R.id.layTop_left_tv);
+ layTop_left_tv.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ getActivity().finish();
+ }
+ });
+ mLayTopTitle.setText("信息完善");
+ Thickening(mLayTopTitle);
+ mMarkingFragmentRecyclerView = (RecyclerView) view.findViewById(R.id.marking_fragment_recyclerView);
+ notDataView = getActivity().getLayoutInflater().inflate(R.layout.empty_view, (ViewGroup) mMarkingFragmentRecyclerView.getParent(), false);
+ notDataView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // refresh();
+ }
+ });
+ errorView = getActivity().getLayoutInflater().inflate(R.layout.error_view, (ViewGroup) mMarkingFragmentRecyclerView.getParent(), false);
+ errorView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // onRefresh();
+ }
+ });
+
+ }
+
+
+ public void requesdata() {
+ initAdapter();
+// initRefreshLayout();
+// mSwl.setRefreshing(true);
+// refresh();
+ }
+
+ public abstract void initAdapter();
+
+
+ public void setData(boolean isRefresh, List data) {
+ mNextRequestPage++;
+ final int size = data == null ? 0 : data.size();
+ if (isRefresh) {
+ markingtwoAdapter.setNewData(data);
+ } else {
+ if (size > 0) {
+ markingtwoAdapter.addData(data);
+ }
+ }
+ if (size < PAGE_SIZE) {
+ //第一页如果不够一页就不显示没有更多数据布局
+ markingtwoAdapter.loadMoreEnd(isRefresh);
+ } else {
+ markingtwoAdapter.loadMoreComplete();
+ }
+ }
+
+
+ public abstract void requestData();
+
+ public void getAdpter(BaseQuickAdapter markingtwoAdapter){
+ this.markingtwoAdapter=markingtwoAdapter;
+ }
+
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+
+ }
+
+}
diff --git a/app/src/main/res/drawable/bg_marking_username_edittext.xml b/app/src/main/res/drawable/bg_marking_username_edittext.xml
new file mode 100644
index 0000000..c93b6d2
--- /dev/null
+++ b/app/src/main/res/drawable/bg_marking_username_edittext.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_add_customer.xml b/app/src/main/res/layout/activity_add_customer.xml
new file mode 100644
index 0000000..2bd368f
--- /dev/null
+++ b/app/src/main/res/layout/activity_add_customer.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/addcus_head_view.xml b/app/src/main/res/layout/addcus_head_view.xml
new file mode 100644
index 0000000..5f99ce5
--- /dev/null
+++ b/app/src/main/res/layout/addcus_head_view.xml
@@ -0,0 +1,359 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/addcus_head_viewtwo.xml b/app/src/main/res/layout/addcus_head_viewtwo.xml
new file mode 100644
index 0000000..33b7613
--- /dev/null
+++ b/app/src/main/res/layout/addcus_head_viewtwo.xml
@@ -0,0 +1,369 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/findfragment.xml b/app/src/main/res/layout/findfragment.xml
index 480bd9c..16a85d6 100644
--- a/app/src/main/res/layout/findfragment.xml
+++ b/app/src/main/res/layout/findfragment.xml
@@ -1,6 +1,7 @@
@@ -76,13 +77,21 @@
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/markquestionsadapter_item.xml b/app/src/main/res/layout/markquestionsadapter_item.xml
new file mode 100644
index 0000000..f3fe066
--- /dev/null
+++ b/app/src/main/res/layout/markquestionsadapter_item.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/mobanfragment.xml b/app/src/main/res/layout/mobanfragment.xml
index 967bc2e..0c1b612 100644
--- a/app/src/main/res/layout/mobanfragment.xml
+++ b/app/src/main/res/layout/mobanfragment.xml
@@ -52,12 +52,7 @@
-
-
+
diff --git a/app/src/main/res/xml/file_paths_public.xml b/app/src/main/res/xml/file_paths_public.xml
new file mode 100644
index 0000000..4e0eb60
--- /dev/null
+++ b/app/src/main/res/xml/file_paths_public.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
\ No newline at end of file