diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/FilterView.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/FilterView.java index d0bfab5..0a206cb 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/FilterView.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/FilterView.java @@ -253,12 +253,11 @@ public void onItemClick(AdapterView parent, View view, int position, long id) // 动画显示 public void show(int position) { + if (isShowing && lastFilterPosition == position) return; resetFilterStatus(); - if (lastFilterPosition != position) { - rotateArrowDown(lastFilterPosition); - lastFilterPosition = position; - } rotateArrowUp(position); + rotateArrowDown(lastFilterPosition); + lastFilterPosition = position; switch (position) { case POSITION_CATEGORY: @@ -298,6 +297,8 @@ public void hide() { resetFilterStatus(); rotateArrowDown(filterPosition); rotateArrowDown(lastFilterPosition); + filterPosition = -1; + lastFilterPosition = -1; viewMaskBg.setVisibility(View.GONE); ObjectAnimator.ofFloat(llContentListView, "translationY", 0, -panelHeight).setDuration(200).start(); }