当前位置: 首页 > news >正文

android 信息验证动画效果

在这里插入图片描述
layout_check_pro

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/parent"android:layout_width="wrap_content"android:layout_height="wrap_content"android:orientation="vertical"><ImageViewandroid:id="@+id/line"android:layout_width="@dimen/dp_2"android:layout_height="@dimen/dp_20"android:layout_marginStart="@dimen/dp_9"android:background="#D3D3D3" /><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:gravity="center_vertical"android:orientation="horizontal"><ImageViewandroid:id="@+id/iv_pro"android:layout_width="@dimen/dp_20"android:layout_height="@dimen/dp_20"android:src="@mipmap/icon_proc" /><TextViewandroid:id="@+id/tv_pro"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="@dimen/dp_16"android:text="大额提现3000元税款缴纳成功"android:textColor="@color/_333333"android:textSize="@dimen/sp_14"android:textStyle="bold" /></LinearLayout>
</LinearLayout>

dialog_act_info_verify

<?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"><ImageViewandroid:id="@+id/iv_bg"android:layout_width="@dimen/dp_280"android:layout_height="@dimen/dp_350"android:background="@mipmap/bg_info_verify"app:layout_constraintBottom_toBottomOf="parent"app:layout_constraintEnd_toEndOf="parent"app:layout_constraintStart_toStartOf="parent"app:layout_constraintTop_toTopOf="parent" /><LinearLayoutandroid:layout_width="@dimen/dp_244"android:layout_height="@dimen/dp_228"android:layout_marginBottom="@dimen/dp_18"android:gravity="center_horizontal"android:orientation="vertical"app:layout_constraintBottom_toBottomOf="@id/iv_bg"app:layout_constraintEnd_toEndOf="@id/iv_bg"app:layout_constraintStart_toStartOf="@id/iv_bg"><LinearLayoutandroid:layout_width="@dimen/dp_244"android:layout_height="@dimen/dp_228"android:layout_marginTop="@dimen/dp_20"android:orientation="vertical"android:paddingStart="@dimen/dp_22"><includeandroid:id="@+id/ll_pro1"layout="@layout/layout_check_pro" /><includeandroid:id="@+id/ll_pro2"layout="@layout/layout_check_pro" /><includeandroid:id="@+id/ll_pro3"layout="@layout/layout_check_pro" /><includeandroid:id="@+id/ll_pro4"layout="@layout/layout_check_pro" /><includeandroid:id="@+id/ll_pro5"layout="@layout/layout_check_pro" /></LinearLayout></LinearLayout></androidx.constraintlayout.widget.ConstraintLayout>
package com.zhe.song.wo.will.zgwh.dialogimport android.content.Context
import android.view.LayoutInflater
import androidx.core.graphics.toColorInt
import com.zhe.song.wo.will.zgwh.R
import com.zhe.song.wo.will.zgwh.constans.DialogCon
import com.zhe.song.wo.will.zgwh.databinding.DialogActInfoVerifyBinding
import com.zhe.song.wo.will.zgwh.databinding.LayoutCheckProBinding
import com.zhe.song.wo.will.zgwh.spf.SPFUserInfo
import com.zhe.song.wo.will.zgwh.utils.animationRotate
import com.zhe.song.wo.will.zgwh.utils.gone
import com.zhe.song.wo.will.zgwh.utils.hide
import com.zhe.song.wo.will.zgwh.utils.show
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch/*** 个人信息验证表格* @author zph* @date 2025/07/15* @constructor 创建DialogActInfoVerify* @param context 语境*/
class DialogActInfoVerify(context: Context) : DialogBase<DialogActInfoVerifyBinding>(context) {override fun postDismiss() {iDialogActionListener?.onDialogActionListener(DialogCon.DIALOG_信息验证)}/*** 后续连续登录X天,且(6-x)*10关;提现条件为5-X天,且每天过(6-x)*10关;* 直到条件为:在登录0天,且过60关,即可进入第七个档位*/override fun postShow() {SPFUserInfo.withDrawalState = truevar day = SPFUserInfo.needLoginDayif (day <= 0) {day = 0SPFUserInfo.wxBannerLevel8 = 1}val needLevel = 60 - (day * 10)if (SPFUserInfo.needGameLevel == 0) {SPFUserInfo.needGameLevel = SPFUserInfo.gameLevel + needLevel}val finishLevel = SPFUserInfo.needGameLevel - SPFUserInfo.gameLevelviewBinding.llPro1.line.gone()viewBinding.llPro1.parent.hide()viewBinding.llPro2.parent.hide()viewBinding.llPro3.parent.hide()viewBinding.llPro4.parent.hide()viewBinding.llPro5.parent.hide()coroutineScope.launch {loadLayout(viewBinding.llPro1, "登陆验证中...")delay(1500)loadLayoutSucccess(viewBinding.llPro1, "需要再登录(${6 - day}/6)天")loadLayout(viewBinding.llPro2, "网络环境验证中...")delay(1500)loadLayoutSucccess(viewBinding.llPro2, "网络环境安全验证通过")loadLayout(viewBinding.llPro3, "游戏行为验证中...")delay(1500)loadLayoutSucccess(viewBinding.llPro3, "游戏外挂行为验证通过")loadLayout(viewBinding.llPro4, "小助手解锁验证中...")delay(1500)loadLayoutSucccess(viewBinding.llPro4, "小助手解锁数量(${SPFUserInfo.assistantId})")loadLayout(viewBinding.llPro5, "闯关关卡验证中...")delay(1500)if (day == 0) {loadLayoutError(viewBinding.llPro5, "今日需要通过最后一关")} else {if (finishLevel <= 0) {loadLayoutSucccess(viewBinding.llPro5, "今日闯关已完成")} else {loadLayoutError(viewBinding.llPro5, "今日需要通过${needLevel - finishLevel}/${needLevel}关")}}delay(3000)dismiss()}}fun loadLayout(llPro: LayoutCheckProBinding, str: String) {llPro.parent.show()llPro.line.setBackgroundColor("#D3D3D3".toColorInt())llPro.ivPro.setImageResource(R.mipmap.icon_proc)llPro.ivPro.animationRotate()llPro.tvPro.setTextColor("#999999".toColorInt())llPro.tvPro.text = str}fun loadLayoutSucccess(llPro: LayoutCheckProBinding, str: String) {llPro.line.setBackgroundColor("#20C403".toColorInt())llPro.ivPro.clearAnimation()llPro.ivPro.setImageResource(R.mipmap.icon_suc)llPro.tvPro.setTextColor("#333333".toColorInt())llPro.tvPro.text = str}fun loadLayoutError(llPro: LayoutCheckProBinding, str: String) {llPro.line.setBackgroundColor("#FF0000".toColorInt())llPro.ivPro.clearAnimation()llPro.ivPro.setImageResource(R.mipmap.icon_error)llPro.tvPro.setTextColor("#FF0000".toColorInt())llPro.tvPro.text = str}override fun createViewBinding(): DialogActInfoVerifyBinding {return DialogActInfoVerifyBinding.inflate(LayoutInflater.from(context))}}
http://www.dtcms.com/a/285726.html

相关文章:

  • 精通 triton 使用 MLIR 的源码逻辑 - 第002节:再掌握一些 triton 语法 — 通过 02 softmax
  • 续签人员李权
  • 掌上医院微信小程序平台如何对接医保在线支付?
  • vue自定义指令bug
  • poi-excel-添加水印
  • Vue3 学习教程,从入门到精通,Vue3 项目打包语法知识点及案例代码(9)
  • Windows Server 版本之间有什么区别?
  • 私有服务器AI智能体搭建配置选择记录
  • NGFW服务器安全防护
  • 浏览器信息隔离全指南:从多账号管理到隐私防护
  • VirtualBox + CentOS:启用 DHCP 获取 IPv4 地址
  • 数据结构:顺序表和链表
  • 【PTA数据结构 | C语言版】斜堆的合并操作
  • Expression.Block详解
  • 微信小程序商品结算功能
  • gitlab-ce本地化部署
  • 一文讲清楚React的render优化,包括shouldComponentUpdate、PureComponent和memo
  • 在 React 中根据数值动态设置 SVG 线条粗细
  • Linux | Bash 子字符串提取
  • Java 8 Stream 流操作大全:从入门到实战全覆盖(附案例)
  • 【软件系统架构】系列七:系统性能——计算机性能深入解析
  • 【机器人】HOV-SG 开放词汇 | 分层3D场景图 | 语言引导机器人导航
  • DNN平台因恶意交互导致NTLM哈希泄露漏洞(CVE-2025-52488)
  • ​​Docker 速通教程
  • 用Python实现神经网络(四)
  • 【大模型:知识图谱】--6.Neo4j DeskTop安装+使用
  • 数字化转型:概念性名词浅谈(第三十讲)
  • JAVA面试宝典 -《Elasticsearch 深度调优实战》
  • OpenAI发布通用智能体ChatGPT Agent:实现自主思考、联网与工具调用,智能体赛道大变天!
  • Java 大视界 -- Java 大数据在智能医疗电子健康档案数据挖掘与健康服务创新中的应用(350)