Commit 26341737ce562fadad5bbd4d792f50501327475e
Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/newModuleStrike
Conflicts: core/dentity_verfication/src/main/res/values/color.xml core/dentity_verfication/src/main/res/values/strings.xml
Showing
13 changed files
with
187 additions
and
83 deletions
core/dentity_verfication/src/main/java/com/cnlive/core/people_verfication/activity/TakeIdentityPictureActivity.java
| @@ -5,6 +5,7 @@ import android.Manifest; | @@ -5,6 +5,7 @@ import android.Manifest; | ||
| 5 | import android.app.Activity; | 5 | import android.app.Activity; |
| 6 | import android.content.Intent; | 6 | import android.content.Intent; |
| 7 | import android.text.TextUtils; | 7 | import android.text.TextUtils; |
| 8 | +import android.view.View; | ||
| 8 | 9 | ||
| 9 | import com.baidu.ocr.sdk.model.IDCardParams; | 10 | import com.baidu.ocr.sdk.model.IDCardParams; |
| 10 | import com.cnlive.core.libs.base.frame.activity.BaseActivity; | 11 | import com.cnlive.core.libs.base.frame.activity.BaseActivity; |
| @@ -68,18 +69,23 @@ public class TakeIdentityPictureActivity extends BaseActivity<TakeIdentityPictur | @@ -68,18 +69,23 @@ public class TakeIdentityPictureActivity extends BaseActivity<TakeIdentityPictur | ||
| 68 | } | 69 | } |
| 69 | preViewClickTime = curClickTime; | 70 | preViewClickTime = curClickTime; |
| 70 | preViewClickId = id; | 71 | preViewClickId = id; |
| 71 | - if (id == R.id.certificate_front) { | 72 | + if (id == R.id.certificate_front_ry) { |
| 72 | if (hasCampermission(CAMERA_WRITE_FR_PERMISSION)) {//权限判断 | 73 | if (hasCampermission(CAMERA_WRITE_FR_PERMISSION)) {//权限判断 |
| 73 | getMvpView().takeIdCardPictures(this, ICertificatePhohosView.ID_CARD_SIDE_FRONT); | 74 | getMvpView().takeIdCardPictures(this, ICertificatePhohosView.ID_CARD_SIDE_FRONT); |
| 74 | } | 75 | } |
| 75 | - } else if (id == R.id.certificate_back) { | 76 | + } else if (id == R.id.certificate_back_ry) { |
| 76 | if (hasCampermission(CAMERA_WRITE_BA_PERMISSION)) {//权限判断 | 77 | if (hasCampermission(CAMERA_WRITE_BA_PERMISSION)) {//权限判断 |
| 77 | getMvpView().takeIdCardPictures(this, ICertificatePhohosView.ID_CARD_SIDE_BACK); | 78 | getMvpView().takeIdCardPictures(this, ICertificatePhohosView.ID_CARD_SIDE_BACK); |
| 78 | } | 79 | } |
| 79 | - } else if (id == R.id.take_picture) { | 80 | + } else if (id == R.id.take_picture_ry) { |
| 80 | if (hasCampermission(CAMERA_WRITE_PI_PERMISSION)) { | 81 | if (hasCampermission(CAMERA_WRITE_PI_PERMISSION)) { |
| 81 | getMvpView().showDialog(); | 82 | getMvpView().showDialog(); |
| 82 | } | 83 | } |
| 84 | + }else if(id == R.id.next){ | ||
| 85 | + if (binding.frontTx.getVisibility() == View.VISIBLE && binding.backTx.getVisibility() == View.VISIBLE | ||
| 86 | + && binding.picTx.getVisibility() == View.VISIBLE) { | ||
| 87 | + | ||
| 88 | + } | ||
| 83 | } | 89 | } |
| 84 | } | 90 | } |
| 85 | 91 |
core/dentity_verfication/src/main/java/com/cnlive/core/people_verfication/view/TakeIdentityPictureView.java
| @@ -6,11 +6,8 @@ import android.content.Context; | @@ -6,11 +6,8 @@ import android.content.Context; | ||
| 6 | import android.content.Intent; | 6 | import android.content.Intent; |
| 7 | import android.graphics.Bitmap; | 7 | import android.graphics.Bitmap; |
| 8 | import android.graphics.BitmapFactory; | 8 | import android.graphics.BitmapFactory; |
| 9 | +import android.graphics.Matrix; | ||
| 9 | import android.hardware.Camera; | 10 | import android.hardware.Camera; |
| 10 | - | ||
| 11 | -import com.cnlive.media.picker.ImagePicker; | ||
| 12 | -import com.cnlive.media.picker.PickerConfig; | ||
| 13 | - | ||
| 14 | import android.media.FaceDetector; | 11 | import android.media.FaceDetector; |
| 15 | import android.os.Environment; | 12 | import android.os.Environment; |
| 16 | import android.os.Handler; | 13 | import android.os.Handler; |
| @@ -40,13 +37,14 @@ import com.cnlive.core.ocr.ui.camera.CameraActivity; | @@ -40,13 +37,14 @@ import com.cnlive.core.ocr.ui.camera.CameraActivity; | ||
| 40 | import com.cnlive.core.ocr.ui.util.ImageUtil; | 37 | import com.cnlive.core.ocr.ui.util.ImageUtil; |
| 41 | import com.cnlive.core.people_verfication.R; | 38 | import com.cnlive.core.people_verfication.R; |
| 42 | import com.cnlive.core.people_verfication.activity.TakeIdentityPictureActivity; | 39 | import com.cnlive.core.people_verfication.activity.TakeIdentityPictureActivity; |
| 40 | +import com.cnlive.media.picker.ImagePicker; | ||
| 41 | +import com.cnlive.media.picker.PickerConfig; | ||
| 43 | import com.cnlive.media.picker.utils.ImagePickerComUtils; | 42 | import com.cnlive.media.picker.utils.ImagePickerComUtils; |
| 44 | 43 | ||
| 45 | import java.io.File; | 44 | import java.io.File; |
| 46 | import java.text.SimpleDateFormat; | 45 | import java.text.SimpleDateFormat; |
| 47 | import java.util.Date; | 46 | import java.util.Date; |
| 48 | 47 | ||
| 49 | - | ||
| 50 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_BACK; | 48 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_BACK; |
| 51 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_FRONT; | 49 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_FRONT; |
| 52 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_GENERAL; | 50 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_GENERAL; |
| @@ -150,6 +148,7 @@ public class TakeIdentityPictureView extends BaseView { | @@ -150,6 +148,7 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 150 | * @param imageView | 148 | * @param imageView |
| 151 | */ | 149 | */ |
| 152 | public void showIdCard(String idCardSide, Bitmap bitmap, ImageView imageView) { | 150 | public void showIdCard(String idCardSide, Bitmap bitmap, ImageView imageView) { |
| 151 | + bitmap = getNewBitmap(bitmap, 320, 180); | ||
| 153 | RequestOptions options = new RequestOptions(); | 152 | RequestOptions options = new RequestOptions(); |
| 154 | options.skipMemoryCache(true); | 153 | options.skipMemoryCache(true); |
| 155 | options.diskCacheStrategy(DiskCacheStrategy.NONE); | 154 | options.diskCacheStrategy(DiskCacheStrategy.NONE); |
| @@ -191,24 +190,22 @@ public class TakeIdentityPictureView extends BaseView { | @@ -191,24 +190,22 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 191 | public void onResult(IDCardResult idCardResult) { | 190 | public void onResult(IDCardResult idCardResult) { |
| 192 | if (idCardResult != null) { | 191 | if (idCardResult != null) { |
| 193 | if (isEffectiveFront(idCardResult) || isEffectiveBack(idCardResult)) { | 192 | if (isEffectiveFront(idCardResult) || isEffectiveBack(idCardResult)) { |
| 194 | - Bitmap bitmap = ImageUtil.drawTextToRightBottom(getContext(), BitmapFactory.decodeFile(filePath), getContext().getString(R.string.only_for_verified), 20, getContext().getResources().getColor(R.color.grayText), 10, 10); | 193 | + Bitmap bitmap = ImageUtil.drawTextToRightBottom(getContext(), BitmapFactory.decodeFile(filePath), getContext().getString(R.string.only_for_verified), 15, getContext().getResources().getColor(R.color.grayText), 10, 10); |
| 195 | 194 | ||
| 196 | if (idCardSide.equals(IDCardParams.ID_CARD_SIDE_FRONT)) { | 195 | if (idCardSide.equals(IDCardParams.ID_CARD_SIDE_FRONT)) { |
| 197 | isFrontEffective = true; | 196 | isFrontEffective = true; |
| 198 | idCardNo = idCardResult.getIdNumber().toString(); | 197 | idCardNo = idCardResult.getIdNumber().toString(); |
| 199 | realName = idCardResult.getName().toString(); | 198 | realName = idCardResult.getName().toString(); |
| 200 | if (TextUtils.isEmpty(idCardNo) || TextUtils.isEmpty(realName)) { | 199 | if (TextUtils.isEmpty(idCardNo) || TextUtils.isEmpty(realName)) { |
| 201 | -// activity.binding.submit.setClickable(false); | 200 | + activity.binding.next.setClickable(false); |
| 202 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); | 201 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 203 | return; | 202 | return; |
| 204 | } | 203 | } |
| 205 | frontBitmap = bitmap; | 204 | frontBitmap = bitmap; |
| 205 | + activity.binding.frontTx.setVisibility(View.VISIBLE); | ||
| 206 | showIdCard(idCardSide, frontBitmap, activity.binding.certificateFront); | 206 | showIdCard(idCardSide, frontBitmap, activity.binding.certificateFront); |
| 207 | - activity.binding.certificateFront.setImageBitmap(bitmap); | ||
| 208 | if (isBackEffective) { | 207 | if (isBackEffective) { |
| 209 | -// activity.binding.submit.setClickable(true); | ||
| 210 | -// activity.binding.submit.setTextColor(activity.getResources().getColor(R.color.white)); | ||
| 211 | -// activity.binding.submit.setBackground(getContext().getResources().getDrawable(R.drawable.bg_apply_btn)); | 208 | + setNextShowColor(); |
| 212 | } | 209 | } |
| 213 | } | 210 | } |
| 214 | 211 | ||
| @@ -217,14 +214,12 @@ public class TakeIdentityPictureView extends BaseView { | @@ -217,14 +214,12 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 217 | isBackEffective = true; | 214 | isBackEffective = true; |
| 218 | if (TextUtils.isEmpty(idCardResult.getIssueAuthority().toString().trim()) || | 215 | if (TextUtils.isEmpty(idCardResult.getIssueAuthority().toString().trim()) || |
| 219 | TextUtils.isEmpty(idCardResult.getSignDate().toString().trim())) { | 216 | TextUtils.isEmpty(idCardResult.getSignDate().toString().trim())) { |
| 220 | -// activity.binding.submit.setClickable(false); | ||
| 221 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); | 217 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 222 | return; | 218 | return; |
| 223 | } | 219 | } |
| 224 | try { | 220 | try { |
| 225 | Integer.parseInt(idCardResult.getExpiryDate().toString().trim()); | 221 | Integer.parseInt(idCardResult.getExpiryDate().toString().trim()); |
| 226 | if (idCardResult.getExpiryDate() != null && Integer.parseInt(idCardResult.getExpiryDate().toString().trim()) < getCurrentTime()) { | 222 | if (idCardResult.getExpiryDate() != null && Integer.parseInt(idCardResult.getExpiryDate().toString().trim()) < getCurrentTime()) { |
| 227 | -// activity.binding.submit.setClickable(false); | ||
| 228 | AlertUtil.showDeftToast(getContext(), "身份证有效期失效"); | 223 | AlertUtil.showDeftToast(getContext(), "身份证有效期失效"); |
| 229 | return; | 224 | return; |
| 230 | } | 225 | } |
| @@ -232,17 +227,14 @@ public class TakeIdentityPictureView extends BaseView { | @@ -232,17 +227,14 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 232 | e.printStackTrace(); | 227 | e.printStackTrace(); |
| 233 | } | 228 | } |
| 234 | 229 | ||
| 235 | - | 230 | + activity.binding.backTx.setVisibility(View.VISIBLE); |
| 236 | showIdCard(idCardSide, backBitmap, activity.binding.certificateBack); | 231 | showIdCard(idCardSide, backBitmap, activity.binding.certificateBack); |
| 237 | activity.binding.certificateBack.setImageBitmap(bitmap); | 232 | activity.binding.certificateBack.setImageBitmap(bitmap); |
| 238 | if (!TextUtils.isEmpty(idCardNo) && !TextUtils.isEmpty(realName)) { | 233 | if (!TextUtils.isEmpty(idCardNo) && !TextUtils.isEmpty(realName)) { |
| 239 | -// activity.binding.submit.setClickable(true); | ||
| 240 | -// activity.binding.submit.setTextColor(activity.getResources().getColor(R.color.white)); | ||
| 241 | -// activity.binding.submit.setBackground(getContext().getResources().getDrawable(R.drawable.bg_apply_btn)); | 234 | + setNextShowColor(); |
| 242 | } | 235 | } |
| 243 | } | 236 | } |
| 244 | } else { | 237 | } else { |
| 245 | -// activity.binding.submit.setClickable(false); | ||
| 246 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); | 238 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 247 | } | 239 | } |
| 248 | } | 240 | } |
| @@ -260,6 +252,21 @@ public class TakeIdentityPictureView extends BaseView { | @@ -260,6 +252,21 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 260 | 252 | ||
| 261 | } | 253 | } |
| 262 | 254 | ||
| 255 | + public Bitmap getNewBitmap(Bitmap bitmap, int newWidth, int newHeight) { | ||
| 256 | + // 获得图片的宽高. | ||
| 257 | + int width = bitmap.getWidth(); | ||
| 258 | + int height = bitmap.getHeight(); | ||
| 259 | + // 计算缩放比例. | ||
| 260 | + float scaleWidth = ((float) newWidth) / width; | ||
| 261 | + float scaleHeight = ((float) newHeight) / height; | ||
| 262 | + // 取得想要缩放的matrix参数. | ||
| 263 | + Matrix matrix = new Matrix(); | ||
| 264 | + matrix.postScale(scaleWidth, scaleHeight); | ||
| 265 | + // 得到新的图片. | ||
| 266 | + Bitmap newBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true); | ||
| 267 | + return newBitmap; | ||
| 268 | + } | ||
| 269 | + | ||
| 263 | private Integer getCurrentTime() { | 270 | private Integer getCurrentTime() { |
| 264 | SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMdd"); | 271 | SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| 265 | String date = sDateFormat.format(new Date()); | 272 | String date = sDateFormat.format(new Date()); |
| @@ -307,30 +314,49 @@ public class TakeIdentityPictureView extends BaseView { | @@ -307,30 +314,49 @@ public class TakeIdentityPictureView extends BaseView { | ||
| 307 | .selectMode(PickerConfig.PICKER_IMAGE) | 314 | .selectMode(PickerConfig.PICKER_IMAGE) |
| 308 | .cachePath(Environment.getExternalStorageDirectory() + "/strike/file/") | 315 | .cachePath(Environment.getExternalStorageDirectory() + "/strike/file/") |
| 309 | .isSinglePick(true) | 316 | .isSinglePick(true) |
| 310 | - .doCrop(1, 1, 300, 300) | 317 | + .doCrop(1, 1, 200, 200) |
| 311 | .builder() | 318 | .builder() |
| 312 | .start(activity, 200, PickerConfig.DEFAULT_RESULT_CODE); | 319 | .start(activity, 200, PickerConfig.DEFAULT_RESULT_CODE); |
| 313 | } | 320 | } |
| 314 | 321 | ||
| 315 | /** | 322 | /** |
| 316 | * 检测是否有人脸 | 323 | * 检测是否有人脸 |
| 324 | + * | ||
| 317 | * @param path | 325 | * @param path |
| 318 | */ | 326 | */ |
| 319 | - public void hasFace(String path){ | ||
| 320 | - int numberOfFace = 12; | ||
| 321 | - FaceDetector myFaceDetect; | ||
| 322 | - Bitmap bitmap = BitmapFactory.decodeFile(path); | ||
| 323 | - Bitmap bitmap565 = bitmap.copy(Bitmap.Config.RGB_565, true); | ||
| 324 | - int imageWidth = bitmap565.getWidth(); | ||
| 325 | - int imageHeight = bitmap565.getHeight(); | ||
| 326 | - FaceDetector.Face[] myFace = new FaceDetector.Face[numberOfFace]; | ||
| 327 | - myFaceDetect = new FaceDetector(imageWidth, imageHeight, numberOfFace); | ||
| 328 | - int numberOfFaceDetected = myFaceDetect.findFaces(bitmap565, myFace); | ||
| 329 | - AlertUtil.showDeftToast(getContext(), "检测到"+numberOfFaceDetected+"个人脸"); | ||
| 330 | - if(numberOfFaceDetected == 1) { | ||
| 331 | - GlideUtil.init(activity, path).error(R.drawable.take_photo).into(activity.binding.takePicture); | ||
| 332 | - }else if(new File(path).exists()){ | 327 | + public void hasFace(String path) { |
| 328 | + int numberOfFace = 12; | ||
| 329 | + FaceDetector myFaceDetect; | ||
| 330 | + Bitmap bitmap = BitmapFactory.decodeFile(path); | ||
| 331 | + Bitmap bitmap565 = bitmap.copy(Bitmap.Config.RGB_565, true); | ||
| 332 | + int imageWidth = bitmap565.getWidth(); | ||
| 333 | + int imageHeight = bitmap565.getHeight(); | ||
| 334 | + FaceDetector.Face[] myFace = new FaceDetector.Face[numberOfFace]; | ||
| 335 | + myFaceDetect = new FaceDetector(imageWidth, imageHeight, numberOfFace); | ||
| 336 | + int numberOfFaceDetected = myFaceDetect.findFaces(bitmap565, myFace); | ||
| 337 | + if (numberOfFaceDetected == 1) { | ||
| 338 | + setNextShowColor(); | ||
| 339 | + activity.binding.picTx.setVisibility(View.VISIBLE); | ||
| 340 | + GlideUtil.init(activity, path).error(R.drawable.upload).into(activity.binding.takePicture); | ||
| 341 | + setNextShowColor(); | ||
| 342 | + }else { | ||
| 343 | + AlertUtil.showDeftToast(getContext(), "请确保肩部至头部清晰可见"); | ||
| 344 | + if (new File(path).exists()) { | ||
| 333 | new File(path).delete(); | 345 | new File(path).delete(); |
| 334 | } | 346 | } |
| 347 | + } | ||
| 348 | + | ||
| 349 | + | ||
| 350 | + } | ||
| 351 | + | ||
| 352 | + private void setNextShowColor() { | ||
| 353 | + if (activity.binding.frontTx.getVisibility() == View.VISIBLE && activity.binding.backTx.getVisibility() == View.VISIBLE | ||
| 354 | + && activity.binding.picTx.getVisibility() == View.VISIBLE) { | ||
| 355 | + activity.binding.next.setTextColor(activity.getResources().getColor(R.color.white)); | ||
| 356 | + activity.binding.next.setBackground(getContext().getResources().getDrawable(R.drawable.bg_apply_btn)); | ||
| 357 | + }else { | ||
| 358 | + activity.binding.next.setTextColor(activity.getResources().getColor(R.color.color_b4b4b4)); | ||
| 359 | + activity.binding.next.setBackground(getContext().getResources().getDrawable(R.drawable.bg_shape_gray)); | ||
| 360 | + } | ||
| 335 | } | 361 | } |
| 336 | } | 362 | } |
core/dentity_verfication/src/main/res/drawable-hdpi/upload.png
0 → 100644
2.91 KB
core/dentity_verfication/src/main/res/drawable-xhdpi/upload.png
0 → 100644
4.11 KB
core/dentity_verfication/src/main/res/drawable-xxhdpi/upload.png
0 → 100644
7.85 KB
core/dentity_verfication/src/main/res/drawable/bg_apply_btn.xml
0 → 100644
core/dentity_verfication/src/main/res/drawable/bg_shape_gray.xml
0 → 100644
core/dentity_verfication/src/main/res/drawable/bg_six_shape.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + android:shape="rectangle"> | ||
| 4 | + <corners | ||
| 5 | + android:bottomLeftRadius="10dp" | ||
| 6 | + android:bottomRightRadius="10dp" /> | ||
| 7 | + <solid android:color="#66000000" /> | ||
| 8 | +</shape> | ||
| 0 | \ No newline at end of file | 9 | \ No newline at end of file |
core/dentity_verfication/src/main/res/drawable/take_photo.png deleted
100644 → 0
1.57 KB
core/dentity_verfication/src/main/res/layout/activity_take_picture.xml
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | <layout> | 2 | <layout> |
| 3 | 3 | ||
| 4 | <data> | 4 | <data> |
| 5 | + | ||
| 5 | <variable | 6 | <variable |
| 6 | name="click" | 7 | name="click" |
| 7 | type="android.view.View.OnClickListener" /> | 8 | type="android.view.View.OnClickListener" /> |
| @@ -12,6 +13,7 @@ | @@ -12,6 +13,7 @@ | ||
| 12 | xmlns:tools="http://schemas.android.com/tools" | 13 | xmlns:tools="http://schemas.android.com/tools" |
| 13 | android:layout_width="match_parent" | 14 | android:layout_width="match_parent" |
| 14 | android:layout_height="match_parent" | 15 | android:layout_height="match_parent" |
| 16 | + android:background="@color/white" | ||
| 15 | android:orientation="vertical" | 17 | android:orientation="vertical" |
| 16 | tools:context=".activity.TakeIdentityPictureActivity"> | 18 | tools:context=".activity.TakeIdentityPictureActivity"> |
| 17 | 19 | ||
| @@ -38,15 +40,15 @@ | @@ -38,15 +40,15 @@ | ||
| 38 | <TextView | 40 | <TextView |
| 39 | android:layout_width="wrap_content" | 41 | android:layout_width="wrap_content" |
| 40 | android:layout_height="wrap_content" | 42 | android:layout_height="wrap_content" |
| 41 | - android:layout_marginTop="11dp" | 43 | + android:layout_marginTop="10dp" |
| 42 | android:text="@string/step_one" | 44 | android:text="@string/step_one" |
| 43 | android:textColor="#ff1a1a1a" | 45 | android:textColor="#ff1a1a1a" |
| 44 | android:textSize="16sp" /> | 46 | android:textSize="16sp" /> |
| 45 | 47 | ||
| 46 | <LinearLayout | 48 | <LinearLayout |
| 47 | - android:layout_width="match_parent" | 49 | + android:layout_width="wrap_content" |
| 48 | android:layout_height="wrap_content" | 50 | android:layout_height="wrap_content" |
| 49 | - android:layout_marginTop="14dp" | 51 | + android:layout_marginTop="10dp" |
| 50 | android:orientation="horizontal"> | 52 | android:orientation="horizontal"> |
| 51 | 53 | ||
| 52 | <TextView | 54 | <TextView |
| @@ -71,28 +73,42 @@ | @@ -71,28 +73,42 @@ | ||
| 71 | android:textSize="12sp" /> | 73 | android:textSize="12sp" /> |
| 72 | 74 | ||
| 73 | </LinearLayout> | 75 | </LinearLayout> |
| 76 | + </LinearLayout> | ||
| 77 | + | ||
| 78 | + <RelativeLayout | ||
| 79 | + android:id="@+id/certificate_front_ry" | ||
| 80 | + android:layout_width="wrap_content" | ||
| 81 | + android:layout_height="wrap_content" | ||
| 82 | + android:layout_gravity="center_horizontal" | ||
| 83 | + android:layout_marginTop="10dp" | ||
| 84 | + android:onClick="@{click}"> | ||
| 74 | 85 | ||
| 75 | <ImageView | 86 | <ImageView |
| 76 | android:id="@+id/certificate_front" | 87 | android:id="@+id/certificate_front" |
| 77 | - android:layout_width="wrap_content" | 88 | + android:layout_width="280dp" |
| 78 | android:layout_height="wrap_content" | 89 | android:layout_height="wrap_content" |
| 79 | - android:layout_gravity="center_horizontal" | ||
| 80 | - android:layout_marginTop="12dp" | ||
| 81 | - android:layout_marginBottom="22dp" | ||
| 82 | - android:onClick="@{click}" | ||
| 83 | android:src="@drawable/observer_idcard_front" /> | 90 | android:src="@drawable/observer_idcard_front" /> |
| 84 | 91 | ||
| 85 | - </LinearLayout> | 92 | + <TextView |
| 93 | + android:id="@+id/front_tx" | ||
| 94 | + android:layout_width="280dp" | ||
| 95 | + android:layout_height="30dp" | ||
| 96 | + android:layout_alignParentBottom="true" | ||
| 97 | + android:background="#66000000" | ||
| 98 | + android:visibility="gone" | ||
| 99 | + android:gravity="center" | ||
| 100 | + android:text="@string/change" | ||
| 101 | + android:textColor="@color/white" | ||
| 102 | + android:textSize="14sp" /> | ||
| 103 | + </RelativeLayout> | ||
| 86 | 104 | ||
| 87 | - <View | ||
| 88 | - android:layout_width="match_parent" | ||
| 89 | - android:layout_height="10dp" | ||
| 90 | - android:background="#f2f2f2" /> | ||
| 91 | <LinearLayout | 105 | <LinearLayout |
| 92 | android:layout_width="wrap_content" | 106 | android:layout_width="wrap_content" |
| 93 | android:layout_height="wrap_content" | 107 | android:layout_height="wrap_content" |
| 94 | android:layout_gravity="center_horizontal" | 108 | android:layout_gravity="center_horizontal" |
| 109 | + android:layout_marginTop="30dp" | ||
| 95 | android:orientation="vertical"> | 110 | android:orientation="vertical"> |
| 111 | + | ||
| 96 | <TextView | 112 | <TextView |
| 97 | android:layout_width="wrap_content" | 113 | android:layout_width="wrap_content" |
| 98 | android:layout_height="wrap_content" | 114 | android:layout_height="wrap_content" |
| @@ -102,9 +118,9 @@ | @@ -102,9 +118,9 @@ | ||
| 102 | android:textSize="16sp" /> | 118 | android:textSize="16sp" /> |
| 103 | 119 | ||
| 104 | <LinearLayout | 120 | <LinearLayout |
| 105 | - android:layout_width="match_parent" | 121 | + android:layout_width="wrap_content" |
| 106 | android:layout_height="wrap_content" | 122 | android:layout_height="wrap_content" |
| 107 | - android:layout_marginTop="14dp" | 123 | + android:layout_marginTop="10dp" |
| 108 | android:orientation="horizontal"> | 124 | android:orientation="horizontal"> |
| 109 | 125 | ||
| 110 | <TextView | 126 | <TextView |
| @@ -129,28 +145,40 @@ | @@ -129,28 +145,40 @@ | ||
| 129 | android:textSize="12sp" /> | 145 | android:textSize="12sp" /> |
| 130 | 146 | ||
| 131 | </LinearLayout> | 147 | </LinearLayout> |
| 148 | + </LinearLayout> | ||
| 149 | + | ||
| 150 | + <RelativeLayout | ||
| 151 | + android:id="@+id/certificate_back_ry" | ||
| 152 | + android:layout_width="wrap_content" | ||
| 153 | + android:layout_height="wrap_content" | ||
| 154 | + android:layout_gravity="center_horizontal" | ||
| 155 | + android:layout_marginTop="10dp" | ||
| 156 | + android:onClick="@{click}"> | ||
| 132 | 157 | ||
| 133 | <ImageView | 158 | <ImageView |
| 134 | android:id="@+id/certificate_back" | 159 | android:id="@+id/certificate_back" |
| 135 | - android:layout_width="wrap_content" | 160 | + android:layout_width="280dp" |
| 136 | android:layout_height="wrap_content" | 161 | android:layout_height="wrap_content" |
| 137 | - android:layout_gravity="center_horizontal" | ||
| 138 | - android:layout_marginTop="12dp" | ||
| 139 | - android:layout_marginBottom="22dp" | ||
| 140 | - android:onClick="@{click}" | ||
| 141 | android:src="@drawable/observer_idcard_back" /> | 162 | android:src="@drawable/observer_idcard_back" /> |
| 142 | - </LinearLayout> | ||
| 143 | 163 | ||
| 144 | - | ||
| 145 | - <View | ||
| 146 | - android:layout_width="match_parent" | ||
| 147 | - android:layout_height="10dp" | ||
| 148 | - android:background="#f2f2f2" /> | 164 | + <TextView |
| 165 | + android:id="@+id/back_tx" | ||
| 166 | + android:layout_width="280dp" | ||
| 167 | + android:layout_height="30dp" | ||
| 168 | + android:layout_alignParentBottom="true" | ||
| 169 | + android:background="#66000000" | ||
| 170 | + android:visibility="gone" | ||
| 171 | + android:gravity="center" | ||
| 172 | + android:text="@string/change" | ||
| 173 | + android:textColor="@color/white" | ||
| 174 | + android:textSize="14sp" /> | ||
| 175 | + </RelativeLayout> | ||
| 149 | 176 | ||
| 150 | <LinearLayout | 177 | <LinearLayout |
| 151 | android:layout_width="wrap_content" | 178 | android:layout_width="wrap_content" |
| 152 | android:layout_height="wrap_content" | 179 | android:layout_height="wrap_content" |
| 153 | android:layout_gravity="center_horizontal" | 180 | android:layout_gravity="center_horizontal" |
| 181 | + android:layout_marginTop="30dp" | ||
| 154 | android:orientation="vertical"> | 182 | android:orientation="vertical"> |
| 155 | 183 | ||
| 156 | <TextView | 184 | <TextView |
| @@ -161,31 +189,54 @@ | @@ -161,31 +189,54 @@ | ||
| 161 | android:textColor="#ff1a1a1a" | 189 | android:textColor="#ff1a1a1a" |
| 162 | android:textSize="16sp" /> | 190 | android:textSize="16sp" /> |
| 163 | 191 | ||
| 164 | - <LinearLayout | ||
| 165 | - android:layout_width="match_parent" | 192 | + <TextView |
| 193 | + android:layout_width="wrap_content" | ||
| 166 | android:layout_height="wrap_content" | 194 | android:layout_height="wrap_content" |
| 167 | - android:layout_marginTop="14dp" | ||
| 168 | - android:orientation="horizontal"> | 195 | + android:layout_marginTop="10dp" |
| 196 | + android:text="@string/take_photo_yourself" | ||
| 197 | + android:textColor="@color/color_9c9c9c" | ||
| 198 | + android:textSize="12sp" /> | ||
| 169 | 199 | ||
| 170 | - <TextView | ||
| 171 | - android:layout_width="wrap_content" | ||
| 172 | - android:layout_height="wrap_content" | ||
| 173 | - android:text="@string/take_photo_yourself" | ||
| 174 | - android:textColor="@color/color_9c9c9c" | ||
| 175 | - android:textSize="12sp" /> | 200 | + </LinearLayout> |
| 176 | 201 | ||
| 177 | - </LinearLayout> | 202 | + <RelativeLayout |
| 203 | + android:id="@+id/take_picture_ry" | ||
| 204 | + android:layout_width="wrap_content" | ||
| 205 | + android:layout_height="wrap_content" | ||
| 206 | + android:layout_gravity="center_horizontal" | ||
| 207 | + android:layout_marginTop="10dp" | ||
| 208 | + android:onClick="@{click}"> | ||
| 178 | 209 | ||
| 179 | <ImageView | 210 | <ImageView |
| 180 | android:id="@+id/take_picture" | 211 | android:id="@+id/take_picture" |
| 181 | - android:layout_width="wrap_content" | 212 | + android:layout_width="130dp" |
| 182 | android:layout_height="wrap_content" | 213 | android:layout_height="wrap_content" |
| 183 | - android:layout_marginTop="12dp" | ||
| 184 | - android:layout_marginBottom="22dp" | ||
| 185 | - android:onClick="@{click}" | ||
| 186 | - android:src="@drawable/take_photo" /> | ||
| 187 | - </LinearLayout> | 214 | + android:src="@drawable/upload" /> |
| 188 | 215 | ||
| 216 | + <TextView | ||
| 217 | + android:id="@+id/pic_tx" | ||
| 218 | + android:layout_width="130dp" | ||
| 219 | + android:layout_height="30dp" | ||
| 220 | + android:layout_alignParentBottom="true" | ||
| 221 | + android:visibility="gone" | ||
| 222 | + android:background="#66000000" | ||
| 223 | + android:gravity="center" | ||
| 224 | + android:text="@string/change" | ||
| 225 | + android:textColor="@color/white" | ||
| 226 | + android:textSize="14sp" /> | ||
| 227 | + </RelativeLayout> | ||
| 228 | + | ||
| 229 | + <TextView | ||
| 230 | + android:id="@+id/next" | ||
| 231 | + android:layout_width="match_parent" | ||
| 232 | + android:layout_height="45dp" | ||
| 233 | + android:layout_margin="30dp" | ||
| 234 | + android:background="@drawable/bg_shape_gray" | ||
| 235 | + android:gravity="center" | ||
| 236 | + android:text="@string/next" | ||
| 237 | + android:textColor="@color/color_b4b4b4" | ||
| 238 | + android:onClick="@{click}" | ||
| 239 | + android:textSize="18sp" /> | ||
| 189 | </LinearLayout> | 240 | </LinearLayout> |
| 190 | </ScrollView> | 241 | </ScrollView> |
| 191 | </LinearLayout> | 242 | </LinearLayout> |
core/dentity_verfication/src/main/res/values/color.xml
| @@ -33,4 +33,5 @@ | @@ -33,4 +33,5 @@ | ||
| 33 | <color name="color_C1C1C1">#C1C1C1</color> | 33 | <color name="color_C1C1C1">#C1C1C1</color> |
| 34 | <color name="color_F9F9F9">#F9F9F9</color> | 34 | <color name="color_F9F9F9">#F9F9F9</color> |
| 35 | <color name="color_4EABFD">#4EABFD</color> | 35 | <color name="color_4EABFD">#4EABFD</color> |
| 36 | + <color name="color_b4b4b4">#B4B4B4</color> | ||
| 36 | </resources> | 37 | </resources> |
| 37 | \ No newline at end of file | 38 | \ No newline at end of file |
core/dentity_verfication/src/main/res/values/strings.xml
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | <string name="step_tow">第二步</string> | 8 | <string name="step_tow">第二步</string> |
| 9 | <string name="back">反面</string> | 9 | <string name="back">反面</string> |
| 10 | <string name="step_third">第三步</string> | 10 | <string name="step_third">第三步</string> |
| 11 | - <string name="take_photo_yourself">请您拍摄本人照片,确保肩部至头部清晰可见</string> | 11 | + <string name="take_photo_yourself">请上传您本人照片,确保肩部至头部清晰可见</string> |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | <string name="init_baidu_faile">初始化失败</string> | 14 | <string name="init_baidu_faile">初始化失败</string> |
| @@ -16,6 +16,8 @@ | @@ -16,6 +16,8 @@ | ||
| 16 | <string name="tak_picture">拍摄</string> | 16 | <string name="tak_picture">拍摄</string> |
| 17 | <string name="to_picture">从手机相册选择</string> | 17 | <string name="to_picture">从手机相册选择</string> |
| 18 | <string name="cancle">取消</string> | 18 | <string name="cancle">取消</string> |
| 19 | + <string name="next">下一步</string> | ||
| 20 | + <string name="change">更改</string> | ||
| 19 | 21 | ||
| 20 | <string name="string_fill_in_company_data_license_tip">我同意并已阅读<font color="#4EABFD">《中国网+内容安全协议》</font></string> | 22 | <string name="string_fill_in_company_data_license_tip">我同意并已阅读<font color="#4EABFD">《中国网+内容安全协议》</font></string> |
| 21 | </resources> | 23 | </resources> |
module/pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/CalorieEntityDao.java
| @@ -3,13 +3,13 @@ package com.cnlive.moudle.pedometer.sql.dao; | @@ -3,13 +3,13 @@ package com.cnlive.moudle.pedometer.sql.dao; | ||
| 3 | import android.database.Cursor; | 3 | import android.database.Cursor; |
| 4 | import android.database.sqlite.SQLiteStatement; | 4 | import android.database.sqlite.SQLiteStatement; |
| 5 | 5 | ||
| 6 | +import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity; | ||
| 7 | + | ||
| 6 | import org.greenrobot.greendao.AbstractDao; | 8 | import org.greenrobot.greendao.AbstractDao; |
| 7 | import org.greenrobot.greendao.Property; | 9 | import org.greenrobot.greendao.Property; |
| 8 | -import org.greenrobot.greendao.internal.DaoConfig; | ||
| 9 | import org.greenrobot.greendao.database.Database; | 10 | import org.greenrobot.greendao.database.Database; |
| 10 | import org.greenrobot.greendao.database.DatabaseStatement; | 11 | import org.greenrobot.greendao.database.DatabaseStatement; |
| 11 | - | ||
| 12 | -import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity; | 12 | +import org.greenrobot.greendao.internal.DaoConfig; |
| 13 | 13 | ||
| 14 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. | 14 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| 15 | /** | 15 | /** |