<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jongz Puangput on Medium]]></title>
        <description><![CDATA[Stories by Jongz Puangput on Medium]]></description>
        <link>https://medium.com/@jongzpuangput?source=rss-69254c0d76d7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*j9UNuvlffeaqiHDA.</url>
            <title>Stories by Jongz Puangput on Medium</title>
            <link>https://medium.com/@jongzpuangput?source=rss-69254c0d76d7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:13:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jongzpuangput/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flutter — Splash Screen]]></title>
            <link>https://medium.com/@jongzpuangput/flutter-splash-screen-5c8a0001721b?source=rss-69254c0d76d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c8a0001721b</guid>
            <category><![CDATA[flutter-ui]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Jongz Puangput]]></dc:creator>
            <pubDate>Sun, 19 May 2019 10:21:36 GMT</pubDate>
            <atom:updated>2019-05-19T10:21:36.935Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter — Splash Screen</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sOhn4zK64rqR0tWd6H9YgQ.jpeg" /></figure><p>Today, we are going to do the real splash screen in Flutter for both Android and iOS. You may think that all we need to do is create a flutter Widget, right? But it’s not… That is not what the real splash screen behave in Android and iOS!</p><h4>The purpose of the Splash Screen</h4><p>The main reason is to hide the application loading from a <strong>cold state</strong> (Imagine that you need to heat something from the refrigerator before eating). Apart from your business requirement, an application needs to do some initialization, and that time we don’t want the user to feel that an application is freezing, so the splash screen comes in.</p><p>However, if you use the flutter widget as a splash screen, it won’t work because the application has not been initialized completely to run and render anything from flutter framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*GQqR2oqCwcfbv95Amuz9QQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*A8ARFJtFHZHkVxLwXNEVDg.gif" /><figcaption>The white blank screen is shown for a while before the Flutter widget (splash screen) appears.</figcaption></figure><h4>The native Splash Screen</h4><p>Yes, there is no other way to do from Flutter (as far as I know). Instead, Android and iOS have offered a way to handle this scenario. <strong><em>Let’s do it!</em></strong></p><h3>Android Splash Screen</h3><ol><li>In your Flutter project under <strong>android</strong> folder open <strong>launch_background.xml </strong>which located in <strong>android/app/src/main/res/drawable</strong></li></ol><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;!-- Modify this file to customize your launch splash screen --&gt;<br>&lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br>    &lt;item android:drawable=&quot;@android:color/white&quot; /&gt;</pre><pre>    &lt;!-- You can insert your own image assets here --&gt;<br>    &lt;!-- &lt;item&gt;<br>        &lt;bitmap<br>            android:gravity=&quot;center&quot;<br>            android:src=&quot;@mipmap/launch_image&quot; /&gt;<br>    &lt;/item&gt; --&gt;<br>&lt;/layer-list&gt;</pre><p>2. Change splash background color with this line</p><pre>&lt;item android:drawable=&quot;@android:color/white&quot; /&gt;</pre><p>2.1 Or change the line to be this one if you want to use Hex color.</p><pre>&lt;item&gt;<br>    &lt;shape&gt;<br>        &lt;solid android:color=&quot;#221F20&quot;/&gt;<br>    &lt;/shape&gt;<br>&lt;/item&gt;</pre><p>3. Show an app icon in the splash by uncommenting the following line</p><pre>&lt;item&gt;<br>     &lt;bitmap<br>          android:gravity=&quot;center&quot;<br>          android:src=&quot;@mipmap/launch_image&quot; /&gt;<br>&lt;/item&gt;</pre><p>3.1 Add your image into the drawable folder; make sure you have icons for the different size of all Android screen (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*lkYBNF1u0tQdxKWWuxt8Iw.png" /></figure><p>3.2 change the icon by changing the src attribute to your image. <br>*<em>The gravity is set to “center” so your logo will show at the center of the screen.</em>*</p><pre>&lt;item&gt;<br>    &lt;bitmap<br>        android:gravity=&quot;center&quot;<br>        android:src=&quot;@drawable/ic_flutter_logo&quot; /&gt;<br>&lt;/item&gt;</pre><h4>A complete version of launch_background.xml</h4><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;!-- Modify this file to customize your launch splash screen --&gt;<br>&lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br>    &lt;item&gt;<br>        &lt;shape&gt;<br>            &lt;solid android:color=&quot;#221F20&quot; /&gt;<br>        &lt;/shape&gt;<br>    &lt;/item&gt;</pre><pre>    &lt;!-- You can insert your own image assets here --&gt;<br>    &lt;item&gt;<br>        &lt;bitmap<br>            android:gravity=&quot;center&quot;<br>            android:src=&quot;@drawable/ic_flutter_logo&quot; /&gt;<br>    &lt;/item&gt;<br>&lt;/layer-list&gt;</pre><h3>iOS Splash Screen</h3><ol><li>Using XCode open the iOS folder in your Flutter project.</li><li>Then navigate into Runner/Runner/Assets.xcassets/LaunchImage</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jg8NrFeVd3qQTufz4uWFIA.png" /></figure><p>3. Add your icon by drag &amp; drop into 1x, 2x, 3x slot make sure you have all images to support different iOS screen size.</p><p>4. Go to LaunchScreen.storyboard, click View, or LaunchImage to change the background color or other attributes as you want.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7f_hoHngF5Q4cac6WWUvLQ.png" /></figure><h3>Bamm!! Finally</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*KJaaKJty216N10jr9ny2zA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*FN5tiBaM7xNnjUSo-TBkrA.gif" /></figure><p>PS. I made all splash logo icon by using Sketch with Zeplin plugins. Then, download all generated icon for both Android and iOS from Zeplin.</p><p>Github repo is <a href="https://github.com/sattha/demo-flutter-splashscreen">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c8a0001721b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Studio 3.1 — Finding Useful Error Log Output]]></title>
            <link>https://medium.com/@jongzpuangput/android-3-1-finding-useful-log-output-27d96a236130?source=rss-69254c0d76d7------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d96a236130</guid>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Jongz Puangput]]></dc:creator>
            <pubDate>Sun, 01 Apr 2018 01:35:40 GMT</pubDate>
            <atom:updated>2018-04-01T02:54:02.064Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Z_EJoSduttUFH4Rp36lIBw.png" /></figure><p>I have struggled with finding an error more than 4 hours !! here is what happened…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*badiZvOknU8YHAYVqh45xw.jpeg" /></figure><blockquote>error: dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.</blockquote><p>I got this error from Android Studio, which is not helpful at all !!. I didn’t know where it’s really occurs in my code. And finding one error in entire project is like “Find a needle in a haystack”</p><p>So, let’s try to make our IDE provides more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5TKa-8aTL2lBWWhSnz7W1Q.png" /></figure><p>Okay, after searching StackOverflow for a while, you can edit Command-line Options under <em>File -&gt; Settings -&gt; Compiler</em> on Window and <em>Android Studio -&gt; Preferences -&gt; Compiler</em> on Mac to be--stacktrace --debug to provide more information.</p><p>However, after editing Command-line Options, there is nothing change in build log.. (v.v) which step did I miss and where is all the log go ??</p><p>..</p><p>..</p><p>Time Skip 4 Hours !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*6z52bzAylybjasuL_-XY0w.jpeg" /></figure><p>I just clicked on Toggle View and…..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0heVIJsJcdbJEezxDiPqjg.jpeg" /></figure><p>It has been there at the beginning. Actually, in my case, it is not necessary to change config. However, in other case, you may need change config in order to know more information to solve the error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*UmwBhCruig1Pt8BuUeiA9A.jpeg" /></figure><p>And that’s it, I found an unknown @Inject annotation (How can it be there &gt;.&lt;!!) So, remove it, the error will be resolved. Hope it helps someone to find errors on a new Android Studio 3.1.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d96a236130" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>