Skip to content

Commit ee6070a

Browse files
fix(*): 优化EasyPopupWindow显示和隐藏的动画
1 parent 1ecc8df commit ee6070a

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

lite/src/main/java/com/pengxh/kt/lite/widget/EasyPopupWindow.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import android.widget.TextView
1212
import com.pengxh.kt.lite.R
1313
import com.pengxh.kt.lite.extensions.getScreenWidth
1414

15-
/**
16-
* TODO 封装不尽人意,先就这样吧
17-
* */
1815
class EasyPopupWindow constructor(context: Context) : PopupWindow() {
1916

2017
init {
@@ -33,6 +30,7 @@ class EasyPopupWindow constructor(context: Context) : PopupWindow() {
3330
val listView = contentView.findViewById<ListView>(R.id.listView)
3431
listView.adapter = object : BaseAdapter() {
3532
private val inflater: LayoutInflater = LayoutInflater.from(contentView.context)
33+
3634
override fun getCount(): Int {
3735
return menuItems.size
3836
}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<set xmlns:android="http://schemas.android.com/apk/res/android">
33
<scale
4-
android:duration="300"
54
android:fromXScale="1.0"
65
android:fromYScale="1.0"
7-
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
8-
android:pivotX="50%"
9-
android:pivotY="0%"
106
android:toXScale="0.0"
117
android:toYScale="0.0" />
128
</set>
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<set xmlns:android="http://schemas.android.com/apk/res/android">
33
<scale
4-
android:duration="300"
54
android:fromXScale="0.0"
65
android:fromYScale="0.0"
7-
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
8-
android:pivotX="50%"
9-
android:pivotY="0%"
106
android:toXScale="1.0"
117
android:toYScale="1.0" />
128
</set>

0 commit comments

Comments
 (0)