身份证驾驶证添加查看大图
This commit is contained in:
parent
d4e3a5b87a
commit
2d2d325866
@ -3,20 +3,7 @@
|
|||||||
<component name="deploymentTargetDropDown">
|
<component name="deploymentTargetDropDown">
|
||||||
<value>
|
<value>
|
||||||
<entry key="app">
|
<entry key="app">
|
||||||
<State>
|
<State />
|
||||||
<targetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="QUICK_BOOT_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
|
||||||
<value value="C:\Users\用户\.android\avd\Pixel_2_API_30.avd" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</targetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2024-02-29T08:36:21.502896400Z" />
|
|
||||||
</State>
|
|
||||||
</entry>
|
</entry>
|
||||||
</value>
|
</value>
|
||||||
</component>
|
</component>
|
||||||
|
@ -238,7 +238,7 @@ public class OssServiceUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//初始化
|
//初始化
|
||||||
number = 1;
|
number = 0;
|
||||||
success.clear();
|
success.clear();
|
||||||
failure.clear();
|
failure.clear();
|
||||||
for (int i = 0; i < localFiles.size(); i++) {
|
for (int i = 0; i < localFiles.size(); i++) {
|
||||||
@ -255,7 +255,7 @@ public class OssServiceUtil {
|
|||||||
oss.asyncPutObject(put, new OSSCompletedCallback<PutObjectRequest, PutObjectResult>() {
|
oss.asyncPutObject(put, new OSSCompletedCallback<PutObjectRequest, PutObjectResult>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PutObjectRequest request, final PutObjectResult result) {
|
public void onSuccess(PutObjectRequest request, final PutObjectResult result) {
|
||||||
|
number++;
|
||||||
String aliPath = OssConfigBean.BUCKET_BASE_URL + OssConfigBean.BUCKET_OBJECT + name;
|
String aliPath = OssConfigBean.BUCKET_BASE_URL + OssConfigBean.BUCKET_OBJECT + name;
|
||||||
success.add(aliPath);
|
success.add(aliPath);
|
||||||
if (number == localFiles.size()) {
|
if (number == localFiles.size()) {
|
||||||
@ -270,7 +270,7 @@ public class OssServiceUtil {
|
|||||||
//返回 上传路径,以及失败的路径
|
//返回 上传路径,以及失败的路径
|
||||||
callback.onOssSuccess(success, failure);
|
callback.onOssSuccess(success, failure);
|
||||||
}
|
}
|
||||||
number++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,7 +58,7 @@ class HomeActivity : BaseActivity<ActivityHomeBinding>(), OnTabSelectListener,
|
|||||||
|
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
|
|
||||||
binding.homeTabLayout.run {
|
binding.homeTabLayout.run {
|
||||||
setTabData(mTabEntities)
|
setTabData(mTabEntities)
|
||||||
@ -150,19 +150,15 @@ class HomeActivity : BaseActivity<ActivityHomeBinding>(), OnTabSelectListener,
|
|||||||
override fun onPageScrollStateChanged(state: Int) {
|
override fun onPageScrollStateChanged(state: Int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
|
||||||
super.onStart()
|
|
||||||
EventBus.getDefault().register(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStop() {
|
|
||||||
super.onStop()
|
|
||||||
EventBus.getDefault().unregister(this);
|
|
||||||
}
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
fun eventStatu(event: GoWaybillEvent) {
|
fun eventStatu(event: GoWaybillEvent) {
|
||||||
binding.homeTabLayout.currentTab = event.statu
|
binding.homeTabLayout.currentTab = event.statu
|
||||||
binding.homeNoScrollViewPager.currentItem = event.statu
|
binding.homeNoScrollViewPager.currentItem = event.statu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.account.authperson
|
package com.arpa.hndahesudintocctmsdriver.ui.account.authperson
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.UpDriverInfoBean
|
import com.arpa.hndahesudintocctmsdriver.bean.UpDriverInfoBean
|
||||||
@ -139,6 +140,7 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
|
|
||||||
private fun selFrontPic() {
|
private fun selFrontPic() {
|
||||||
|
|
||||||
|
if (driverInfoBean.licensePhotoFaceUrl.isNullOrEmpty()){
|
||||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||||
if (result?.data?.face == null) {
|
if (result?.data?.face == null) {
|
||||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||||
@ -148,6 +150,7 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivFront)
|
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivFront)
|
||||||
driverInfoBean.licensePhotoFaceUrl = picPath.picPath
|
driverInfoBean.licensePhotoFaceUrl = picPath.picPath
|
||||||
|
binding.tvChangeFront.visibility = View.VISIBLE
|
||||||
it?.run {
|
it?.run {
|
||||||
driverInfoBean.run {
|
driverInfoBean.run {
|
||||||
licenseFirstGetDate = initialIssueDate
|
licenseFirstGetDate = initialIssueDate
|
||||||
@ -168,12 +171,20 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
binding.ivFront, driverInfoBean.licensePhotoFaceUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun selBackPic() {
|
private fun selBackPic() {
|
||||||
|
|
||||||
|
if (driverInfoBean.licensePhotoBackUrl.isNullOrEmpty()){
|
||||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||||
if (result?.data?.back == null) {
|
if (result?.data?.back == null) {
|
||||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||||
@ -183,12 +194,20 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||||
driverInfoBean.licensePhotoBackUrl = picPath.picPath
|
driverInfoBean.licensePhotoBackUrl = picPath.picPath
|
||||||
|
binding.tvChangeBack.visibility = View.VISIBLE
|
||||||
it?.run {
|
it?.run {
|
||||||
backLicName = it.name
|
backLicName = it.name
|
||||||
driverInfoBean.licenseRecordNumber = recordNumber
|
driverInfoBean.licenseRecordNumber = recordNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
binding.ivBack, driverInfoBean.licensePhotoBackUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.ui.account.authperson
|
package com.arpa.hndahesudintocctmsdriver.ui.account.authperson
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
import com.alibaba.idst.nui.DateUtil.DEFAULT_FORMAT_DATE
|
import com.alibaba.idst.nui.DateUtil.DEFAULT_FORMAT_DATE
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
||||||
@ -10,6 +11,7 @@ import com.arpa.hndahesudintocctmsdriver.net.BaseObserver
|
|||||||
import com.arpa.hndahesudintocctmsdriver.net.DataManager
|
import com.arpa.hndahesudintocctmsdriver.net.DataManager
|
||||||
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.HomeActivity
|
import com.arpa.hndahesudintocctmsdriver.ui.HomeActivity
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.OcrUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.OcrUtils
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.SPUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.SPUtils
|
||||||
import com.arpa.mylibrary.base.BaseActivity
|
import com.arpa.mylibrary.base.BaseActivity
|
||||||
@ -103,6 +105,7 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ivFront.setOnClickListener {
|
ivFront.setOnClickListener {
|
||||||
|
if (perInfoBean.idcardFrontUrl.isNullOrBlank()){
|
||||||
OcrUtils.getInstance()
|
OcrUtils.getInstance()
|
||||||
.ocrPerson(mContext, this@AuthPersonActivity) { picPath, result ->
|
.ocrPerson(mContext, this@AuthPersonActivity) { picPath, result ->
|
||||||
if (result?.data?.face == null) {
|
if (result?.data?.face == null) {
|
||||||
@ -112,6 +115,7 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
|
|
||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(mContext, picPath.locPic, 12, ivFront)
|
.loadRoundImage(mContext, picPath.locPic, 12, ivFront)
|
||||||
|
tvFrontSeeBig.visibility = View.VISIBLE
|
||||||
perInfoBean.idcardFrontUrl = picPath.picPath
|
perInfoBean.idcardFrontUrl = picPath.picPath
|
||||||
result?.data?.face?.data.let {
|
result?.data?.face?.data.let {
|
||||||
it?.run {
|
it?.run {
|
||||||
@ -129,9 +133,17 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
ivFront, perInfoBean.idcardFrontUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ivBack.setOnClickListener {
|
ivBack.setOnClickListener {
|
||||||
|
if (perInfoBean.idcardBackUrl.isNullOrBlank()){
|
||||||
OcrUtils.getInstance()
|
OcrUtils.getInstance()
|
||||||
.ocrPerson(mContext, this@AuthPersonActivity) { picPath, result ->
|
.ocrPerson(mContext, this@AuthPersonActivity) { picPath, result ->
|
||||||
|
|
||||||
@ -143,6 +155,7 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
perInfoBean.idcardBackUrl = picPath.picPath
|
perInfoBean.idcardBackUrl = picPath.picPath
|
||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(mContext, picPath.locPic, 12, ivBack)
|
.loadRoundImage(mContext, picPath.locPic, 12, ivBack)
|
||||||
|
tvBackSeeBig.visibility = View.VISIBLE
|
||||||
result?.data?.back?.let {
|
result?.data?.back?.let {
|
||||||
if (it.data.validPeriod?.contains("-") == true) {
|
if (it.data.validPeriod?.contains("-") == true) {
|
||||||
val split = it.data.validPeriod.split("-")
|
val split = it.data.validPeriod.split("-")
|
||||||
@ -167,6 +180,13 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
ivBack, perInfoBean.idcardBackUrl
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.arpa.hndahesudintocctmsdriver.ui.account.authperson
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.widget.ImageView
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
||||||
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityAuthDriverBinding
|
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityAuthDriverBinding
|
||||||
@ -69,10 +70,20 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ivFront.setOnClickListener {
|
ivFront.setOnClickListener {
|
||||||
selFrontPic()
|
|
||||||
|
seeBigPic(binding.ivFront, driverInfoBean.licensePhotoFaceUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
ivBack.setOnClickListener {
|
ivBack.setOnClickListener {
|
||||||
|
|
||||||
|
seeBigPic(binding.ivBack, driverInfoBean.licensePhotoBackUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
tvChangeFront.setOnClickListener {
|
||||||
|
selFrontPic()
|
||||||
|
}
|
||||||
|
|
||||||
|
tvChangeBack.setOnClickListener {
|
||||||
selBackPic()
|
selBackPic()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,8 +108,8 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
tvCarType.isEnabled = false
|
tvCarType.isEnabled = false
|
||||||
tvStart.isEnabled = false
|
tvStart.isEnabled = false
|
||||||
tvEnd.isEnabled = false
|
tvEnd.isEnabled = false
|
||||||
ivFront.isEnabled = false
|
// ivFront.isEnabled = false
|
||||||
ivBack.isEnabled = false
|
// ivBack.isEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,6 +120,12 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
tvStart.text = driverInfoBean.licenseEffectiveStart
|
tvStart.text = driverInfoBean.licenseEffectiveStart
|
||||||
tvEnd.text = driverInfoBean.licenseEffectiveEnd
|
tvEnd.text = driverInfoBean.licenseEffectiveEnd
|
||||||
tvCarType.text = driverInfoBean.licenseType
|
tvCarType.text = driverInfoBean.licenseType
|
||||||
|
|
||||||
|
tvChangeFront.visibility =
|
||||||
|
if (driverInfoBean.licensePhotoFaceUrl.isNullOrEmpty() || isOnlyShow) View.GONE else View.VISIBLE
|
||||||
|
tvChangeBack.visibility =
|
||||||
|
if (driverInfoBean.licensePhotoBackUrl.isNullOrEmpty() || isOnlyShow) View.GONE else View.VISIBLE
|
||||||
|
|
||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
.loadRoundImage(
|
.loadRoundImage(
|
||||||
mContext,
|
mContext,
|
||||||
@ -184,6 +201,7 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
|
|
||||||
private fun selFrontPic() {
|
private fun selFrontPic() {
|
||||||
|
|
||||||
|
|
||||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||||
if (result?.data?.face == null) {
|
if (result?.data?.face == null) {
|
||||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||||
@ -220,6 +238,7 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
|
|
||||||
private fun selBackPic() {
|
private fun selBackPic() {
|
||||||
|
|
||||||
|
|
||||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||||
if (result?.data?.back == null) {
|
if (result?.data?.back == null) {
|
||||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||||
@ -238,6 +257,13 @@ class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun seeBigPic(imageView: ImageView,picPath:String){
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
imageView, picPath
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
setResult(RESULT_OK)
|
setResult(RESULT_OK)
|
||||||
|
@ -9,6 +9,7 @@ import com.arpa.hndahesudintocctmsdriver.databinding.ActivityAuthPersonBinding
|
|||||||
import com.arpa.hndahesudintocctmsdriver.net.BaseObserver
|
import com.arpa.hndahesudintocctmsdriver.net.BaseObserver
|
||||||
import com.arpa.hndahesudintocctmsdriver.net.DataManager
|
import com.arpa.hndahesudintocctmsdriver.net.DataManager
|
||||||
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.OcrUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.OcrUtils
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.UserUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.UserUtils
|
||||||
import com.arpa.mylibrary.base.BaseActivity
|
import com.arpa.mylibrary.base.BaseActivity
|
||||||
@ -68,8 +69,11 @@ class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!tvEnd.text.toString().contains("长期")) {
|
if (!tvEnd.text.toString().contains("长期")) {
|
||||||
if (TimeUtil.compareDate(tvEnd.text.toString(),
|
if (TimeUtil.compareDate(
|
||||||
SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()))) {
|
tvEnd.text.toString(),
|
||||||
|
SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
|
||||||
|
)
|
||||||
|
) {
|
||||||
ToastUtils.showToast(mContext, "身份证已过期,请及时更换最新证件")
|
ToastUtils.showToast(mContext, "身份证已过期,请及时更换最新证件")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,9 +112,13 @@ class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ivFront.setOnClickListener {
|
tvFrontSeeBig.setOnClickListener {
|
||||||
OcrUtils.getInstance()
|
OcrUtils.getInstance()
|
||||||
.ocrPerson(mContext, this@EditPersonActivity) { picPath, result ->
|
.ocrPerson(
|
||||||
|
mContext,
|
||||||
|
perInfoBean.idcardFrontUrl,
|
||||||
|
this@EditPersonActivity
|
||||||
|
) { picPath, result ->
|
||||||
if (result?.data?.face == null) {
|
if (result?.data?.face == null) {
|
||||||
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
ToastUtils.showToast(mContext, "请选择正确证件照片")
|
||||||
return@ocrPerson
|
return@ocrPerson
|
||||||
@ -135,8 +143,7 @@ class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tvBackSeeBig.setOnClickListener {
|
||||||
ivBack.setOnClickListener {
|
|
||||||
OcrUtils.getInstance()
|
OcrUtils.getInstance()
|
||||||
.ocrPerson(mContext, this@EditPersonActivity) { picPath, result ->
|
.ocrPerson(mContext, this@EditPersonActivity) { picPath, result ->
|
||||||
if (result?.data?.back == null) {
|
if (result?.data?.back == null) {
|
||||||
@ -173,6 +180,22 @@ class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ivFront.setOnClickListener {
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
ivFront, perInfoBean.idcardFrontUrl
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ivBack.setOnClickListener {
|
||||||
|
CommonPopUtils.getInstance().showOnePic(
|
||||||
|
mContext,
|
||||||
|
ivBack, perInfoBean.idcardBackUrl
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -196,14 +219,18 @@ class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
|||||||
etId.isEnabled = false
|
etId.isEnabled = false
|
||||||
tvStart.isEnabled = false
|
tvStart.isEnabled = false
|
||||||
tvEnd.isEnabled = false
|
tvEnd.isEnabled = false
|
||||||
ivFront.isEnabled = false
|
// ivFront.isEnabled = false
|
||||||
ivBack.isEnabled = false
|
// ivBack.isEnabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.run {
|
binding.run {
|
||||||
etName.setText(perInfoBean.idcardName)
|
etName.setText(perInfoBean.idcardName)
|
||||||
etId.setText(perInfoBean.idcardNo)
|
etId.setText(perInfoBean.idcardNo)
|
||||||
tvStart.text = perInfoBean.idcardEffectiveStart
|
tvStart.text = perInfoBean.idcardEffectiveStart
|
||||||
|
tvFrontSeeBig.visibility =
|
||||||
|
if (perInfoBean.idcardFrontUrl.isNullOrEmpty() || isOnlyShow) View.GONE else View.VISIBLE
|
||||||
|
tvBackSeeBig.visibility =
|
||||||
|
if (perInfoBean.idcardBackUrl.isNullOrEmpty() || isOnlyShow) View.GONE else View.VISIBLE
|
||||||
tvEnd.text =
|
tvEnd.text =
|
||||||
if (perInfoBean.idcardIsEndless == "1") "长期" else perInfoBean.idcardEffectiveEnd
|
if (perInfoBean.idcardIsEndless == "1") "长期" else perInfoBean.idcardEffectiveEnd
|
||||||
ImageLoader.getInstance()
|
ImageLoader.getInstance()
|
||||||
|
@ -2,17 +2,12 @@ package com.arpa.hndahesudintocctmsdriver.ui.mine.activity
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import cn.jpush.android.api.JPushInterface
|
|
||||||
import cn.jpush.android.ups.JPushUPSManager
|
import cn.jpush.android.ups.JPushUPSManager
|
||||||
import cn.jpush.android.ups.TokenResult
|
|
||||||
import cn.jpush.android.ups.UPSTurnCallBack
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.databinding.ActivitySettingBinding
|
import com.arpa.hndahesudintocctmsdriver.databinding.ActivitySettingBinding
|
||||||
import com.arpa.hndahesudintocctmsdriver.push.PushHelper
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.UserUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.UserUtils
|
||||||
import com.arpa.mylibrary.base.BaseActivity
|
import com.arpa.mylibrary.base.BaseActivity
|
||||||
import com.arpa.mylibrary.callback.PushAliasListener
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName SettingActivity
|
* @ClassName SettingActivity
|
||||||
|
@ -13,7 +13,6 @@ import com.arpa.hndahesudintocctmsdriver.net.DataManager
|
|||||||
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
import com.arpa.hndahesudintocctmsdriver.net.RxHttpCallBack
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.account.authperson.EditBankCardActivity
|
import com.arpa.hndahesudintocctmsdriver.ui.account.authperson.EditBankCardActivity
|
||||||
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
import com.arpa.hndahesudintocctmsdriver.utils.CommonPopUtils
|
||||||
import com.arpa.glex.bean.UserDetail
|
|
||||||
import com.arpa.glex.bean.WalletInfo
|
import com.arpa.glex.bean.WalletInfo
|
||||||
import com.arpa.glex.bean.WaterInfo
|
import com.arpa.glex.bean.WaterInfo
|
||||||
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
||||||
|
@ -5,6 +5,7 @@ import android.view.View
|
|||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
|
||||||
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityWaybillSuccBinding
|
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityWaybillSuccBinding
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.event.GoWaybillEvent
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.RefreshEvent
|
import com.arpa.hndahesudintocctmsdriver.event.RefreshEvent
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.HomeActivity
|
import com.arpa.hndahesudintocctmsdriver.ui.HomeActivity
|
||||||
import com.arpa.mylibrary.base.BaseActivity
|
import com.arpa.mylibrary.base.BaseActivity
|
||||||
@ -88,7 +89,8 @@ class WaybillSuccActivity : BaseActivity<ActivityWaybillSuccBinding>() {
|
|||||||
private fun goLeftOrRight(type: Int?, isLeft: Boolean) {
|
private fun goLeftOrRight(type: Int?, isLeft: Boolean) {
|
||||||
if (isLeft) {
|
if (isLeft) {
|
||||||
when (type) {
|
when (type) {
|
||||||
0 -> ActivityUtils.finishToActivityAndGoNew(
|
0 -> {
|
||||||
|
ActivityUtils.finishToActivityAndGoNew(
|
||||||
mContext,
|
mContext,
|
||||||
HomeActivity::class.java,
|
HomeActivity::class.java,
|
||||||
WaybillLoadActivity::class.java,
|
WaybillLoadActivity::class.java,
|
||||||
@ -96,9 +98,12 @@ class WaybillSuccActivity : BaseActivity<ActivityWaybillSuccBinding>() {
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
1, 2 -> {
|
1, 2 -> {
|
||||||
ActivityUtils.finishToActivity(HomeActivity::class.java, false)
|
ActivityUtils.finishToActivity(HomeActivity::class.java, false)
|
||||||
EventBus.getDefault().post(RefreshEvent(type))
|
EventBus.getDefault().post(RefreshEvent(type))
|
||||||
|
EventBus.getDefault().post(GoWaybillEvent(0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -122,7 +122,7 @@ class WaybillUpPicActivity : BaseActivity<ActivityWaybillUppicBinding>() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
var myAdapter = GridImageAdapter(mContext, mData)
|
var myAdapter = GridImageAdapter(mContext, mData)
|
||||||
myAdapter.selectMax = 6
|
myAdapter.selectMax = if (type==2) 6 else 1
|
||||||
myAdapter.setOnItemClickListener(object : OnItemClickListener {
|
myAdapter.setOnItemClickListener(object : OnItemClickListener {
|
||||||
override fun onItemClick(v: View?, position: Int) {
|
override fun onItemClick(v: View?, position: Int) {
|
||||||
PopsUtils.getInstance()
|
PopsUtils.getInstance()
|
||||||
|
@ -4,17 +4,17 @@ import android.content.Context
|
|||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.arpa.glex.bean.WalletInfo
|
||||||
import com.arpa.hndahesudintocctmsdriver.R
|
import com.arpa.hndahesudintocctmsdriver.R
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.AppVersion
|
import com.arpa.hndahesudintocctmsdriver.bean.AppVersion
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.CarBean
|
import com.arpa.hndahesudintocctmsdriver.bean.CarBean
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
|
||||||
import com.arpa.hndahesudintocctmsdriver.callback.OnResultListener
|
import com.arpa.hndahesudintocctmsdriver.callback.OnResultListener
|
||||||
import com.arpa.hndahesudintocctmsdriver.mypop.AgreementAlert
|
import com.arpa.hndahesudintocctmsdriver.mypop.AgreementAlert
|
||||||
import com.arpa.hndahesudintocctmsdriver.mypop.OnCarSelectListener
|
import com.arpa.hndahesudintocctmsdriver.mypop.OnCarSelectListener
|
||||||
import com.arpa.hndahesudintocctmsdriver.mypop.PopBottomCar
|
import com.arpa.hndahesudintocctmsdriver.mypop.PopBottomCar
|
||||||
import com.arpa.hndahesudintocctmsdriver.weight.pop.UpAppPop
|
|
||||||
import com.arpa.glex.bean.WalletInfo
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.weight.pop.InputMoneyPop2
|
import com.arpa.hndahesudintocctmsdriver.weight.pop.InputMoneyPop2
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.weight.pop.UpAppPop
|
||||||
import com.arpa.mylibrary.base.SingletonNoPHolder
|
import com.arpa.mylibrary.base.SingletonNoPHolder
|
||||||
import com.arpa.mylibrary.utils.ConvertUtils
|
import com.arpa.mylibrary.utils.ConvertUtils
|
||||||
import com.lxj.xpopup.XPopup
|
import com.lxj.xpopup.XPopup
|
||||||
@ -154,6 +154,33 @@ class CommonPopUtils private constructor() {
|
|||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示一张大图
|
||||||
|
* @param context Context
|
||||||
|
* @param imageView ImageView?
|
||||||
|
* @param picUrl String
|
||||||
|
*/
|
||||||
|
fun showOnePic(
|
||||||
|
context: Context,
|
||||||
|
imageView: ImageView? = null,
|
||||||
|
picUrl: String
|
||||||
|
) {
|
||||||
|
XPopup.Builder(context)
|
||||||
|
.asImageViewer(
|
||||||
|
imageView,
|
||||||
|
picUrl,
|
||||||
|
false,
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
ConvertUtils.dp2px(10F),
|
||||||
|
false,
|
||||||
|
Color.rgb(32, 36, 46),
|
||||||
|
SmartGlideImageLoader(R.mipmap.ic_launcher_round),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app版本检查
|
* app版本检查
|
||||||
* @param context Context
|
* @param context Context
|
||||||
@ -179,7 +206,12 @@ class CommonPopUtils private constructor() {
|
|||||||
* @param userInfo UserDetail
|
* @param userInfo UserDetail
|
||||||
* @param listener OnInputConfirmListener
|
* @param listener OnInputConfirmListener
|
||||||
*/
|
*/
|
||||||
fun showPickMoney(context: Context, walletInfo:WalletInfo, cashConfig: CashConfig, listener: OnInputConfirmListener) {
|
fun showPickMoney(
|
||||||
|
context: Context,
|
||||||
|
walletInfo: WalletInfo,
|
||||||
|
cashConfig: CashConfig,
|
||||||
|
listener: OnInputConfirmListener
|
||||||
|
) {
|
||||||
XPopup.Builder(context)
|
XPopup.Builder(context)
|
||||||
.dismissOnBackPressed(true)
|
.dismissOnBackPressed(true)
|
||||||
.dismissOnTouchOutside(true)
|
.dismissOnTouchOutside(true)
|
||||||
|
@ -30,6 +30,51 @@ class OcrUtils private constructor() {
|
|||||||
companion object : SingletonNoPHolder<OcrUtils>(::OcrUtils)
|
companion object : SingletonNoPHolder<OcrUtils>(::OcrUtils)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证识别
|
||||||
|
* */
|
||||||
|
fun ocrPerson(context: Context,picUrl: String = "", activity: AppCompatActivity, listener: OnOcrPicResultListener) {
|
||||||
|
PopsUtils.getInstance().showSimSelPic2(context,picUrl) { result ->
|
||||||
|
LoadingUtils.instance.showLoading(activity)
|
||||||
|
//上传oss得到图片地址
|
||||||
|
OssServiceUtil.getInstance().run {
|
||||||
|
asyncPutImage(result[0].realPath, null)
|
||||||
|
setResultCallBack { data, oldPath ->
|
||||||
|
DataManager.getInstance().recognizeIdcard(oldPath)
|
||||||
|
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(context, object : RxHttpCallBack<OcrPersonBean>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<OcrPersonBean>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
LoadingUtils.instance.dissLoading()
|
||||||
|
t.data?.let {
|
||||||
|
listener.onSuccResult(
|
||||||
|
PicPath(result[0].realPath, oldPath), it
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCodeError(
|
||||||
|
mContext: Context?,
|
||||||
|
t: CommonResponseBean<OcrPersonBean>
|
||||||
|
) {
|
||||||
|
// super.onCodeError(mContext, t)
|
||||||
|
LoadingUtils.instance.dissLoading()
|
||||||
|
if (t.code == 500) {
|
||||||
|
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||||
|
ToastUtils.showToast(mContext, "图片识别失败,请重新上传")
|
||||||
|
// } else {
|
||||||
|
// ToastUtils.showToast(mContext, t.msg)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 身份证识别
|
* 身份证识别
|
||||||
* */
|
* */
|
||||||
|
@ -59,24 +59,58 @@
|
|||||||
android:textSize="@dimen/sp_16"></TextView>
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:id="@+id/ivFront"
|
|
||||||
android:layout_width="@dimen/dp_155"
|
android:layout_width="@dimen/dp_155"
|
||||||
android:layout_height="@dimen/dp_97"
|
android:layout_height="@dimen/dp_97"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginLeft="@dimen/dp_8"
|
android:layout_marginLeft="@dimen/dp_8"
|
||||||
android:layout_marginBottom="@dimen/dp_22"
|
android:layout_marginBottom="@dimen/dp_22">
|
||||||
android:background="@drawable/driver_front" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivBack"
|
android:id="@+id/ivFront"
|
||||||
|
android:layout_width="@dimen/dp_155"
|
||||||
|
android:layout_height="@dimen/dp_97"
|
||||||
|
android:background="@drawable/driver_front" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvChangeFront"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingRight="@dimen/dp_4"
|
||||||
|
android:paddingBottom="@dimen/dp_4"
|
||||||
|
android:text="更换图片"
|
||||||
|
android:textColor="@color/main_red"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_width="@dimen/dp_155"
|
android:layout_width="@dimen/dp_155"
|
||||||
android:layout_height="@dimen/dp_97"
|
android:layout_height="@dimen/dp_97"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginRight="@dimen/dp_8"
|
android:layout_marginRight="@dimen/dp_8"
|
||||||
android:layout_marginBottom="@dimen/dp_22"
|
android:layout_marginBottom="@dimen/dp_22">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="@dimen/dp_155"
|
||||||
|
android:layout_height="@dimen/dp_97"
|
||||||
android:background="@drawable/driver_back" />
|
android:background="@drawable/driver_back" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvChangeBack"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingRight="@dimen/dp_4"
|
||||||
|
android:paddingBottom="@dimen/dp_4"
|
||||||
|
android:text="更换图片"
|
||||||
|
android:textColor="@color/main_red"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
@ -50,25 +50,64 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_16"></TextView>
|
android:textSize="@dimen/sp_16"></TextView>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="@dimen/dp_155"
|
||||||
|
android:layout_height="@dimen/dp_97"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginLeft="@dimen/dp_8"
|
||||||
|
android:layout_marginBottom="@dimen/dp_22">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivFront"
|
android:id="@+id/ivFront"
|
||||||
android:layout_width="@dimen/dp_155"
|
android:layout_width="@dimen/dp_155"
|
||||||
android:layout_height="@dimen/dp_97"
|
android:layout_height="@dimen/dp_97"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_marginLeft="@dimen/dp_8"
|
|
||||||
android:layout_marginBottom="@dimen/dp_22"
|
|
||||||
android:background="@drawable/person_front"></ImageView>
|
android:background="@drawable/person_front"></ImageView>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/ivBack"
|
android:id="@+id/tvFrontSeeBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingRight="@dimen/dp_4"
|
||||||
|
android:paddingBottom="@dimen/dp_4"
|
||||||
|
android:text="更换图片"
|
||||||
|
android:textColor="@color/main_red"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_width="@dimen/dp_155"
|
android:layout_width="@dimen/dp_155"
|
||||||
android:layout_height="@dimen/dp_97"
|
android:layout_height="@dimen/dp_97"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginRight="@dimen/dp_8"
|
android:layout_marginRight="@dimen/dp_8"
|
||||||
android:layout_marginBottom="@dimen/dp_22"
|
android:layout_marginBottom="@dimen/dp_22"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="@dimen/dp_155"
|
||||||
|
android:layout_height="@dimen/dp_97"
|
||||||
android:background="@drawable/person_back"></ImageView>
|
android:background="@drawable/person_back"></ImageView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvBackSeeBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:paddingRight="@dimen/dp_4"
|
||||||
|
android:paddingBottom="@dimen/dp_4"
|
||||||
|
android:text="更换图片"
|
||||||
|
android:textColor="@color/main_red"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
@ -10,15 +10,15 @@
|
|||||||
android:elevation="3dp"
|
android:elevation="3dp"
|
||||||
android:id="@+id/home_tabLayout"
|
android:id="@+id/home_tabLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_56"
|
android:layout_height="@dimen/dp_60"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="@color/colorWhite"
|
android:background="@color/colorWhite"
|
||||||
app:tl_iconHeight="@dimen/dp_21"
|
app:tl_iconHeight="@dimen/dp_24"
|
||||||
app:tl_iconWidth="@dimen/dp_21"
|
app:tl_iconWidth="@dimen/dp_24"
|
||||||
app:tl_indicator_height="0dp"
|
app:tl_indicator_height="0dp"
|
||||||
app:tl_textSelectColor="#454545"
|
app:tl_textSelectColor="#454545"
|
||||||
app:tl_textUnselectColor="#A8ABB0"
|
app:tl_textUnselectColor="#A8ABB0"
|
||||||
app:tl_textsize="@dimen/sp_12" />
|
app:tl_textsize="@dimen/sp_14" />
|
||||||
|
|
||||||
<com.arpa.hndahesudintocctmsdriver.weight.NoScrollViewPager
|
<com.arpa.hndahesudintocctmsdriver.weight.NoScrollViewPager
|
||||||
android:id="@+id/home_NoScrollViewPager"
|
android:id="@+id/home_NoScrollViewPager"
|
||||||
|
@ -491,34 +491,41 @@
|
|||||||
android:textColor="@color/main_red"
|
android:textColor="@color/main_red"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llGoods"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_below="@+id/tvCarTitle"
|
||||||
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
|
>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvGoodsTitle"
|
android:id="@+id/tvGoodsTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/tvCarTitle"
|
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
|
||||||
android:paddingLeft="@dimen/dp_16"
|
android:paddingLeft="@dimen/dp_16"
|
||||||
android:text="货物"
|
android:text="货物"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="right"
|
||||||
android:id="@+id/tvGoods"
|
android:id="@+id/tvGoods"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@+id/tvGoodsTitle"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_40"
|
|
||||||
android:paddingRight="@dimen/dp_16"
|
android:paddingRight="@dimen/dp_16"
|
||||||
android:text="钢铁,1吨,螺纹钢"
|
android:text="钢铁,1吨,螺纹钢"
|
||||||
android:textColor="@color/main_red"
|
android:textColor="@color/main_red"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvNotesTitle"
|
android:id="@+id/tvNotesTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/tvGoodsTitle"
|
android:layout_below="@+id/llGoods"
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
android:paddingLeft="@dimen/dp_16"
|
android:paddingLeft="@dimen/dp_16"
|
||||||
android:text="备注"
|
android:text="备注"
|
||||||
|
@ -428,35 +428,43 @@
|
|||||||
android:text="整车 4.2/6.2/6.8 米 高栏/厢式"
|
android:text="整车 4.2/6.2/6.8 米 高栏/厢式"
|
||||||
android:textColor="@color/main_red"
|
android:textColor="@color/main_red"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llGoods"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_below="@+id/tvCarTitle"
|
||||||
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
|
>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvGoodsTitle"
|
android:id="@+id/tvGoodsTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/tvCarTitle"
|
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
|
||||||
android:paddingLeft="@dimen/dp_16"
|
android:paddingLeft="@dimen/dp_16"
|
||||||
android:text="货物"
|
android:text="货物"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="right"
|
||||||
android:id="@+id/tvGoods"
|
android:id="@+id/tvGoods"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@+id/tvGoodsTitle"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_40"
|
|
||||||
android:paddingRight="@dimen/dp_16"
|
android:paddingRight="@dimen/dp_16"
|
||||||
android:text="钢铁,1吨,螺纹钢"
|
android:text="钢铁,1吨,螺纹钢"
|
||||||
android:textColor="@color/main_red"
|
android:textColor="@color/main_red"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvNotesTitle"
|
android:id="@+id/tvNotesTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/tvGoodsTitle"
|
android:layout_below="@+id/llGoods"
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
android:paddingLeft="@dimen/dp_16"
|
android:paddingLeft="@dimen/dp_16"
|
||||||
android:text="备注"
|
android:text="备注"
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package com.arpa.mylibrary.pop
|
package com.arpa.mylibrary.pop
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
|
import android.widget.LinearLayout
|
||||||
import com.arpa.mylibrary.R
|
import com.arpa.mylibrary.R
|
||||||
import com.arpa.mylibrary.callback.OnPicResultListener
|
import com.arpa.mylibrary.callback.OnPicResultListener
|
||||||
|
import com.arpa.mylibrary.utils.ConvertUtils
|
||||||
import com.arpa.mylibrary.weight.GlideEngine
|
import com.arpa.mylibrary.weight.GlideEngine
|
||||||
import com.arpa.mylibrary.weight.ImageFileCompressEngine
|
import com.arpa.mylibrary.weight.ImageFileCompressEngine
|
||||||
import com.luck.picture.lib.basic.PictureSelectionCameraModel
|
import com.luck.picture.lib.basic.PictureSelectionCameraModel
|
||||||
@ -12,7 +16,9 @@ import com.luck.picture.lib.basic.PictureSelector
|
|||||||
import com.luck.picture.lib.config.SelectMimeType
|
import com.luck.picture.lib.config.SelectMimeType
|
||||||
import com.luck.picture.lib.entity.LocalMedia
|
import com.luck.picture.lib.entity.LocalMedia
|
||||||
import com.luck.picture.lib.interfaces.OnResultCallbackListener
|
import com.luck.picture.lib.interfaces.OnResultCallbackListener
|
||||||
|
import com.lxj.xpopup.XPopup
|
||||||
import com.lxj.xpopup.core.BottomPopupView
|
import com.lxj.xpopup.core.BottomPopupView
|
||||||
|
import com.lxj.xpopup.util.SmartGlideImageLoader
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName PopBottomPic
|
* @ClassName PopBottomPic
|
||||||
@ -22,6 +28,7 @@ import com.lxj.xpopup.core.BottomPopupView
|
|||||||
*/
|
*/
|
||||||
class PopNorBottomPic(
|
class PopNorBottomPic(
|
||||||
context: Context,
|
context: Context,
|
||||||
|
private var picUrl: String,
|
||||||
onPicResultListener: OnPicResultListener
|
onPicResultListener: OnPicResultListener
|
||||||
) : BottomPopupView(context) {
|
) : BottomPopupView(context) {
|
||||||
|
|
||||||
@ -40,6 +47,11 @@ class PopNorBottomPic(
|
|||||||
var paizhao = findViewById<Button>(R.id.btn_paizhao)
|
var paizhao = findViewById<Button>(R.id.btn_paizhao)
|
||||||
var xiangce = findViewById<Button>(R.id.btnXiangce)
|
var xiangce = findViewById<Button>(R.id.btnXiangce)
|
||||||
var btnQuxiao = findViewById<Button>(R.id.btn_quxiao)
|
var btnQuxiao = findViewById<Button>(R.id.btn_quxiao)
|
||||||
|
// var btnSeeBig = findViewById<Button>(R.id.btnSeeBig)
|
||||||
|
// var llSeeBig = findViewById<LinearLayout>(R.id.llSeeBig)
|
||||||
|
// llSeeBig.visibility = if (picUrl.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||||
|
// btnSeeBig.setOnClickListener {
|
||||||
|
// }
|
||||||
paizhao.setOnClickListener {
|
paizhao.setOnClickListener {
|
||||||
|
|
||||||
// 单独拍照
|
// 单独拍照
|
||||||
|
@ -59,7 +59,22 @@ class PopsUtils private constructor(){
|
|||||||
|
|
||||||
XPopup.Builder(ctx)
|
XPopup.Builder(ctx)
|
||||||
.dismissOnTouchOutside(true)
|
.dismissOnTouchOutside(true)
|
||||||
.asCustom(PopNorBottomPic(ctx, listenter))
|
.asCustom(PopNorBottomPic(ctx, "", listenter))
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择照片 拍照或者相机
|
||||||
|
*
|
||||||
|
* @param ctx
|
||||||
|
* @param listenter
|
||||||
|
*/
|
||||||
|
fun showSimSelPic2(ctx: Context,picUrl:String, listenter: OnPicResultListener){
|
||||||
|
|
||||||
|
XPopup.Builder(ctx)
|
||||||
|
.dismissOnTouchOutside(true)
|
||||||
|
.asCustom(PopNorBottomPic(ctx,picUrl, listenter))
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
android:layout_marginLeft="@dimen/dp_18"
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
android:layout_marginRight="@dimen/dp_18"
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
android:background="#EEEEEE" />
|
android:background="#EEEEEE" />
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_paizhao"
|
android:id="@+id/btn_paizhao"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -58,6 +56,33 @@
|
|||||||
android:layout_marginRight="@dimen/dp_18"
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
android:background="#EEEEEE" />
|
android:background="#EEEEEE" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
|
android:id="@+id/llSeeBig"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnSeeBig"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:text="查看大图"
|
||||||
|
android:textColor="#000"
|
||||||
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
|
android:background="#EEEEEE" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_quxiao"
|
android:id="@+id/btn_quxiao"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user