From 5b810b0d9caac0d82cd49f01ab50c689b01fdf14 Mon Sep 17 00:00:00 2001 From: sfsheng0322 Date: Sun, 27 Nov 2016 15:28:15 +0800 Subject: [PATCH] V1.6 --- .../sunfusheng/StickyHeaderListView/view/FilterView.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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(); }