Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c863c018
Unverified
Commit
c863c018
authored
Jul 30, 2021
by
Jia Hao
Committed by
GitHub
Jul 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use FLUTTER_VIEW_ID to find the Flutter view (#87324)
parent
a69b3ca5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
MainActivity.java
...ava/io/flutter/integration/androidviews/MainActivity.java
+1
-4
MainActivity.java
...ava/io/flutter/integration/androidviews/MainActivity.java
+1
-3
No files found.
dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java
View file @
c863c018
...
...
@@ -10,7 +10,6 @@ import android.os.Build;
import
android.os.Bundle
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
java.util.HashMap
;
...
...
@@ -32,9 +31,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
private
MethodChannel
.
Result
permissionResult
;
private
View
getFlutterView
()
{
// TODO(egarciad): Set an unique ID in FlutterView, so it's easier to look it up.
ViewGroup
root
=
(
ViewGroup
)
findViewById
(
android
.
R
.
id
.
content
);
return
((
ViewGroup
)
root
.
getChildAt
(
0
)).
getChildAt
(
0
);
return
findViewById
(
FLUTTER_VIEW_ID
);
}
@Override
...
...
dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java
View file @
c863c018
...
...
@@ -36,9 +36,7 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
private
MethodChannel
.
Result
permissionResult
;
private
View
getFlutterView
()
{
// TODO(egarciad): Set an unique ID in FlutterView, so it's easier to look it up.
ViewGroup
root
=
(
ViewGroup
)
findViewById
(
android
.
R
.
id
.
content
);
return
((
ViewGroup
)
root
.
getChildAt
(
0
)).
getChildAt
(
0
);
return
findViewById
(
FLUTTER_VIEW_ID
);
}
private
String
getViewName
(
View
view
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment