From 6627ca5129d247af877d88c1a5c67ceac92189f9 Mon Sep 17 00:00:00 2001 From: weikaiyun Date: Fri, 11 Sep 2020 09:58:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weikaiyun/fragmentation/SupportFragmentDelegate.java | 3 +-- .../com/weikaiyun/fragmentation/TransactionDelegate.java | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/fragmentation/src/main/java/com/weikaiyun/fragmentation/SupportFragmentDelegate.java b/fragmentation/src/main/java/com/weikaiyun/fragmentation/SupportFragmentDelegate.java index dc73b27..ea76bb4 100644 --- a/fragmentation/src/main/java/com/weikaiyun/fragmentation/SupportFragmentDelegate.java +++ b/fragmentation/src/main/java/com/weikaiyun/fragmentation/SupportFragmentDelegate.java @@ -308,8 +308,7 @@ private ISupportFragment getChildTopFragment() { } public void setBackground(View view) { - if ((mFragment.getTag() != null && mFragment.getTag().startsWith("android:switcher:")) - || view.getBackground() != null) { + if (view.getBackground() != null) { return; } diff --git a/fragmentation/src/main/java/com/weikaiyun/fragmentation/TransactionDelegate.java b/fragmentation/src/main/java/com/weikaiyun/fragmentation/TransactionDelegate.java index a25117f..7466361 100644 --- a/fragmentation/src/main/java/com/weikaiyun/fragmentation/TransactionDelegate.java +++ b/fragmentation/src/main/java/com/weikaiyun/fragmentation/TransactionDelegate.java @@ -330,12 +330,6 @@ private ISupportFragment getTopFragmentForStart(ISupportFragment from, FragmentM if (from == null) { top = SupportHelper.getTopFragment(fm); } else { - if (from.getSupportDelegate().mContainerId == 0) { - Fragment fromF = (Fragment) from; - if (fromF.getTag() != null && !fromF.getTag().startsWith("android:switcher:")) { - throw new IllegalStateException("Can't find container, please call loadRootFragment() first!"); - } - } top = SupportHelper.getTopFragment(fm, from.getSupportDelegate().mContainerId); } return top;