avatarArathi Shankri

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2224

Abstract

v2/resize:fit:800/1vD13LW4RPAaf-7LMwojrtg.png"><figcaption>Step 3: <item> <bitmap> code uncommented.</bitmap></item></figcaption></figure><p id="b5ec"><b>Note: </b>”gravity” is used to scale both horizontally (fill_horizontal) and vertically (fill_vertical) to cover the screen.</p><figure id="df81"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*Fv8mYbmcXa-zew3e"><figcaption>Step 4: Folder structure under “res\drawable” for different resolutions.</figcaption></figure><p id="e6ba"><b>Note: </b>Folders with “-land-*” are for landscape mode. The following different resolutions are supported.</p><p id="df64">LDPI: Portrait: 200x320px. Landscape: 320x200px.</p><p id="b9e4">MDPI: Portrait: 320x480px. Landscape: 480x320px.</p><p id="7545">HDPI: Portrait: 480x800px. Landscape: 800x480px.</p><p id="12f6">XHDPI: Portrait: 720px1280px. Landscape: 1280x720px.</p><p id="85a4">XXHDPI: Portrait: 960px1600px. Landscape: 1600x960px.</p><p id="2d51">XXXHDPI: Portrait: 1280px1920px. Landscape: 1920x1280px.</p><blockquote id="4124"><p><a href="https://apetools.webprofusion.com/#/tools/imagegorilla">ImageGorilla</a> is a nice tool to create your icons for different resolutions.</p></blockquote><h1 id="3b70">Android Launch or App Icon</h1><p id="d6ae"><a href="https://flutter.dev/docs/deployment/android">https://flutter.dev/docs/deployment/android</a></p><ol><li>In “<b>android\app\src\main\AndroidManifest.xml</b>” change “icon” to “roundIcon”. (Your app shortcut will be a round icon now)</li></ol><p id="0fdb">2. Name of the image should always be “logo.png” and should be placed under different resolution folders under “res/drawable” (same folder as your splash screen)</p><p id="ae4c">3. Change the value of “label” to change the display name of the app as it appears below the icon.</p><p id="b8fc">4. That’s it, you are all set to download your app to your emulator, simulator or a real device to test the launch icon.</p><blockquote id="b970"><p>I found <a href="https://jgilfelt.github.io/AndroidAssetStudio/icons-launcher.html">Android Asset Studio </a>very useful for icon creation</p></blockquote><h1 id="df93">Splash Screen for iOS</h1><p id="d264"><a href="https://docs.nativescript.org/too

Options

ling/publishing/creating-launch-screens-ios">https://docs.nativescript.org/tooling/publishing/creating-launch-screens-ios</a></p><ol><li>On Android Studio or Visual Studio, under “<b>ios\Runner\Assets.xcassets\Launchimage.imageset</b>” directory, place/copy all your image logo files.</li><li>In the same folder, in “<b>Contents.json</b>”, add the file name for all the images that you just added.</li></ol><figure id="9aad"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*JFBUMhcQ991e_7VD4fv99w.png"><figcaption><b>Step 1: ios\Runner\Assets.xcassets\Launchimage.imageset</b>” directory</figcaption></figure><figure id="ef47"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*kWaMTLh-7CEAG-bafbg-DA.png"><figcaption><b>Step 2: ios\Runner\Assets.xcassets\Contents.json</b></figcaption></figure><blockquote id="8790"><p><a href="https://appicon.co/">AppIcon</a> is a nice tool to generate iOS icons along with contents.json contents.</p></blockquote><h1 id="7873">iOS Launch or App Icon</h1><p id="6c33">Creating an app icon for iOS happens with the actual App Store. Here is the link for the same: <a href="https://flutter.dev/docs/deployment/ios">https://flutter.dev/docs/deployment/ios</a>.</p><p id="5cd9">I am still working on my app and will update this section when I release my app :-)</p><p id="808a">Hope you found my article helpful! I know there is a lot of material on the internet and between all of them, you will get your task done!</p><p id="4ea2">Happy programming!</p><p id="bee4">Arathi</p><p id="cbbf">P.S: I love to see you have clapped…</p><div id="26ee" class="link-block"> <a href="https://www.twitter.com/FlutterComm"> <div> <div> <h2>Flutter Community</h2> <div><h3>The latest Tweets from Flutter Community (@FlutterComm). Follow to get notifications of new articles and packages from…</h3></div> <div><p>www.twitter.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*6xCqnY58X11Yg13v)"></div> </div> </div> </a> </div></article></body>

Flutter Splash Screen — ready, set, go

Splash screen, as referred, is the loading screen that is displayed when you open an app. This screen is the gateway to your app and can provide brief info to the user.

Launch icon, is the thumbnail that sits on your phone when your app is installed.

Flutter has good documentation to help you get started and I referred the same before documenting further the process I went through to implement my splash screen. https://flutter.dev/docs/development/ui/assets-and-images#updating-the-launch-screen

Though the best part of Flutter is a single code base for Android and iOS, since the splash screen is device-dependent, the implementation for each varies. I will share with you the steps I followed to implement both the splash screen and launch/app icon.

Splash Screen for Android

https://docs.nativescript.org/tooling/publishing/creating-launch-screens-android

  1. Open your project in your favorite editor. (Android Studio or Visual Studio)
  2. By default “android\app\src\main\res\drawable\launch_background.xml” is provided in the application that enables the launch screen.
  3. But by default, the <item> <bitmap> code is commented because of which you don’t see the splash screen. Uncomment that code.
  4. Make sure your screen image is present in all the “mipmap” folders under the “res” directory. There are various mipmap folders to accommodate various images with different resolutions. Image name should always be named “screen.png” across different resolution folders.
  5. Run your app, you should find the splash screen coming up.
Step 3: code uncommented.

Note: ”gravity” is used to scale both horizontally (fill_horizontal) and vertically (fill_vertical) to cover the screen.

Step 4: Folder structure under “res\drawable” for different resolutions.

Note: Folders with “*-land-*” are for landscape mode. The following different resolutions are supported.

LDPI: Portrait: 200x320px. Landscape: 320x200px.

MDPI: Portrait: 320x480px. Landscape: 480x320px.

HDPI: Portrait: 480x800px. Landscape: 800x480px.

XHDPI: Portrait: 720px1280px. Landscape: 1280x720px.

XXHDPI: Portrait: 960px1600px. Landscape: 1600x960px.

XXXHDPI: Portrait: 1280px1920px. Landscape: 1920x1280px.

ImageGorilla is a nice tool to create your icons for different resolutions.

Android Launch or App Icon

https://flutter.dev/docs/deployment/android

  1. In “android\app\src\main\AndroidManifest.xml” change “icon” to “roundIcon”. (Your app shortcut will be a round icon now)

2. Name of the image should always be “logo.png” and should be placed under different resolution folders under “res/drawable” (same folder as your splash screen)

3. Change the value of “label” to change the display name of the app as it appears below the icon.

4. That’s it, you are all set to download your app to your emulator, simulator or a real device to test the launch icon.

I found Android Asset Studio very useful for icon creation

Splash Screen for iOS

https://docs.nativescript.org/tooling/publishing/creating-launch-screens-ios

  1. On Android Studio or Visual Studio, under “ios\Runner\Assets.xcassets\Launchimage.imageset” directory, place/copy all your image logo files.
  2. In the same folder, in “Contents.json”, add the file name for all the images that you just added.
Step 1: ios\Runner\Assets.xcassets\Launchimage.imageset” directory
Step 2: ios\Runner\Assets.xcassets\Contents.json

AppIcon is a nice tool to generate iOS icons along with contents.json contents.

iOS Launch or App Icon

Creating an app icon for iOS happens with the actual App Store. Here is the link for the same: https://flutter.dev/docs/deployment/ios.

I am still working on my app and will update this section when I release my app :-)

Hope you found my article helpful! I know there is a lot of material on the internet and between all of them, you will get your task done!

Happy programming!

Arathi

P.S: I love to see you have clapped…

Flutter
Mobile App Development
Splash Screen
Dart
Flutter Community
Recommended from ReadMedium