Commit 94d4d3d6 by 王佳洋

UI调整

parent 09d2b114
package com.yidianling.user.mine import android.annotation.SuppressLintimport android.content.Intentimport android.graphics.Bitmapimport android.graphics.BitmapFactoryimport android.hardware.Cameraimport android.net.Uriimport android.os.Buildimport android.provider.MediaStoreimport android.text.Spannableimport android.text.SpannableStringimport android.text.style.ForegroundColorSpanimport android.widget.ImageViewimport android.widget.TextViewimport com.alibaba.android.arouter.launcher.ARouterimport com.bumptech.glide.Glideimport com.hjq.permissions.OnPermissionCallbackimport com.hjq.permissions.Permissionimport com.hjq.permissions.XXPermissionsimport com.ydl.ydlcommon.base.BaseActivityimport com.ydl.ydlcommon.bean.StatusBarOptionsimport com.ydl.ydlcommon.data.http.BaseAPIResponseimport com.ydl.ydlcommon.modular.findRouteServiceimport com.ydl.ydlcommon.utils.FileUtilsimport com.ydl.ydlcommon.utils.extend.visibleimport com.ydl.ydlcommon.view.TitleBarimport com.yidianling.common.tools.ToastUtilimport com.yidianling.im.api.service.IImServiceimport com.yidianling.user.Rimport com.yidianling.user.api.service.IUserServiceimport com.yidianling.user.http.UserHttpImplimport com.yidianling.user.http.request.BaseInfoimport com.yidianling.user.http.request.UserModifyAuditRespDtoimport de.greenrobot.event.EventBusimport io.reactivex.android.schedulers.AndroidSchedulersimport io.reactivex.schedulers.Schedulersimport java.io.Fileimport java.io.IOException class ModifyAvatarActivity : BaseActivity() { override fun getStatusViewOptions(): StatusBarOptions { return StatusBarOptions(isAddStatusView = true, statusBarDarkMode = false).apply { statusColor = "#E6000000" } } private val ALBUM = 0x0 // 相册 private val CAMERA = 0x1 // 照相 private val CROP = 0x2 // 裁剪m private val mAvatarDir = "${FileUtils.getStorageDirectory()}/img/head_img/" // 头像目录 private val mAvatarPath = "${mAvatarDir}avatar_camera.jpg" // 头像 private val mAvatarFile = File(mAvatarPath) // 头像文件 private val mUserInfo = findRouteService(IUserService::class.java).getUserInfo() override fun layoutResId(): Int = R.layout.activity_modify_avatar private lateinit var tip_bar: TitleBar private lateinit var tv_tip1: TextView private lateinit var iv_avatar: ImageView private lateinit var iv_warn: ImageView private lateinit var tv_tip2: TextView private lateinit var tv_modify: TextView private fun findView() { tip_bar = findViewById(R.id.tip_bar) tv_tip1 = findViewById(R.id.tv_tip1) iv_avatar = findViewById(R.id.iv_avatar) iv_warn = findViewById(R.id.iv_warn) tv_tip2 = findViewById(R.id.tv_tip2) tv_modify = findViewById(R.id.tv_modify) } @SuppressLint("SetTextI18n") override fun initDataAndEvent() { findView() tip_bar.setOnLeftTextClick { _, _ -> setResult(RESULT_OK) // 刷新个人资料页 finish() } mUserInfo ?: return mDisposables.add( UserHttpImpl.getInstance() .getUserAuditInfo(BaseInfo(102)) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe { response: BaseAPIResponse<UserModifyAuditRespDto> -> if (response.code != "200") return@subscribe val (_, auditStatus, _, _, _, _, _, last7Day, modifyAfter) = response.data when (auditStatus) { 1 -> { // 审核中 underReview() Glide.with(this) .load(modifyAfter) .into(iv_avatar) } 2 -> { // 审核失败 tv_tip1.text = "七天内可修改一次头像" Glide.with(this) .load(mUserInfo.head) .into(iv_avatar) iv_warn.visible() tv_tip2.text = SpannableString("审核失败,该头像提交不规范,请修改后重新提交审核。\n如有疑问联系客服小壹").also { it.setSpan( ForegroundColorSpan(resources.getColor(R.color.color_1DA1F2)), it.indexOf("客服"), it.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE ) } tv_tip2.setOnClickListener { // 客服 ARouter.getInstance().navigation( IImService::class.java ).startKefuChat(this, "", 0, 0) } setModifyAvatar() } 3 -> { // 审核成功 || 提交审核 modifyAfter?.let { mUserInfo.head = it Glide.with(this) .load(it) .error(R.drawable.platform_head_place_hold_pic) .into(iv_avatar) } findRouteService(IImService::class.java).updateUserHead(modifyAfter) // 更新用户头像到云信 EventBus.getDefault().post(UserChangeEvent(true)) // 更新MineFragment if (last7Day) { tv_tip1.text = "抱歉,七天内只能修改一次头像" tv_modify.isEnabled = false tv_modify.setBackgroundResource(R.drawable.bg_c3c4ca_corner_8) } else { tv_tip1.text = "七天内可修改一次头像" setModifyAvatar() } } } }) } private fun setModifyAvatar() { tv_modify.setOnClickListener { requestPermissions { optionDialog() } } } private fun requestPermissions(block: () -> Unit) { if (XXPermissions.isGrantedPermission(this, Permission.CAMERA)) { block.invoke() } else { XXPermissions.with(this) .permission(Permission.CAMERA) .request(object : OnPermissionCallback { override fun onGranted(permissions: MutableList<String>?, all: Boolean) { block.invoke() } override fun onDenied(permissions: MutableList<String>?, never: Boolean) { ToastUtil.toastLong(this@ModifyAvatarActivity, "缺少使用相机和读取存储权限,无法获取图片") } }) } } private fun optionDialog() { showFragment(AvaterDialog().apply { listener = { position, dialog -> val file = File(mAvatarDir) if (!file.exists()) file.mkdirs() when (position) { 0 -> { // 相册 val intent = Intent(Intent.ACTION_PICK, null) intent.setDataAndType( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*" ) this@ModifyAvatarActivity.startActivityForResult(intent, ALBUM) } 1 -> { // 拍照 callCamera() } } dialog.dismiss() } }, "avater") } /** * 调用相机 */ private fun callCamera() { val intent = Intent() packageManager.getLaunchIntentForPackage("com.android.camera")?.run { intent.setPackage("com.android.camera") } intent.action = MediaStore.ACTION_IMAGE_CAPTURE if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { // api 24 intent.putExtra( "android.intent.extras.CAMERA_FACING", Camera.CameraInfo.CAMERA_FACING_FRONT ) // 调用前置摄像头 intent.putExtra("autofocus", true) // 自动对焦 intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mAvatarFile)) intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()) startActivityForResult(intent, CAMERA) } else { try { mAvatarFile.createNewFile() } catch (e: IOException) { e.printStackTrace() } val uri: Uri = FileUtils.getImageContentUri(this, mAvatarFile) intent.putExtra( "android.intent.extras.CAMERA_FACING", Camera.CameraInfo.CAMERA_FACING_FRONT ) // 调用前置摄像头 intent.putExtra("autofocus", true) // 自动对焦 intent.putExtra(MediaStore.EXTRA_OUTPUT, uri) intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()) startActivityForResult(intent, CAMERA) } } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (resultCode == RESULT_OK) { when (requestCode) { ALBUM -> { // 相册 data?.let { startPhotoZoom(it.data) } } CAMERA -> { // 拍照 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { // api 24 if (mAvatarFile.exists()) { startPhotoZoom(Uri.fromFile(mAvatarFile)) } } else { startPhotoZoom(FileUtils.getImageContentUri(this, mAvatarFile)) } } CROP -> { mUserInfo ?: return showProgressDialog("保存中...") val path = FileUtils.getPathByUri4kitkat(this, Uri.fromFile(mAvatarFile)) var bitmap = BitmapFactory.decodeFile(path) bitmap = FileUtils.getZoomImage(bitmap, 200.0) val outPutFile = FileUtils.saveBitmap(bitmap, path) mDisposables.add( UserHttpImpl.getInstance().uploadFile(outPutFile) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe { dismissProgressDialog() if (it.code != "200") { ToastUtil.toastShort(it.msg) return@subscribe } ToastUtil.toastShort("头像审核中,预计24小时内审核完成") underReview() iv_avatar.setImageBitmap(bitmap) } ) } } } } /** * 审核中 */ @SuppressLint("SetTextI18n") private fun underReview() { tv_tip1.text = "抱歉,七天内只能修改一次头像" tv_tip2.text = "审核中,预计24小时内审核完成,暂无法修改。" tv_modify.setBackgroundResource(R.drawable.bg_c3c4ca_corner_8) tv_modify.isEnabled = false } /** * 裁剪图片方法实现 */ private fun startPhotoZoom(uri: Uri?) { val intent = Intent("com.android.camera.action.CROP").apply { setDataAndType(uri, "image/*") putExtra("crop", "true") // 设置裁剪 putExtra("scaleUpIfNeeded", true) // 图片拉伸,就不会出现黑框了 //宽高的比例 putExtra("aspectX", 1) putExtra("aspectY", 1) //裁剪图片宽高 putExtra("outputX", 200) putExtra("outputY", 200) } intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mAvatarFile)) intent.putExtra("outputFormat", Bitmap.CompressFormat.PNG.toString())// return-data=true传递的为缩略图,小米手机默认传递大图,所以会导致onActivityResult调用失败 intent.putExtra("return-data", false)// intent.putExtra("noFaceDetection", false) // 是否需要人脸识别 startActivityForResult(intent, CROP) }}
\ No newline at end of file
package com.yidianling.user.mine import android.annotation.SuppressLintimport android.content.Intentimport android.graphics.Bitmapimport android.graphics.BitmapFactoryimport android.hardware.Cameraimport android.net.Uriimport android.os.Buildimport android.provider.MediaStoreimport android.text.Spannableimport android.text.SpannableStringimport android.text.style.ForegroundColorSpanimport android.widget.ImageViewimport android.widget.TextViewimport com.alibaba.android.arouter.launcher.ARouterimport com.bumptech.glide.Glideimport com.hjq.permissions.OnPermissionCallbackimport com.hjq.permissions.Permissionimport com.hjq.permissions.XXPermissionsimport com.ydl.ydlcommon.base.BaseActivityimport com.ydl.ydlcommon.bean.StatusBarOptionsimport com.ydl.ydlcommon.data.http.BaseAPIResponseimport com.ydl.ydlcommon.modular.findRouteServiceimport com.ydl.ydlcommon.utils.FileUtilsimport com.ydl.ydlcommon.utils.extend.visibleimport com.ydl.ydlcommon.view.TitleBarimport com.yidianling.common.tools.ToastUtilimport com.yidianling.im.api.service.IImServiceimport com.yidianling.user.Rimport com.yidianling.user.api.service.IUserServiceimport com.yidianling.user.http.UserHttpImplimport com.yidianling.user.http.request.BaseInfoimport com.yidianling.user.http.request.UserModifyAuditRespDtoimport de.greenrobot.event.EventBusimport io.reactivex.android.schedulers.AndroidSchedulersimport io.reactivex.schedulers.Schedulersimport java.io.Fileimport java.io.IOException class ModifyAvatarActivity : BaseActivity() { override fun getStatusViewOptions(): StatusBarOptions { return StatusBarOptions(isAddStatusView = true, statusBarDarkMode = false).apply { statusColor = "#E6000000" } } private val ALBUM = 0x0 // 相册 private val CAMERA = 0x1 // 照相 private val CROP = 0x2 // 裁剪m private val mAvatarDir = "${FileUtils.getStorageDirectory()}/img/head_img/" // 头像目录 private val mAvatarPath = "${mAvatarDir}avatar_camera.jpg" // 头像 private val mAvatarFile = File(mAvatarPath) // 头像文件 private val mUserInfo = findRouteService(IUserService::class.java).getUserInfo() override fun layoutResId(): Int = R.layout.activity_modify_avatar private lateinit var tip_bar: TitleBar private lateinit var tv_tip1: TextView private lateinit var iv_avatar: ImageView private lateinit var iv_warn: ImageView private lateinit var tv_tip2: TextView private lateinit var tv_modify: TextView private fun findView() { tip_bar = findViewById(R.id.tip_bar) tv_tip1 = findViewById(R.id.tv_tip1) iv_avatar = findViewById(R.id.iv_avatar) iv_warn = findViewById(R.id.iv_warn) tv_tip2 = findViewById(R.id.tv_tip2) tv_modify = findViewById(R.id.tv_modify) } @SuppressLint("SetTextI18n") override fun initDataAndEvent() { findView() tip_bar.setOnLeftTextClick { _, _ -> setResult(RESULT_OK) // 刷新个人资料页 finish() } mUserInfo ?: return mDisposables.add( UserHttpImpl.getInstance() .getUserAuditInfo(BaseInfo(102)) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe { response: BaseAPIResponse<UserModifyAuditRespDto> -> if (response.code != "200") return@subscribe val (auditReason, auditStatus, _, _, _, _, _, last7Day, modifyAfter) = response.data when (auditStatus) { 1 -> { // 审核中 underReview() Glide.with(this) .load(modifyAfter) .into(iv_avatar) } 2 -> { // 审核失败 tv_tip1.text = "七天内可修改一次头像" Glide.with(this) .load(mUserInfo.head) .into(iv_avatar) iv_warn.visible() tv_tip2.text = SpannableString("审核失败,$auditReason。如有疑问联系客服小壹").also { it.setSpan( ForegroundColorSpan(resources.getColor(R.color.color_1DA1F2)), it.lastIndexOf("客服"), it.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE ) } tv_tip2.setOnClickListener { // 客服 ARouter.getInstance().navigation( IImService::class.java ).startKefuChat(this, "", 0, 0) } setModifyAvatar() } 3 -> { // 审核成功 || 提交审核 modifyAfter?.let { mUserInfo.head = it Glide.with(this) .load(it) .error(R.drawable.platform_head_place_hold_pic) .into(iv_avatar) } findRouteService(IImService::class.java).updateUserHead(modifyAfter) // 更新用户头像到云信 EventBus.getDefault().post(UserChangeEvent(true)) // 更新MineFragment if (last7Day) { tv_tip1.text = "抱歉,七天内只能修改一次头像" tv_modify.isEnabled = false tv_modify.setBackgroundResource(R.drawable.bg_c3c4ca_corner_8) } else { tv_tip1.text = "七天内可修改一次头像" setModifyAvatar() } } } }) } private fun setModifyAvatar() { tv_modify.setOnClickListener { requestPermissions { optionDialog() } } } private fun requestPermissions(block: () -> Unit) { if (XXPermissions.isGrantedPermission(this, Permission.CAMERA)) { block.invoke() } else { XXPermissions.with(this) .permission(Permission.CAMERA) .request(object : OnPermissionCallback { override fun onGranted(permissions: MutableList<String>?, all: Boolean) { block.invoke() } override fun onDenied(permissions: MutableList<String>?, never: Boolean) { ToastUtil.toastLong(this@ModifyAvatarActivity, "缺少使用相机和读取存储权限,无法获取图片") } }) } } private fun optionDialog() { showFragment(AvaterDialog().apply { listener = { position, dialog -> val file = File(mAvatarDir) if (!file.exists()) file.mkdirs() when (position) { 0 -> { // 相册 val intent = Intent(Intent.ACTION_PICK, null) intent.setDataAndType( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*" ) this@ModifyAvatarActivity.startActivityForResult(intent, ALBUM) } 1 -> { // 拍照 callCamera() } } dialog.dismiss() } }, "avater") } /** * 调用相机 */ private fun callCamera() { val intent = Intent() packageManager.getLaunchIntentForPackage("com.android.camera")?.run { intent.setPackage("com.android.camera") } intent.action = MediaStore.ACTION_IMAGE_CAPTURE if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { // api 24 intent.putExtra( "android.intent.extras.CAMERA_FACING", Camera.CameraInfo.CAMERA_FACING_FRONT ) // 调用前置摄像头 intent.putExtra("autofocus", true) // 自动对焦 intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mAvatarFile)) intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()) startActivityForResult(intent, CAMERA) } else { try { mAvatarFile.createNewFile() } catch (e: IOException) { e.printStackTrace() } val uri: Uri = FileUtils.getImageContentUri(this, mAvatarFile) intent.putExtra( "android.intent.extras.CAMERA_FACING", Camera.CameraInfo.CAMERA_FACING_FRONT ) // 调用前置摄像头 intent.putExtra("autofocus", true) // 自动对焦 intent.putExtra(MediaStore.EXTRA_OUTPUT, uri) intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString()) startActivityForResult(intent, CAMERA) } } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (resultCode == RESULT_OK) { when (requestCode) { ALBUM -> { // 相册 data?.let { startPhotoZoom(it.data) } } CAMERA -> { // 拍照 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { // api 24 if (mAvatarFile.exists()) { startPhotoZoom(Uri.fromFile(mAvatarFile)) } } else { startPhotoZoom(FileUtils.getImageContentUri(this, mAvatarFile)) } } CROP -> { mUserInfo ?: return showProgressDialog("保存中...") val path = FileUtils.getPathByUri4kitkat(this, Uri.fromFile(mAvatarFile)) var bitmap = BitmapFactory.decodeFile(path) bitmap = FileUtils.getZoomImage(bitmap, 200.0) val outPutFile = FileUtils.saveBitmap(bitmap, path) mDisposables.add( UserHttpImpl.getInstance().uploadFile(outPutFile) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe { dismissProgressDialog() if (it.code != "200") { ToastUtil.toastShort(it.msg) return@subscribe } ToastUtil.toastShort("头像审核中,预计24小时内审核完成") underReview() iv_avatar.setImageBitmap(bitmap) } ) } } } } /** * 审核中 */ @SuppressLint("SetTextI18n") private fun underReview() { tv_tip1.text = "抱歉,七天内只能修改一次头像" tv_tip2.text = "审核中,预计24小时内审核完成,暂无法修改。" tv_modify.setBackgroundResource(R.drawable.bg_c3c4ca_corner_8) tv_modify.isEnabled = false } /** * 裁剪图片方法实现 */ private fun startPhotoZoom(uri: Uri?) { val intent = Intent("com.android.camera.action.CROP").apply { setDataAndType(uri, "image/*") putExtra("crop", "true") // 设置裁剪 putExtra("scaleUpIfNeeded", true) // 图片拉伸,就不会出现黑框了 //宽高的比例 putExtra("aspectX", 1) putExtra("aspectY", 1) //裁剪图片宽高 putExtra("outputX", 200) putExtra("outputY", 200) } intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mAvatarFile)) intent.putExtra("outputFormat", Bitmap.CompressFormat.PNG.toString())// return-data=true传递的为缩略图,小米手机默认传递大图,所以会导致onActivityResult调用失败 intent.putExtra("return-data", false)// intent.putExtra("noFaceDetection", false) // 是否需要人脸识别 startActivityForResult(intent, CROP) }}
\ No newline at end of file
......
......@@ -91,7 +91,7 @@ class ModifyInfoActivity : BaseActivity() {
.observeOn(AndroidSchedulers.mainThread())
.subscribe { response: BaseAPIResponse<UserModifyAuditRespDto> ->
if (response.code != "200") return@subscribe
val (_, auditStatus, _, _, _, _, _, last7Day, modifyAfter) = response.data
val (auditReason, auditStatus, _, _, _, _, _, last7Day, modifyAfter) = response.data
if (NICKNAME == from) {
when (auditStatus) {
1 -> { // 审核中
......@@ -108,7 +108,7 @@ class ModifyInfoActivity : BaseActivity() {
checkNickSaveButton(userInfo)
det_set_info.setText(userInfo.nick_name)
iv_warn.visible()
customerService("审核失败 ,昵称中含有违规文字。如有疑问联系客服小壹")
customerService("审核失败 ,$auditReason。如有疑问联系客服小壹")
}
3 -> { // 审核成功 || 提交审核
modifyAfter?.let { nick ->
......@@ -140,7 +140,7 @@ class ModifyInfoActivity : BaseActivity() {
setCanSave()
det_set_info.setText(userInfo.description)
iv_warn.visible()
customerService("审核失败,简介中含违规文字如有疑问联系客服小壹")
customerService("审核失败,$auditReason。如有疑问联系客服小壹")
}
3 -> { // 审核成功 || 提交审核
modifyAfter?.let {
......@@ -162,7 +162,7 @@ class ModifyInfoActivity : BaseActivity() {
tv_tip2.text = SpannableString(tip).also {
it.setSpan(
ForegroundColorSpan(resources.getColor(R.color.color_1DA1F2)),
it.indexOf("客服"),
it.lastIndexOf("客服"),
it.length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="#E6000000"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:background="#E6000000">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tip_bar"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="44dp"
app:layout_constraintTop_toTopOf="parent"
app:pa_divide_visibility="false"
app:pa_left_start_icon="@drawable/platform_common_back_un"
app:pa_title_text="头像"
app:pa_title_bar_text_color="@android:color/white"
app:pa_divide_visibility="false"/>
app:pa_title_text="头像" />
<TextView
android:id="@id/tv_tip1"
app:layout_constraintBottom_toTopOf="@id/iv_avatar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_62636F"
android:layout_marginBottom="12dp"
android:gravity="center"
android:textColor="@color/color_62636F"
android:textSize="12sp"
tools:text="抱歉,七天内只能修改一次头像"/>
app:layout_constraintBottom_toTopOf="@id/iv_avatar"
tools:text="抱歉,七天内只能修改一次头像" />
<ImageView
android:id="@+id/iv_avatar"
android:layout_marginBottom="20dp"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"/>
<ImageView
android:id="@+id/iv_warn"
android:layout_width="12dp"
android:layout_height="12dp"
app:layout_constraintEnd_toStartOf="@id/tv_tip2"
app:layout_constraintTop_toTopOf="@id/tv_tip2"
android:layout_marginEnd="3dp"
android:layout_marginTop="3.5dp"
android:visibility="gone"
tools:visibility="visible"
android:src="@drawable/modify_warn"/>
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_tip2"
android:layout_marginTop="12dp"
android:layout_marginStart="6dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_avatar"
android:layout_width="wrap_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
android:gravity="center"
android:textColor="@color/color_C3C4CA"
tools:text="审核失败,该头像提交不规范,请修改后重新提交审核。\n如有疑问联系客服小壹"/>
android:layout_marginTop="12dp"
android:gravity="center_horizontal"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/iv_avatar">
<ImageView
android:id="@+id/iv_warn"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginTop="3.5dp"
android:layout_marginEnd="3dp"
android:src="@drawable/modify_warn"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_tip2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/iv_warn"
android:gravity="center_horizontal"
android:textColor="@color/color_C3C4CA"
android:textSize="12sp"
tools:text="审核失败,XXX。如有疑问联系客服小壹" />
</RelativeLayout>
<TextView
android:id="@+id/tv_modify"
android:layout_width="333dp"
android:layout_height="54dp"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginBottom="50dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:gravity="center"
android:textSize="18sp"
android:background="@drawable/bg_1da1f2_corner_8"
android:gravity="center"
android:text="修改头像"
android:textColor="@android:color/white"
android:text="修改头像"/>
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -47,7 +47,6 @@
<LinearLayout
android:layout_marginTop="12dp"
android:layout_marginStart="26dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
......@@ -56,14 +55,16 @@
android:id="@+id/iv_warn"
android:visibility="gone"
tools:visibility="visible"
android:layout_marginStart="26dp"
android:layout_width="12dp"
android:layout_marginTop="3dp"
android:layout_height="12dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="4dp"
android:src="@drawable/modify_warn"/>
<TextView
android:id="@+id/tv_tip2"
android:layout_marginEnd="26dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_9d9ea7"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment