Browse 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 6 years ago
parent
commit
919958dcb1

+ 0
- 10
lib/android/app/src/main/java/com/reactnativenavigation/views/topbar/TopBar.java View File

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);