This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Android] Access FlutterFragmentActivity's content view ID#30595
Merged
dnfield merged 1 commit intoflutter:mainfrom Jan 20, 2022
Merged
[Android] Access FlutterFragmentActivity's content view ID#30595dnfield merged 1 commit intoflutter:mainfrom
dnfield merged 1 commit intoflutter:mainfrom
Conversation
6ed566a to
6be025f
Compare
Contributor
Author
|
Hi @dnfield , can I trouble you to have a look at this PR? Thank you :) |
Contributor
|
I think thi sis fine but would defer to @blasten |
blasten
reviewed
Jan 11, 2022
shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java
Outdated
Show resolved
Hide resolved
3b09d94 to
044a5ac
Compare
044a5ac to
5e23366
Compare
Contributor
Author
|
Hi @blasten I have since made the change, please have a look. Thanks! |
Contributor
|
Ping @blasten for re-review. |
dnfield
approved these changes
Jan 20, 2022
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 21, 2022
…iewUtils.generateViewId (flutter/engine#30595)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 21, 2022
…iewUtils.generateViewId (flutter/engine#30595)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 21, 2022
…iewUtils.generateViewId (flutter/engine#30595)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allowing access to FlutterFragmentActivity's content view ID.
Currently this is the way for user to access root layout ID (FRAGMENT_CONTAINER_ID) when extending from FlutterFragmentActivity, but what if there were breaking changes?
private fun getRootViewId(): Int {var rootView: ViewGroup? = (this.findViewById(android.R.id.content) as ViewGroup).getChildAt(0) as ViewGroupreturn rootView?.getId() ?: NO_ROOT_VIEW}Activities extending from FlutterFragmentActivity can add views to root layout instead of creating a new layout.
This is especially useful when the user wants to create additional fragments and transact them to the root layout.
Pre-launch Checklist
writing and running engine tests.
///).