Revert "[Android] Bottom tab not update" (#285)

This reverts commit ca6319d26e.
This commit is contained in:
Krzysztof Magiera
2020-01-17 22:11:37 +01:00
committed by GitHub
parent d71aa2c6ef
commit 518c094657
3 changed files with 0 additions and 25 deletions

View File

@@ -243,24 +243,10 @@ public class ScreenContainer<T extends ScreenFragment> extends ViewGroup {
return mScreenFragments.contains(screenFragment);
}
protected void ensureFragmentManager() {
if (mFragmentManager != null && mFragmentManager.isDestroyed()) {
// When fragmentManager is destroyed, try to remove current fragment's views
for (int i = 0, size = mScreenFragments.size(); i < size; i++) {
ScreenFragment screenFragment = mScreenFragments.get(i);
removeView(screenFragment.getScreenRootView());
}
mFragmentManager = null;
mActiveScreenFragments.clear();
mNeedUpdate = true;
}
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mIsAttached = true;
ensureFragmentManager();
updateIfNeeded();
}

View File

@@ -1,13 +1,11 @@
package com.swmansion.rnscreens;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
@@ -35,10 +33,6 @@ public class ScreenFragment extends Fragment {
return mScreenView;
}
protected ViewGroup getScreenRootView() {
return mScreenView;
}
public Screen getScreen() {
return mScreenView;
}

View File

@@ -96,11 +96,6 @@ public class ScreenStackFragment extends ScreenFragment {
return mScreenRootView;
}
@Override
protected ViewGroup getScreenRootView() {
return mScreenRootView;
}
public boolean isDismissable() {
View child = mScreenView.getChildAt(0);
if (child instanceof ScreenStackHeaderConfig) {