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
def2205e
Unverified
Commit
def2205e
authored
Jan 22, 2020
by
Matt Carroll
Committed by
GitHub
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android Project: Opt into splash behavior by default. (#49096)
parent
2a7d5779
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
AndroidManifest.xml.tmpl
...es/app/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
+19
-0
styles.xml
...lates/app/android.tmpl/app/src/main/res/values/styles.xml
+10
-0
No files found.
packages/flutter_tools/templates/app/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
View file @
def2205e
...
...
@@ -25,6 +25,25 @@
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
{{/useAndroidEmbeddingV2}}
{{#useAndroidEmbeddingV2}}
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
{{/useAndroidEmbeddingV2}}
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
...
...
packages/flutter_tools/templates/app/android.tmpl/app/src/main/res/values/styles.xml
View file @
def2205e
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style
name=
"LaunchTheme"
parent=
"@android:style/Theme.Black.NoTitleBar"
>
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item
name=
"android:windowBackground"
>
@drawable/launch_background
</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style
name=
"NormalTheme"
parent=
"@android:style/Theme.Black.NoTitleBar"
>
<item
name=
"android:windowBackground"
>
@android:color/white
</item>
</style>
</resources>
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