Преглед изворни кода

Don't remove TopBar from hierarchy when changing its visibility

When TopBar visibility was changed during screen animation, changes to hierarchy
caused screen animation to end prematurely.
Guy Carmeli пре 6 година
родитељ
комит
919958dcb1

+ 0
- 10
lib/android/app/src/main/java/com/reactnativenavigation/views/topbar/TopBar.java Прегледај датотеку

@@ -279,16 +279,6 @@ public class TopBar extends AppBarLayout implements ScrollEventListener.ScrollAw
279 279
         animator.hide(options, onAnimationEnd);
280 280
     }
281 281
 
282
-    @Override
283
-    public void setVisibility(int visibility) {
284
-        super.setVisibility(visibility);
285
-        if (visibility == View.GONE) {
286
-            this.parentView.removeView(this);
287
-        } else if (visibility == View.VISIBLE && this.getParent() == null) {
288
-            this.parentView.addView(this);
289
-        }
290
-    }
291
-
292 282
     public void clear() {
293 283
         topBarBackgroundViewController.destroy();
294 284
         topBarBackgroundViewController = new TopBarBackgroundViewController(topBarBackgroundViewController);