90948b3991e1efac0eb1790b94d2adf848dcdd6a.svn-base 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. package eVVM.apk.ui.login;
  2. import android.Manifest;
  3. import android.app.Activity;
  4. import android.app.Dialog;
  5. import android.content.Intent;
  6. import android.content.pm.PackageManager;
  7. import android.os.Build;
  8. import android.os.Environment;
  9. import android.support.annotation.NonNull;
  10. import android.support.annotation.Nullable;
  11. import android.support.v4.app.ActivityCompat;
  12. import android.support.v4.content.ContextCompat;
  13. import android.text.TextUtils;
  14. import android.util.Log;
  15. import android.view.View;
  16. import android.widget.Button;
  17. import android.widget.EditText;
  18. import android.widget.ImageView;
  19. import android.widget.LinearLayout;
  20. import android.widget.TextView;
  21. import org.greenrobot.eventbus.Subscribe;
  22. import org.greenrobot.eventbus.ThreadMode;
  23. import java.io.File;
  24. import java.util.ArrayList;
  25. import java.util.Arrays;
  26. import java.util.List;
  27. import butterknife.BindView;
  28. import butterknife.OnClick;
  29. import cn.bingoogolapple.photopicker.activity.BGAPhotoPickerActivity;
  30. import cn.bingoogolapple.photopicker.activity.BGAPhotoPickerPreviewActivity;
  31. import cn.bingoogolapple.photopicker.imageloader.BGAImage;
  32. import cn.bingoogolapple.photopicker.widget.BGASortableNinePhotoLayout;
  33. import eVVM.apk.R;
  34. import eVVM.apk.api.ApiUrl;
  35. import eVVM.apk.helper.ImgDonwloads;
  36. import eVVM.apk.helper.InputTextHelper;
  37. import eVVM.apk.helper.basepicker.DataPickerDialog;
  38. import eVVM.apk.mvp.MvpActivity;
  39. import eVVM.apk.ui.bean.VerificationCodeBean;
  40. import eVVM.apk.ui.event.CompanyEvent;
  41. import eVVM.apk.ui.launcher.LikeActivity;
  42. import eVVM.apk.ui.login.authentication.AttctContract;
  43. import eVVM.apk.ui.login.authentication.AttctPresenter;
  44. import eVVM.apk.widget.EvvmMsgDiago;
  45. import me.jessyan.autosize.utils.AutoSizeUtils;
  46. /**
  47. * 实名认证页
  48. */
  49. public class AuthenticationActivity extends MvpActivity<AttctPresenter> implements AttctContract.View, BGASortableNinePhotoLayout.Delegate {
  50. @BindView(R.id.attc_et_phone)
  51. TextView attcEtPhone;
  52. @BindView(R.id.attc_et_name)
  53. EditText attcEtName;
  54. @BindView(R.id.attc_et_code)
  55. EditText attcEtCode;
  56. @BindView(R.id.attc_et_email)
  57. EditText attcEtEmail;
  58. @BindView(R.id.attc_et_license)
  59. ImageView attcEtLicense;
  60. @BindView(R.id.attc_et_prove)
  61. ImageView attcEtProve;
  62. @BindView(R.id.attc_btn_register)
  63. Button attcBtnRegister;
  64. @BindView(R.id.tv_information_hospital)
  65. TextView tvInformationHospital;
  66. @BindView(R.id.tv_information_factory)
  67. TextView tvInformationFactory;
  68. @BindView(R.id.attc_ll_license)
  69. LinearLayout attcLlLicense;
  70. @BindView(R.id.attc_ll_prove)
  71. LinearLayout attcLlProve;
  72. @BindView(R.id.snpl_moment_add_photos)
  73. BGASortableNinePhotoLayout mPhotosSnpl;
  74. private File takePhotoDir = new File(Environment.getExternalStorageDirectory(), "eVVM");
  75. private static final int REQUEST_LICENSE_PHOTO_PREVIEW = 1324;
  76. private static final int REQUEST_LICENSE_CHOOSE_FROM_GALLERY = 1325;
  77. private static final int REQUEST_PROVE_CHOOSE_FROM_GALLERY = 1326;
  78. private String registerUserId;
  79. private int companyId = 0;
  80. @Override
  81. protected int getLayoutId() {
  82. return R.layout.activity_authentication;
  83. }
  84. @Override
  85. protected int getTitleId() {
  86. return R.id.attc_title;
  87. }
  88. @Override
  89. public void onLeftClick(View v) {
  90. new EvvmMsgDiago.Builder(this)
  91. .setTitle("您未完成实名认证,是否退出?") // 标题可以不用填写
  92. .setConfirm("确定")
  93. .setCancel("取消") // 设置 null 表示不显示取消按钮
  94. //.setAutoDismiss(false) // 设置点击按钮后不关闭对话框
  95. .setListener(new EvvmMsgDiago.OnListener() {
  96. @Override
  97. public void onConfirm(Dialog dialog) {
  98. finish();
  99. }
  100. @Override
  101. public void onCancel(Dialog dialog) {
  102. //toast("取消了");
  103. }
  104. })
  105. .show();
  106. }
  107. @Override
  108. protected void initView() {
  109. new InputTextHelper.Builder(this)
  110. .setMain(attcBtnRegister)
  111. .addView(attcEtPhone)
  112. .addView(attcEtName)
  113. .addView(attcEtCode)
  114. .addView(attcEtEmail)
  115. .addView(tvInformationHospital)
  116. .addView(tvInformationFactory)
  117. .build();
  118. Intent in = getIntent();
  119. registerUserId = in.getStringExtra("registerUserId");
  120. tvInformationHospital.setEnabled(false);
  121. mPhotosSnpl.setData(null);
  122. mPhotosSnpl.setMaxItemCount(3);
  123. mPhotosSnpl.setSortable(false);
  124. mPhotosSnpl.setEditable(true);
  125. mPhotosSnpl.setPlusEnable(true);
  126. mPhotosSnpl.setDelegate(this);
  127. Button downloadBtn = (Button) findViewById(R.id.download_btn);
  128. // download() ;
  129. downloadBtn.setOnClickListener(new View.OnClickListener() {
  130. @Override
  131. public void onClick(View v) {
  132. List<String> permissionList = new ArrayList<>();
  133. if (ContextCompat.checkSelfPermission(AuthenticationActivity.this,
  134. Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
  135. permissionList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
  136. }
  137. if (!permissionList.isEmpty()) {
  138. String[] permissions = permissionList.toArray(new String[permissionList.size()]);
  139. ActivityCompat.requestPermissions(AuthenticationActivity.this, permissions, 1);
  140. } else {
  141. ImgDonwloads.donwloadImg(AuthenticationActivity.this, ApiUrl.authPath);//iPath
  142. }
  143. }
  144. });
  145. }
  146. @Override
  147. public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
  148. switch (requestCode) {
  149. case 1:
  150. if (grantResults.length > 0) {
  151. for (int result : grantResults) {
  152. if (result != PackageManager.PERMISSION_GRANTED) {
  153. toast("拒绝了权限");
  154. return;
  155. }
  156. }
  157. ImgDonwloads.donwloadImg(AuthenticationActivity.this, "");
  158. } else {
  159. toast("发生未知错误");
  160. }
  161. break;
  162. default:
  163. }
  164. }
  165. @Override
  166. protected void initData() {
  167. }
  168. @OnClick({R.id.attc_et_license, R.id.attc_et_prove, R.id.attc_btn_register, R.id.tv_information_hospital, R.id.tv_information_factory, R.id.attc_et_phone})
  169. public void onViewClicked(View view) {
  170. switch (view.getId()) {
  171. case R.id.attc_et_license:
  172. //上传执业执照
  173. /*
  174. 从相册选取二维码图片,这里为了方便演示,使用的是
  175. https://github.com/bingoogolapple/BGAPhotoPicker-Android
  176. 这个库来从图库中选择二维码图片,这个库不是必须的,你也可以通过自己的方式从图库中选择图片
  177. */
  178. Intent licensePhotoPickerIntent = new BGAPhotoPickerActivity.IntentBuilder(this)
  179. .cameraFileDir(takePhotoDir)
  180. .maxChooseCount(3)
  181. .selectedPhotos(null)
  182. .pauseOnScroll(false)
  183. .build();
  184. startActivityForResult(licensePhotoPickerIntent, REQUEST_LICENSE_CHOOSE_FROM_GALLERY);
  185. break;
  186. case R.id.attc_et_prove:
  187. //上传授权证明
  188. if (uploadimgpaths1.size() == 0) {
  189. toast("请先选择执业执照");
  190. } else {
  191. Intent provePhotoPickerIntent = new BGAPhotoPickerActivity.IntentBuilder(this)
  192. .cameraFileDir(takePhotoDir)
  193. .maxChooseCount(1)
  194. .selectedPhotos(null)
  195. .pauseOnScroll(false)
  196. .build();
  197. startActivityForResult(provePhotoPickerIntent, REQUEST_PROVE_CHOOSE_FROM_GALLERY);
  198. }
  199. break;
  200. case R.id.attc_btn_register:
  201. if (companyId == 0) {
  202. toast("请选择单位名称");
  203. return;
  204. }
  205. if (!checkEmail(attcEtEmail.getText().toString())){
  206. toast("请输入正确的邮箱");
  207. return;
  208. }
  209. //进行实名认证
  210. final List<String> uploadimgpaths3 = new ArrayList<>();
  211. if ("预防接种机构".equals(tvInformationHospital.getText().toString())) {
  212. if (mPhotosSnpl.getData().size() == 0 || uploadimgpaths2.size() == 0) {
  213. toast("请选择执业执照及授权证明");
  214. } else {
  215. uploadimgpaths3.clear();
  216. uploadimgpaths3.addAll(mPhotosSnpl.getData());
  217. uploadimgpaths3.addAll(uploadimgpaths2);
  218. //String user_id = (String) SPUtils.get("USER_ID", "");
  219. if (TextUtils.isEmpty(registerUserId)) {
  220. Log.e("getPresenterattct", "" + uploadimgpaths3.toString());
  221. } else {
  222. showLoading();
  223. getPresenter().attct(Integer.parseInt(registerUserId), companyId + ""
  224. , attcEtName.getText().toString(), attcEtCode.getText().toString(),
  225. attcEtEmail.getText().toString(), getRoleId(tvInformationFactory.getText().toString()) + "",
  226. 0, Build.BRAND + " " + Build.MODEL, uploadimgpaths3);
  227. }
  228. }
  229. } else {
  230. if (TextUtils.isEmpty(registerUserId)) {
  231. } else {
  232. List<String> emptyList = new ArrayList<>();
  233. getPresenter().attct(Integer.parseInt(registerUserId), companyId + ""
  234. , attcEtName.getText().toString(), attcEtCode.getText().toString(),
  235. attcEtEmail.getText().toString(), getRoleId(tvInformationFactory.getText().toString()) + "",
  236. 0, Build.BRAND + " " + Build.MODEL, emptyList);
  237. }
  238. }
  239. break;
  240. case R.id.tv_information_hospital:
  241. DataPickerDialog.Builder builder = new DataPickerDialog.Builder(this);
  242. List<String> data = Arrays.asList(new String[]{"医药企业", "预防接种机构", "预防接受种者", "物流公司"});
  243. /*List<RoleTypeBean.RoleParen> parentlist = new ArrayList<>();
  244. parentlist.add(new RoleTypeBean.RoleParen(6,"","医药企业"));
  245. parentlist.add(new RoleTypeBean.RoleParen(7,"","预防接种机构"));
  246. parentlist.add(new RoleTypeBean.RoleParen(8,"","预防接受种者"));
  247. parentlist.add(new RoleTypeBean.RoleParen(9,"","物流公司"));*/
  248. DataPickerDialog dialog = builder.setData(data).setSelection(0).setTitle("标题")
  249. .setOnDataSelectedListener(new DataPickerDialog.OnDataSelectedListener() {
  250. @Override
  251. public void onDataSelected(String itemValue) {
  252. if (!TextUtils.isEmpty(tvInformationHospital.getText().toString())) {
  253. tvInformationFactory.setText("");
  254. }
  255. tvInformationHospital.setText(itemValue + "");
  256. if ("预防接种机构".equals(itemValue)) {
  257. attcLlLicense.setVisibility(View.VISIBLE);
  258. attcLlProve.setVisibility(View.VISIBLE);
  259. } else {
  260. attcLlLicense.setVisibility(View.GONE);
  261. attcLlProve.setVisibility(View.GONE);
  262. }
  263. }
  264. }).create();
  265. dialog.show();
  266. break;
  267. case R.id.tv_information_factory:
  268. if (TextUtils.isEmpty(tvInformationHospital.getText().toString())) {
  269. toast("请先选择所属类型");
  270. return;
  271. } else {
  272. int roleParentId = getRoleParentId(tvInformationHospital.getText().toString());
  273. List<String> roleType = getRoleType(roleParentId);
  274. DataPickerDialog.Builder builder2 = new DataPickerDialog.Builder(this);
  275. /*List<String> data2 = Arrays.asList(new String[]{"品控人员", "生产人员", "物流人员", "管理人员", "护士", "受种者家属",
  276. "管理人员", "操作人员","后台管理者"});*/
  277. DataPickerDialog dialog2 = builder2.setData(roleType).setSelection(0).setTitle("职务")
  278. .setOnDataSelectedListener(new DataPickerDialog.OnDataSelectedListener() {
  279. @Override
  280. public void onDataSelected(String itemValue) {
  281. tvInformationFactory.setText(itemValue + "");
  282. //Toast.makeText(getApplicationContext(), itemValue, Toast.LENGTH_SHORT).show();
  283. }
  284. }).create();
  285. dialog2.show();
  286. }
  287. break;
  288. case R.id.attc_et_phone:
  289. startActivity(CompanyChooseActivity.class);
  290. break;
  291. /*case R.id.download_btn:
  292. //toast("下载");
  293. //下载的图片路径
  294. String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560345333671&di=3642b27a83162af116af51289ec4d11f&imgtype=jpg&src=http%3A%2F%2Fimg1.imgtn.bdimg.com%2Fit%2Fu%3D2191520521%2C2689315141%26fm%3D214%26gp%3D0.jpg";
  295. final String fileName = "evvmproveimg.jpg"; //文件名 注意结尾要加后缀
  296. RxHttpUtils
  297. .downloadFile(url)
  298. //.subscribe(new DownloadObserver(fileName,destFileDir) 其中 destFileDir是自定义下载存储路径
  299. .subscribe(new DownloadObserver(fileName, Environment.getExternalStorageDirectory().getPath()) {
  300. //可以通过配置tag用于取消下载请求
  301. @Override
  302. protected String setTag() {
  303. return "download";
  304. }
  305. @Override
  306. protected void onError(String errorMsg) {
  307. toast(errorMsg);
  308. }
  309. @Override
  310. protected void onSuccess(long bytesRead, long contentLength, float progress, boolean done, String filePath) {
  311. btnProveDownload.setText("" + progress + "%");
  312. if (done) {
  313. btnProveDownload.setText("下载\n完成");
  314. toast("下载完成,请上传");
  315. }
  316. }
  317. });
  318. break;*/
  319. }
  320. }
  321. //根据parent名字返回id
  322. private int getRoleParentId(String name) {
  323. if ("医药企业".equals(name))
  324. return 6;
  325. if ("预防接种机构".equals(name))
  326. return 7;
  327. if ("预防接受种者".equals(name))
  328. return 8;
  329. if ("物流公司".equals(name))
  330. return 9;
  331. return 0;
  332. }
  333. @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
  334. public void onEvent(CompanyEvent event) {
  335. attcEtPhone.setText(event.getCompanyName());
  336. tvInformationFactory.setText("");
  337. companyId = event.getCompanyId();
  338. if (event.getType() == 1) {
  339. tvInformationHospital.setText("医药企业");
  340. attcLlLicense.setVisibility(View.GONE);
  341. attcLlProve.setVisibility(View.GONE);
  342. } else if (event.getType() == 2) {
  343. tvInformationHospital.setText("预防接种机构");
  344. attcLlLicense.setVisibility(View.VISIBLE);
  345. attcLlProve.setVisibility(View.VISIBLE);
  346. } else {
  347. }
  348. }
  349. /**
  350. * 检查邮箱是否合法
  351. */
  352. private static Boolean checkEmail(String email) {
  353. if (email.matches("^[a-z0-9A-Z]+[- | a-z0-9A-Z . _]+@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-z]{2,}$")) {
  354. return true;
  355. } else {
  356. return false;
  357. }
  358. }
  359. //根据id返回字列表
  360. private List<String> getRoleType(int parentId) {
  361. List<String> list = new ArrayList<>();
  362. switch (parentId) {
  363. case 6:
  364. list.clear();
  365. list.add("管理员");
  366. list.add("操作员");
  367. list.add("品控人员");
  368. list.add("生产人员");
  369. list.add("物流人员");
  370. list.add("后台管理员");
  371. return list;
  372. case 7:
  373. list.clear();
  374. list.add("医生");
  375. list.add("管理人员");
  376. list.add("护士");
  377. return list;
  378. case 8:
  379. list.clear();
  380. list.add("受种者本人");
  381. list.add("受种者家属");
  382. return list;
  383. case 9:
  384. list.clear();
  385. list.add("管理人员");
  386. list.add("操作人员");
  387. return list;
  388. default:
  389. return null;
  390. }
  391. }
  392. //根据名字返回id
  393. private int getRoleId(String name) {
  394. if ("超级管理员".equals(name))
  395. return 1;
  396. if ("医生".equals(name))
  397. return 2;
  398. if ("管理员".equals(name))
  399. return 3;
  400. if ("操作员".equals(name))
  401. return 4;
  402. if ("受种着本人".equals(name))
  403. return 5;
  404. if ("医药企业".equals(name))
  405. return 6;
  406. if ("预防接种机构".equals(name))
  407. return 7;
  408. if ("预防接种者".equals(name))
  409. return 8;
  410. if ("物流公司".equals(name))
  411. return 9;
  412. if ("其他".equals(name))
  413. return 10;
  414. if ("品控人员".equals(name))
  415. return 11;
  416. if ("生产人员".equals(name))
  417. return 12;
  418. if ("物流人员".equals(name))
  419. return 13;
  420. if ("管理人员".equals(name) && "预防接种机构".equals(tvInformationHospital.getText().toString()))
  421. return 14;
  422. if ("护士".equals(name))
  423. return 15;
  424. if ("受种者家属".equals(name))
  425. return 16;
  426. if ("管理人员".equals(name) && "物流公司".equals(tvInformationHospital.getText().toString()))
  427. return 17;
  428. if ("操作人员".equals(name))
  429. return 18;
  430. if ("后台管理者".equals(name))
  431. return 19;
  432. return 0;
  433. }
  434. @Override
  435. protected AttctPresenter createPresenter() {
  436. return new AttctPresenter();
  437. }
  438. @Override
  439. public void attctError(String msg) {
  440. showComplete();
  441. toast(msg);
  442. }
  443. @Override
  444. public void attctSuccess(VerificationCodeBean data) {
  445. showComplete();
  446. // Log.e("attctSuccessVN",data.getData().toString()+data.getMsg());
  447. toast("注册成功");
  448. Intent in = new Intent(this, LikeActivity.class);
  449. in.putExtra("LikeUserId", "" + Double.valueOf(String.valueOf(data.getData())).intValue());
  450. in.putExtra("LikeRoleId", getRoleId(tvInformationFactory.getText().toString()) + "");
  451. startActivityFinish(in);
  452. }
  453. private List<String> uploadimgpaths1 = new ArrayList<>();
  454. private List<String> uploadimgpaths2 = new ArrayList<>();
  455. @Override
  456. protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
  457. super.onActivityResult(requestCode, resultCode, data);
  458. if (resultCode == Activity.RESULT_OK && requestCode == REQUEST_LICENSE_CHOOSE_FROM_GALLERY) {
  459. //执业执照回调
  460. List<String> selectedPhotos = BGAPhotoPickerActivity.getSelectedPhotos(data);
  461. uploadimgpaths1.clear();
  462. uploadimgpaths1.addAll(selectedPhotos);
  463. //attcEtImgcount.setText("照片数量:" + uploadimgpaths1.size() + "张");
  464. // BGAImage.display(attcEtLicense, R.mipmap.iv_upload_icon, selectedPhotos.get(0), AutoSizeUtils.dp2px(this, 77), AutoSizeUtils.dp2px(this, 43));
  465. mPhotosSnpl.addMoreData(BGAPhotoPickerActivity.getSelectedPhotos(data));
  466. Log.e("uploadimgpaths1", "" + uploadimgpaths1.toString());
  467. } else if (resultCode == Activity.RESULT_OK && requestCode == REQUEST_PROVE_CHOOSE_FROM_GALLERY) {
  468. //授权证明回调
  469. String picturePath = BGAPhotoPickerActivity.getSelectedPhotos(data).get(0);
  470. uploadimgpaths2.clear();
  471. uploadimgpaths2.add(picturePath);
  472. BGAImage.display(attcEtProve, R.mipmap.iv_upload_icon, picturePath, AutoSizeUtils.dp2px(this, 77), AutoSizeUtils.dp2px(this, 43));
  473. Log.e("uploadimgpaths2", "" + uploadimgpaths2.toString());
  474. }
  475. }
  476. @Override
  477. public void onClickAddNinePhotoItem(BGASortableNinePhotoLayout sortableNinePhotoLayout, View view, int position, ArrayList<String> models) {
  478. Intent photoPickerIntent = new BGAPhotoPickerActivity.IntentBuilder(this)
  479. .cameraFileDir(takePhotoDir) // 拍照后照片的存放目录,改成你自己拍照后要存放照片的目录。如果不传递该参数的话则不开启图库里的拍照功能
  480. .maxChooseCount(mPhotosSnpl.getMaxItemCount() - mPhotosSnpl.getItemCount()) // 图片选择张数的最大值
  481. .selectedPhotos(null) // 当前已选中的图片路径集合
  482. .pauseOnScroll(false) // 滚动列表时是否暂停加载图片
  483. .build();
  484. startActivityForResult(photoPickerIntent, REQUEST_LICENSE_CHOOSE_FROM_GALLERY);
  485. }
  486. @Override
  487. public void onClickDeleteNinePhotoItem(BGASortableNinePhotoLayout sortableNinePhotoLayout, View view, int position, String model, ArrayList<String> models) {
  488. mPhotosSnpl.removeItem(position);
  489. }
  490. @Override
  491. public void onClickNinePhotoItem(BGASortableNinePhotoLayout sortableNinePhotoLayout, View view, int position, String model, ArrayList<String> models) {
  492. Intent photoPickerPreviewIntent = new BGAPhotoPickerPreviewActivity.IntentBuilder(this)
  493. .previewPhotos(models) // 当前预览的图片路径集合
  494. .selectedPhotos(models) // 当前已选中的图片路径集合
  495. .maxChooseCount(mPhotosSnpl.getMaxItemCount()) // 图片选择张数的最大值
  496. .currentPosition(position) // 当前预览图片的索引
  497. .isFromTakePhoto(false) // 是否是拍完照后跳转过来
  498. .build();
  499. startActivityForResult(photoPickerPreviewIntent, REQUEST_LICENSE_PHOTO_PREVIEW);
  500. }
  501. @Override
  502. public void onNinePhotoItemExchanged(BGASortableNinePhotoLayout sortableNinePhotoLayout, int fromPosition, int toPosition, ArrayList<String> models) {
  503. }
  504. }