From 03bf1fe1b226d988ec2aec9a8d27e4213cb4d29c Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 26 May 2022 12:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=BA=90=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- POPDialog/src/main/java/com/yutou/popdialog/POPDialog.kt | 6 +++--- .../res/anim/{enter_anim.xml => pop_dialog_enter_anim.xml} | 0 .../res/anim/{exit_anim.xml => pop_dialog_exit_anim.xml} | 0 .../res/drawable/{dialog_line.xml => pop_dialog_line.xml} | 0 .../res/drawable/{dialog_title.xml => pop_dialog_title.xml} | 0 POPDialog/src/main/res/layout/pop_dialog_layout.xml | 2 +- POPDialog/src/main/res/values/styles.xml | 4 ++-- 7 files changed, 6 insertions(+), 6 deletions(-) rename POPDialog/src/main/res/anim/{enter_anim.xml => pop_dialog_enter_anim.xml} (100%) rename POPDialog/src/main/res/anim/{exit_anim.xml => pop_dialog_exit_anim.xml} (100%) rename POPDialog/src/main/res/drawable/{dialog_line.xml => pop_dialog_line.xml} (100%) rename POPDialog/src/main/res/drawable/{dialog_title.xml => pop_dialog_title.xml} (100%) diff --git a/POPDialog/src/main/java/com/yutou/popdialog/POPDialog.kt b/POPDialog/src/main/java/com/yutou/popdialog/POPDialog.kt index 2b36aff..40cb770 100644 --- a/POPDialog/src/main/java/com/yutou/popdialog/POPDialog.kt +++ b/POPDialog/src/main/java/com/yutou/popdialog/POPDialog.kt @@ -56,7 +56,7 @@ class POPDialog : Dialog { LayoutInflater.from(context).inflate(defLayoutResId, mainView, false) val animation = AnimationUtils.loadAnimation( context, - R.anim.enter_anim + R.anim.pop_dialog_enter_anim ) view.startAnimation(animation) val windowParams = FrameLayout.LayoutParams( @@ -160,7 +160,7 @@ class POPDialog : Dialog { window!!.setWindowAnimations(R.style.dialog_pop_anim) val attributes = window?.attributes!! - attributes.windowAnimations = R.anim.enter_anim + attributes.windowAnimations = R.anim.pop_dialog_enter_anim attributes.x = 0 attributes.y = 0 window!!.attributes = attributes @@ -271,7 +271,7 @@ class POPDialog : Dialog { fun finish() { val animation = AnimationUtils.loadAnimation( context, - R.anim.exit_anim + R.anim.pop_dialog_exit_anim ) animation.setAnimationListener(object : Animation.AnimationListener { override fun onAnimationStart(p0: Animation?) { diff --git a/POPDialog/src/main/res/anim/enter_anim.xml b/POPDialog/src/main/res/anim/pop_dialog_enter_anim.xml similarity index 100% rename from POPDialog/src/main/res/anim/enter_anim.xml rename to POPDialog/src/main/res/anim/pop_dialog_enter_anim.xml diff --git a/POPDialog/src/main/res/anim/exit_anim.xml b/POPDialog/src/main/res/anim/pop_dialog_exit_anim.xml similarity index 100% rename from POPDialog/src/main/res/anim/exit_anim.xml rename to POPDialog/src/main/res/anim/pop_dialog_exit_anim.xml diff --git a/POPDialog/src/main/res/drawable/dialog_line.xml b/POPDialog/src/main/res/drawable/pop_dialog_line.xml similarity index 100% rename from POPDialog/src/main/res/drawable/dialog_line.xml rename to POPDialog/src/main/res/drawable/pop_dialog_line.xml diff --git a/POPDialog/src/main/res/drawable/dialog_title.xml b/POPDialog/src/main/res/drawable/pop_dialog_title.xml similarity index 100% rename from POPDialog/src/main/res/drawable/dialog_title.xml rename to POPDialog/src/main/res/drawable/pop_dialog_title.xml diff --git a/POPDialog/src/main/res/layout/pop_dialog_layout.xml b/POPDialog/src/main/res/layout/pop_dialog_layout.xml index bab112c..f61053e 100644 --- a/POPDialog/src/main/res/layout/pop_dialog_layout.xml +++ b/POPDialog/src/main/res/layout/pop_dialog_layout.xml @@ -9,7 +9,7 @@ android:id="@+id/pop_dialog_title_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/dialog_title" + android:background="@drawable/pop_dialog_title" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/POPDialog/src/main/res/values/styles.xml b/POPDialog/src/main/res/values/styles.xml index 1b06424..12c60c1 100644 --- a/POPDialog/src/main/res/values/styles.xml +++ b/POPDialog/src/main/res/values/styles.xml @@ -1,7 +1,7 @@