<?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 Amar Jain on Medium]]></title>
        <description><![CDATA[Stories by Amar Jain on Medium]]></description>
        <link>https://medium.com/@amar.jain?source=rss-a0a1a0b391cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WhRiEcXUVGo__vDnE7frLA.jpeg</url>
            <title>Stories by Amar Jain on Medium</title>
            <link>https://medium.com/@amar.jain?source=rss-a0a1a0b391cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 09:11:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amar.jain/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[Time for Crap]]></title>
            <link>https://medium.com/android-news/time-for-crap-aaf26568f4eb?source=rss-a0a1a0b391cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaf26568f4eb</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Amar Jain]]></dc:creator>
            <pubDate>Thu, 15 Nov 2018 10:31:58 GMT</pubDate>
            <atom:updated>2018-11-29T10:17:23.991Z</atom:updated>
            <content:encoded><![CDATA[<h3>Time for “Crap”</h3><p>As developers, we often hesitate to adopt new technologies in their nascent stages, for production code. The daunting question of stability hangs menacingly in the air every time such a consideration is tempted, until we eventually concede and drop the idea. When a tech giant like Google or Facebook comes up with something new, however, the same question doesn’t seem to scare us that much anymore.</p><p>In 2015, Facebook released React Native for developing native apps for both android &amp; iOS with a single code base. It garnered a lot of popularity in a very short period of time. An increasingly sizeable portion of the dev community started quickly moving their apps to React Native. I too jumped on the bandwagon the moment I read about React Native’s OTA (Over The Air) updates feature. It’s safe to say React Native had blown my mind. I played around with React Native for almost 2 years and was really happy with it, until I started noticing the visible performance issues when compared with pure native. This left a slight blemish in an otherwise remarkable experience.<br>It was at this time, that Google started promoting their in-house alternative for React Native — Flutter.</p><p>In mid 2017, Google released a beta version of Flutter. Having been neck deep in React Native for almost 2 years, I was reluctant to try Flutter, especially considering the added effort of learning a new language — Dart. My inertia notwithstanding, the tech geek inside me shoved me towards giving it a fair shot. I grumbled, opened Flutter’s official docs, and started grudgingly working on an application that I fondly called, Crap.</p><p>Look, I’m not saying Flutter hasn’t got the chops, but after being so familiar with RN, I longed for my beloved OTA updates. Safe to say, I wasn’t really rooting for Flutter when I started out with, well, “Crap”.</p><p>As I started getting my hands dirty, however, I realized that it was considerably easier to do a lot of things in Flutter, which would have taken much longer in React Native. Flutter has amazing developer tools, beautiful widgets, and <em>really</em> smooth animations. In a few weeks time, Flutter had me impressed. I was buzzing with intrigue by the time I was done with “Crap”. It quite frankly did not look like a weekend project, and ended up with a surprising amount of features.</p><blockquote>Feel free to check out Crap, my first Flutter app, on the Play Store — <a href="https://play.google.com/store/apps/details?id=in.amarjain.crap">https://play.google.com/store/apps/details?id=in.amarjain.crap</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdRuUj0hBaEO5j-4723Pfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LdXF9aviISbNVbCwGY9Tcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gA5jqbhubqFCGH0meFvvjQ.png" /><figcaption>Crap app</figcaption></figure><p>With one app already on the Play Store, I’m only excited about building more with Flutter, pushing the boundaries of what it can do, and discover beautiful things in the process. This is just the beginning of my journey with Flutter, and I eagerly look forward to seeing what the dev community builds with it!</p><p>Thank you <a href="https://medium.com/u/4873602c50ee">Hriddhi Dey</a> for your help!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F3e491f%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F3e491f%2F&amp;image=http%3A%2F%2Fapi.screenshotlayer.com%2Fapi%2Fcapture%3Faccess_key%3Dfe59908dad3baab69ffab249a2224b03%26viewport%3D1024x612%26width%3D1000%26url%3Dhttps%253A%252F%252Fupscri.be%252F3e491f%253Fscreenshot&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/fedb9f91e907af2468a937c944ed32ab/href">https://medium.com/media/fedb9f91e907af2468a937c944ed32ab/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaf26568f4eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-news/time-for-crap-aaf26568f4eb">Time for Crap</a> was originally published in <a href="https://medium.com/android-news">AndroidPub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A boolean costs us a Crore]]></title>
            <link>https://medium.com/@amar.jain/a-boolean-costs-us-a-crore-46dfb0540a05?source=rss-a0a1a0b391cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/46dfb0540a05</guid>
            <category><![CDATA[mistakes]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Amar Jain]]></dc:creator>
            <pubDate>Tue, 29 Aug 2017 10:53:33 GMT</pubDate>
            <atom:updated>2017-08-29T11:13:04.911Z</atom:updated>
            <content:encoded><![CDATA[<p>It is often the simplest of things and the tiniest of mistakes that haunt us the most. We often find ourselves glaring at a broken piece of code because something extremely trivial crawled under our radar. It is a common occurrence, and as we eventually learnt, one that can prove itself rather costly.</p><p>We use a third party service provided by Cloudinary, for handling all our media assets such as images and gifs. Cloudinary has a wonderful option to download optimized versions of these assets from their servers with extreme ease, by merely providing the desired parameters of width, height and quality.</p><p><em>Cloudinary charges us for the bandwidth used to serve the media content. Hence, it should come as no surprise, that we always try to download only the smallest, appropriate size, for any given asset, depending on the platform and network quality.</em></p><p>In our mobile apps , we simply request for the assets by passing the device dimensions and the network quality.</p><p><em>We, as app-developers, play a lot with our code in order to provide a better experience to our users, by displaying high quality image assets. Having said that, we also need to be reasonable about the resources that would be consumed, for high quality versions. Given the considerably vast catalogue that we house, it would be highly impractical to simply serve high quality images for every instance, across our entire user-base, as it would push our Cloudinary resource consumption far beyond our acceptable ceiling. This is when we thought of introducing a </em><strong><em>boolean flag </em></strong><em>to chip in the Cloudinary params in the assets’ url. However, due to a missing code block, the boolean flag always resulted in a false value which caused all our apps to download full sized, high-res assets from Cloudinary. This resulted in an understandably large bandwidth usage.</em></p><p>We first discovered this on the second occurrence of a consistent spike in our usage bill, which prompted our revisit of the little code snippet we had introduced. It was then that we realized our folly, and got around to fixing it immediately.</p><p>Well, the issue is fixed at this moment, and all is restored to normal.</p><p>Happy Coding!!</p><p>Thanks to <a href="https://medium.com/u/4873602c50ee">Hriddhi Dey</a> for helping me edit the content!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46dfb0540a05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sticky ScrollView - Android]]></title>
            <link>https://medium.com/myntra-engineering/sticky-scrollview-android-2ba86950ee66?source=rss-a0a1a0b391cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ba86950ee66</guid>
            <category><![CDATA[sticky]]></category>
            <category><![CDATA[scrollview]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Amar Jain]]></dc:creator>
            <pubDate>Mon, 03 Apr 2017 07:30:00 GMT</pubDate>
            <atom:updated>2017-04-03T07:30:00.062Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the very important features of any application is to have layouts which stick either at the top or at the bottom when the user scrolls through the contents. This feature can easily be implemented in web apps using css styling and sticky attributes.</p><blockquote>But when it comes to mobile apps, there is no direct way to implement sticky headers or footers for layouts in android.</blockquote><p>So I decided to create a library which would implement sticky behaviour with android’s ScrollView. It’s called <a href="https://github.com/amarjain07/StickyScrollView/">StickyScrollView</a>.<br>StickyScrollView provides both sticky header as well as sticky footer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*WC242KWtXcvhz_u66eFZwg.gif" /><figcaption>Sticky Header &amp; Footer with android scrollView</figcaption></figure><p>StickyScrollView can be used just like android’s scrollview. All you have to do is to replace your ScrollView in your view’s xml with StickyScrollView and specify the references to the layouts which need to be sticky.</p><p>Here is an example of how a StickyScrollView can be used.</p><pre>&lt;com.amar.library.ui.StickyScrollView<br>   	xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>	android:layout_width=&quot;match_parent&quot;<br>    	android:layout_height=&quot;match_parent&quot;<br>	app:stickyHeader=&quot;@+id/<strong>titleLayout</strong>&quot;<br>    	app:stickyFooter=&quot;@+id/<strong>buttonLayout</strong>&quot;&gt;<br>	...<br>	&lt;LinearLayout<br>          	android:id=&quot;@+id/<strong>titleLayout</strong>&quot;<br>            	android:layout_width=&quot;match_parent&quot;<br>            	android:layout_height=&quot;wrap_content&quot;&gt;<br>		...<br>        &lt;/LinearLayout&gt;		<br>	&lt;LinearLayout<br>            	android:id=&quot;@+id/<strong>buttonLayout</strong>&quot;<br>            	android:layout_width=&quot;match_parent&quot;<br>            	android:layout_height=&quot;wrap_content&quot;&gt;<br>		...<br>        &lt;/LinearLayout&gt;	<br>	...<br>&lt;/com.amar.library.ui.StickyScrollView&gt;</pre><p>More details are available in github.</p><p>github.com/amarjain07/StickyScrollView</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ba86950ee66" width="1" height="1" alt=""><hr><p><a href="https://medium.com/myntra-engineering/sticky-scrollview-android-2ba86950ee66">Sticky ScrollView - Android</a> was originally published in <a href="https://medium.com/myntra-engineering">Myntra Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sticky ScrollView]]></title>
            <link>https://medium.com/android-news/sticky-scrollview-6833d2957a14?source=rss-a0a1a0b391cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6833d2957a14</guid>
            <category><![CDATA[header]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[scroll]]></category>
            <category><![CDATA[footer]]></category>
            <category><![CDATA[sticky]]></category>
            <dc:creator><![CDATA[Amar Jain]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 18:38:03 GMT</pubDate>
            <atom:updated>2017-04-01T09:23:00.548Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the very important features of any application is to have layouts which stick either at the top or at the bottom when the user scrolls through the contents. This feature can easily be implemented in web apps using css styling and sticky attributes.</p><blockquote>But when it comes to mobile apps, there is no direct way to implement sticky headers or footers for layouts in android.</blockquote><p>So I decided to create a library which would implement sticky behaviour with android’s ScrollView. It’s called <a href="https://github.com/amarjain07/StickyScrollView/">StickyScrollView</a>.<br>StickyScrollView provides both sticky header as well as sticky footer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*WC242KWtXcvhz_u66eFZwg.gif" /><figcaption>Sticky Header &amp; Footer with android scrollView</figcaption></figure><p>StickyScrollView can be used just like android’s scrollview. All you have to do is to replace your ScrollView in your view’s xml with StickyScrollView and specify the references to the layouts which need to be sticky.</p><p>Here is an example of how a StickyScrollView can be used.</p><pre>&lt;com.amar.library.ui.StickyScrollView<br>   	xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>	android:layout_width=&quot;match_parent&quot;<br>    	android:layout_height=&quot;match_parent&quot;<br>	app:stickyHeader=&quot;@+id/<strong>titleLayout</strong>&quot;<br>    	app:stickyFooter=&quot;@+id/<strong>buttonLayout</strong>&quot;&gt;<br>	...<br>	&lt;LinearLayout<br>          	android:id=&quot;@+id/<strong>titleLayout</strong>&quot;<br>            	android:layout_width=&quot;match_parent&quot;<br>            	android:layout_height=&quot;wrap_content&quot;&gt;<br>		...<br>        &lt;/LinearLayout&gt;		<br>	&lt;LinearLayout<br>            	android:id=&quot;@+id/<strong>buttonLayout</strong>&quot;<br>            	android:layout_width=&quot;match_parent&quot;<br>            	android:layout_height=&quot;wrap_content&quot;&gt;<br>		...<br>        &lt;/LinearLayout&gt;	<br>	...<br>&lt;/com.amar.library.ui.StickyScrollView&gt;</pre><p>More details are available in github.</p><p><a href="https://github.com/amarjain07/StickyScrollView">amarjain07/StickyScrollView</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F3e491f%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fupscri.be%2F3e491f%2F&amp;image=https%3A%2F%2Fupscri.be%2Fmedia%2Fform.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ae57c1b4448392f65f474b01a127fbf/href">https://medium.com/media/2ae57c1b4448392f65f474b01a127fbf/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6833d2957a14" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-news/sticky-scrollview-6833d2957a14">Sticky ScrollView</a> was originally published in <a href="https://medium.com/android-news">AndroidPub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>