Commit d39ea1cf642c46d4f24872fe67cef820447214ed
1 parent
25c70ef2
身份认证页面UI修改,显示点击逻辑修改
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 | 5 | import android.app.Activity; |
| 6 | 6 | import android.content.Intent; |
| 7 | 7 | import android.text.TextUtils; |
| 8 | +import android.view.View; | |
| 8 | 9 | |
| 9 | 10 | import com.baidu.ocr.sdk.model.IDCardParams; |
| 10 | 11 | import com.cnlive.core.libs.base.frame.activity.BaseActivity; |
| ... | ... | @@ -68,18 +69,23 @@ public class TakeIdentityPictureActivity extends BaseActivity<TakeIdentityPictur |
| 68 | 69 | } |
| 69 | 70 | preViewClickTime = curClickTime; |
| 70 | 71 | preViewClickId = id; |
| 71 | - if (id == R.id.certificate_front) { | |
| 72 | + if (id == R.id.certificate_front_ry) { | |
| 72 | 73 | if (hasCampermission(CAMERA_WRITE_FR_PERMISSION)) {//权限判断 |
| 73 | 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 | 77 | if (hasCampermission(CAMERA_WRITE_BA_PERMISSION)) {//权限判断 |
| 77 | 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 | 81 | if (hasCampermission(CAMERA_WRITE_PI_PERMISSION)) { |
| 81 | 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 | 6 | import android.content.Intent; |
| 7 | 7 | import android.graphics.Bitmap; |
| 8 | 8 | import android.graphics.BitmapFactory; |
| 9 | +import android.graphics.Matrix; | |
| 9 | 10 | import android.hardware.Camera; |
| 10 | - | |
| 11 | -import com.cnlive.media.picker.ImagePicker; | |
| 12 | -import com.cnlive.media.picker.PickerConfig; | |
| 13 | - | |
| 14 | 11 | import android.media.FaceDetector; |
| 15 | 12 | import android.os.Environment; |
| 16 | 13 | import android.os.Handler; |
| ... | ... | @@ -40,13 +37,14 @@ import com.cnlive.core.ocr.ui.camera.CameraActivity; |
| 40 | 37 | import com.cnlive.core.ocr.ui.util.ImageUtil; |
| 41 | 38 | import com.cnlive.core.people_verfication.R; |
| 42 | 39 | import com.cnlive.core.people_verfication.activity.TakeIdentityPictureActivity; |
| 40 | +import com.cnlive.media.picker.ImagePicker; | |
| 41 | +import com.cnlive.media.picker.PickerConfig; | |
| 43 | 42 | import com.cnlive.media.picker.utils.ImagePickerComUtils; |
| 44 | 43 | |
| 45 | 44 | import java.io.File; |
| 46 | 45 | import java.text.SimpleDateFormat; |
| 47 | 46 | import java.util.Date; |
| 48 | 47 | |
| 49 | - | |
| 50 | 48 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_BACK; |
| 51 | 49 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_FRONT; |
| 52 | 50 | import static com.cnlive.core.people_verfication.view.ICertificatePhohosView.PIC_GENERAL; |
| ... | ... | @@ -150,6 +148,7 @@ public class TakeIdentityPictureView extends BaseView { |
| 150 | 148 | * @param imageView |
| 151 | 149 | */ |
| 152 | 150 | public void showIdCard(String idCardSide, Bitmap bitmap, ImageView imageView) { |
| 151 | + bitmap = getNewBitmap(bitmap, 320, 180); | |
| 153 | 152 | RequestOptions options = new RequestOptions(); |
| 154 | 153 | options.skipMemoryCache(true); |
| 155 | 154 | options.diskCacheStrategy(DiskCacheStrategy.NONE); |
| ... | ... | @@ -191,24 +190,22 @@ public class TakeIdentityPictureView extends BaseView { |
| 191 | 190 | public void onResult(IDCardResult idCardResult) { |
| 192 | 191 | if (idCardResult != null) { |
| 193 | 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 | 195 | if (idCardSide.equals(IDCardParams.ID_CARD_SIDE_FRONT)) { |
| 197 | 196 | isFrontEffective = true; |
| 198 | 197 | idCardNo = idCardResult.getIdNumber().toString(); |
| 199 | 198 | realName = idCardResult.getName().toString(); |
| 200 | 199 | if (TextUtils.isEmpty(idCardNo) || TextUtils.isEmpty(realName)) { |
| 201 | -// activity.binding.submit.setClickable(false); | |
| 200 | + activity.binding.next.setClickable(false); | |
| 202 | 201 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 203 | 202 | return; |
| 204 | 203 | } |
| 205 | 204 | frontBitmap = bitmap; |
| 205 | + activity.binding.frontTx.setVisibility(View.VISIBLE); | |
| 206 | 206 | showIdCard(idCardSide, frontBitmap, activity.binding.certificateFront); |
| 207 | - activity.binding.certificateFront.setImageBitmap(bitmap); | |
| 208 | 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 | 214 | isBackEffective = true; |
| 218 | 215 | if (TextUtils.isEmpty(idCardResult.getIssueAuthority().toString().trim()) || |
| 219 | 216 | TextUtils.isEmpty(idCardResult.getSignDate().toString().trim())) { |
| 220 | -// activity.binding.submit.setClickable(false); | |
| 221 | 217 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 222 | 218 | return; |
| 223 | 219 | } |
| 224 | 220 | try { |
| 225 | 221 | Integer.parseInt(idCardResult.getExpiryDate().toString().trim()); |
| 226 | 222 | if (idCardResult.getExpiryDate() != null && Integer.parseInt(idCardResult.getExpiryDate().toString().trim()) < getCurrentTime()) { |
| 227 | -// activity.binding.submit.setClickable(false); | |
| 228 | 223 | AlertUtil.showDeftToast(getContext(), "身份证有效期失效"); |
| 229 | 224 | return; |
| 230 | 225 | } |
| ... | ... | @@ -232,17 +227,14 @@ public class TakeIdentityPictureView extends BaseView { |
| 232 | 227 | e.printStackTrace(); |
| 233 | 228 | } |
| 234 | 229 | |
| 235 | - | |
| 230 | + activity.binding.backTx.setVisibility(View.VISIBLE); | |
| 236 | 231 | showIdCard(idCardSide, backBitmap, activity.binding.certificateBack); |
| 237 | 232 | activity.binding.certificateBack.setImageBitmap(bitmap); |
| 238 | 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 | 237 | } else { |
| 245 | -// activity.binding.submit.setClickable(false); | |
| 246 | 238 | AlertUtil.showDeftToast(getContext(), "身份证信息读取失败,请重新拍摄"); |
| 247 | 239 | } |
| 248 | 240 | } |
| ... | ... | @@ -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 | 270 | private Integer getCurrentTime() { |
| 264 | 271 | SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| 265 | 272 | String date = sDateFormat.format(new Date()); |
| ... | ... | @@ -307,30 +314,49 @@ public class TakeIdentityPictureView extends BaseView { |
| 307 | 314 | .selectMode(PickerConfig.PICKER_IMAGE) |
| 308 | 315 | .cachePath(Environment.getExternalStorageDirectory() + "/strike/file/") |
| 309 | 316 | .isSinglePick(true) |
| 310 | - .doCrop(1, 1, 300, 300) | |
| 317 | + .doCrop(1, 1, 200, 200) | |
| 311 | 318 | .builder() |
| 312 | 319 | .start(activity, 200, PickerConfig.DEFAULT_RESULT_CODE); |
| 313 | 320 | } |
| 314 | 321 | |
| 315 | 322 | /** |
| 316 | 323 | * 检测是否有人脸 |
| 324 | + * | |
| 317 | 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 | 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 | 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 | 2 | <layout> |
| 3 | 3 | |
| 4 | 4 | <data> |
| 5 | + | |
| 5 | 6 | <variable |
| 6 | 7 | name="click" |
| 7 | 8 | type="android.view.View.OnClickListener" /> |
| ... | ... | @@ -12,6 +13,7 @@ |
| 12 | 13 | xmlns:tools="http://schemas.android.com/tools" |
| 13 | 14 | android:layout_width="match_parent" |
| 14 | 15 | android:layout_height="match_parent" |
| 16 | + android:background="@color/white" | |
| 15 | 17 | android:orientation="vertical" |
| 16 | 18 | tools:context=".activity.TakeIdentityPictureActivity"> |
| 17 | 19 | |
| ... | ... | @@ -38,15 +40,15 @@ |
| 38 | 40 | <TextView |
| 39 | 41 | android:layout_width="wrap_content" |
| 40 | 42 | android:layout_height="wrap_content" |
| 41 | - android:layout_marginTop="11dp" | |
| 43 | + android:layout_marginTop="10dp" | |
| 42 | 44 | android:text="@string/step_one" |
| 43 | 45 | android:textColor="#ff1a1a1a" |
| 44 | 46 | android:textSize="16sp" /> |
| 45 | 47 | |
| 46 | 48 | <LinearLayout |
| 47 | - android:layout_width="match_parent" | |
| 49 | + android:layout_width="wrap_content" | |
| 48 | 50 | android:layout_height="wrap_content" |
| 49 | - android:layout_marginTop="14dp" | |
| 51 | + android:layout_marginTop="10dp" | |
| 50 | 52 | android:orientation="horizontal"> |
| 51 | 53 | |
| 52 | 54 | <TextView |
| ... | ... | @@ -71,28 +73,42 @@ |
| 71 | 73 | android:textSize="12sp" /> |
| 72 | 74 | |
| 73 | 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 | 86 | <ImageView |
| 76 | 87 | android:id="@+id/certificate_front" |
| 77 | - android:layout_width="wrap_content" | |
| 88 | + android:layout_width="280dp" | |
| 78 | 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 | 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 | 105 | <LinearLayout |
| 92 | 106 | android:layout_width="wrap_content" |
| 93 | 107 | android:layout_height="wrap_content" |
| 94 | 108 | android:layout_gravity="center_horizontal" |
| 109 | + android:layout_marginTop="30dp" | |
| 95 | 110 | android:orientation="vertical"> |
| 111 | + | |
| 96 | 112 | <TextView |
| 97 | 113 | android:layout_width="wrap_content" |
| 98 | 114 | android:layout_height="wrap_content" |
| ... | ... | @@ -102,9 +118,9 @@ |
| 102 | 118 | android:textSize="16sp" /> |
| 103 | 119 | |
| 104 | 120 | <LinearLayout |
| 105 | - android:layout_width="match_parent" | |
| 121 | + android:layout_width="wrap_content" | |
| 106 | 122 | android:layout_height="wrap_content" |
| 107 | - android:layout_marginTop="14dp" | |
| 123 | + android:layout_marginTop="10dp" | |
| 108 | 124 | android:orientation="horizontal"> |
| 109 | 125 | |
| 110 | 126 | <TextView |
| ... | ... | @@ -129,28 +145,40 @@ |
| 129 | 145 | android:textSize="12sp" /> |
| 130 | 146 | |
| 131 | 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 | 158 | <ImageView |
| 134 | 159 | android:id="@+id/certificate_back" |
| 135 | - android:layout_width="wrap_content" | |
| 160 | + android:layout_width="280dp" | |
| 136 | 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 | 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 | 177 | <LinearLayout |
| 151 | 178 | android:layout_width="wrap_content" |
| 152 | 179 | android:layout_height="wrap_content" |
| 153 | 180 | android:layout_gravity="center_horizontal" |
| 181 | + android:layout_marginTop="30dp" | |
| 154 | 182 | android:orientation="vertical"> |
| 155 | 183 | |
| 156 | 184 | <TextView |
| ... | ... | @@ -161,31 +189,54 @@ |
| 161 | 189 | android:textColor="#ff1a1a1a" |
| 162 | 190 | android:textSize="16sp" /> |
| 163 | 191 | |
| 164 | - <LinearLayout | |
| 165 | - android:layout_width="match_parent" | |
| 192 | + <TextView | |
| 193 | + android:layout_width="wrap_content" | |
| 166 | 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 | 210 | <ImageView |
| 180 | 211 | android:id="@+id/take_picture" |
| 181 | - android:layout_width="wrap_content" | |
| 212 | + android:layout_width="130dp" | |
| 182 | 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 | 240 | </LinearLayout> |
| 190 | 241 | </ScrollView> |
| 191 | 242 | </LinearLayout> | ... | ... |
core/dentity_verfication/src/main/res/values/color.xml
core/dentity_verfication/src/main/res/values/strings.xml
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <string name="step_tow">第二步</string> |
| 9 | 9 | <string name="back">反面</string> |
| 10 | 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 | 14 | <string name="init_baidu_faile">初始化失败</string> |
| ... | ... | @@ -16,4 +16,6 @@ |
| 16 | 16 | <string name="tak_picture">拍摄</string> |
| 17 | 17 | <string name="to_picture">从手机相册选择</string> |
| 18 | 18 | <string name="cancle">取消</string> |
| 19 | + <string name="next">下一步</string> | |
| 20 | + <string name="change">更改</string> | |
| 19 | 21 | </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 | 3 | import android.database.Cursor; |
| 4 | 4 | import android.database.sqlite.SQLiteStatement; |
| 5 | 5 | |
| 6 | +import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity; | |
| 7 | + | |
| 6 | 8 | import org.greenrobot.greendao.AbstractDao; |
| 7 | 9 | import org.greenrobot.greendao.Property; |
| 8 | -import org.greenrobot.greendao.internal.DaoConfig; | |
| 9 | 10 | import org.greenrobot.greendao.database.Database; |
| 10 | 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 | 14 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| 15 | 15 | /** | ... | ... |