Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/141 .
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
https://android-review.googlesource.com/1649748
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request from
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
pa...@gmail.com <pa...@gmail.com> #3
That would be great!
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 728527e886caa90a6addefc0e337aae203575ce1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Nov 20 10:37:25 2020
Only require Activities for inflated FragmentContainerViews
We currently throw an error when attempting to inflate a
FragmentContainerView outside of a FragmentActivity. This requirement is
actually only for views that are being inflated.
This change makes it so we only throw the error for inflated
FragmentContainerViews.
RelNote: "FragmentContainerViews that are not inflated using a class or android:name attribute can now be used outside of a FragmentActivity"
Test: all tests pass
Bug: 172266337
Change-Id: Id4397edf815e6603016e0a7798232c8e9f9f065f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentContainerViewTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentContainerView.java
https://android-review.googlesource.com/1507682
Branch: androidx-master-dev
commit 728527e886caa90a6addefc0e337aae203575ce1
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Nov 20 10:37:25 2020
Only require Activities for inflated FragmentContainerViews
We currently throw an error when attempting to inflate a
FragmentContainerView outside of a FragmentActivity. This requirement is
actually only for views that are being inflated.
This change makes it so we only throw the error for inflated
FragmentContainerViews.
RelNote: "FragmentContainerViews that are not inflated using a class or android:name attribute can now be used outside of a FragmentActivity"
Test: all tests pass
Bug: 172266337
Change-Id: Id4397edf815e6603016e0a7798232c8e9f9f065f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentContainerViewTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentContainerView.java
jb...@google.com <jb...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.3.0-beta02
release.
Description
Component used: Fragment Version used: 1.3.0-beta01
With lib Fragment version 1.2 it is now recommended to use FragmentContainerView instead FrameLayout but that requires FragmentActivity.
Not sure why this requirement was introduced? In our use case user can use app on phone or mirror app to remote device with means DisplayManager.createVirtualDisplay . In both cases we use same stack of fragments, there is no need to run activity in second flow.
Can we bring this functionality back?