Parcourir la source

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 il y a 7 ans
Parent
révision
919958dcb1

+ 0
- 10
lib/android/app/src/main/java/com/reactnativenavigation/views/topbar/TopBar.java Voir le fichier

279
         animator.hide(options, onAnimationEnd);
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
     public void clear() {
282
     public void clear() {
293
         topBarBackgroundViewController.destroy();
283
         topBarBackgroundViewController.destroy();
294
         topBarBackgroundViewController = new TopBarBackgroundViewController(topBarBackgroundViewController);
284
         topBarBackgroundViewController = new TopBarBackgroundViewController(topBarBackgroundViewController);