<?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[OT Design - Medium]]></title>
        <description><![CDATA[We are a presence company. Creative and technical stories take you behind the scenes of some of our work. - Medium]]></description>
        <link>https://medium.com/ot-design?source=rss----d86e902595db---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>OT Design - Medium</title>
            <link>https://medium.com/ot-design?source=rss----d86e902595db---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:19:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ot-design" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Refining an Onboarding Experience with MotionLayout]]></title>
            <link>https://medium.com/ot-design/refining-an-onboarding-experience-with-motionlayout-4a5d73239f76?source=rss----d86e902595db---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a5d73239f76</guid>
            <category><![CDATA[motion-design]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[constraintlayout]]></category>
            <category><![CDATA[motionlayout]]></category>
            <dc:creator><![CDATA[Tito Moyela]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 15:59:19 GMT</pubDate>
            <atom:updated>2020-10-02T23:59:18.125Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are not already familiar with MotionLayout, there are a number of <a href="https://medium.com/google-developers/introduction-to-motionlayout-part-i-29208674b10d">articles</a> by <a href="https://medium.com/u/c006d5238349">Nicolas Roard</a> on the system which you can check out. They contain valuable information, as well as links to other valuable resources that will help you get started with it if you wish but, are also necessary to comprehend this article.</p><h3>Why?</h3><p>MotionLayout is a subclass of <a href="https://developer.android.com/reference/android/support/constraint/ConstraintLayout">ConstraintLayout</a> 2.0 library. This is great because it allows you to make use of all the nice features of the <strong>ConstraintLayout</strong> library. The most important of which for me, is the ability to constrain views to a layout, which allows the positions of views in a layout to be consistent across every screen size. When you take a look at the onboarding flow of Julio, it is easy to see why this is important. Below is a comparison of old, and new version of the first launch.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FRMN5jBb80FbYRoJb94%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaterialdesign-designinspiration-motionlayout-RMN5jBb80FbYRoJb94&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FRMN5jBb80FbYRoJb94%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc3e259fcccb61c97b6d386d805e1a53/href">https://medium.com/media/bc3e259fcccb61c97b6d386d805e1a53/href</a></iframe><p>The animation works seemlessly regardless of presence of a notch, hardware navigation etc. or the lack thereof. Now, you do not need MotionLayout to achieve this but, it offers the cleanest solution by allowing you to constrain the position of the view to align with the splash screen background. If you would like to replicate this animation, make sure that your layout is <a href="https://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LAYOUT_STABLE">stable</a>.</p><h3>Meaningful Animations</h3><p>What is the point of a fancy splash screen transition? This is a fair question to ask at this point, especially if you are not a beta tester. This is the main screen of the app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*2kQnNZeKpuG-iSK3AK8_cQ.gif" /></figure><p>I wont get into detail about the whole concept of the app but, the cards are a core element. So, when we take a closer look at the interactive stage of the onboarding flow below, we start to see the important role <strong>MotionLayout</strong> played in allowing for a seamless, and meaningful animation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FdvTptpr3b0GJi5xFN9%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaterialdesign-designinspiration-designinspo-dvTptpr3b0GJi5xFN9&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdvTptpr3b0GJi5xFN9%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2739e970af5f6366f839ed9359cadc5/href">https://medium.com/media/c2739e970af5f6366f839ed9359cadc5/href</a></iframe><p>A couple swipes later in the flow and we can see the card has made its way to the bottom of the screen to be used in yet another illustration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*Rsl45CKdXmnHA7ua0Rj5mw.gif" /></figure><p>Visual illustrations are very important when it comes to condensing information down so that the user does not feel overwhelmed, especially when they are visiting your app for the first time.</p><p>Julio as a game itself is quite difficult, and having this interactive step in the onboarding flow illustrated almost exactly how I envisioned when I first drafted this app is a huge plus. The natural flow, and illustration of the onboarding allows the user to intuitively absorb information, and the interactive step reinforces their learning.</p><h3>WowoViewPager -&gt; MotionLayout</h3><p>An app like Julio presents a unique challenge, especially when you consider that it’s more of a game than an app. For the purpose of this article, I refer to it as an app since it uses a pretty much uses standard Architecture components with a Single Activity, and multiple Fragments.</p><p>Most games use an ad hoc onboarding experience. However, this can end up completely breaking the experience of the user, especially if they have a significant amount to learn. So as you can expect, I use a mixture of the quick-start and ad hoc methods. This article will only be covering the quick-start aspect, however. The “best onboarding experience” is less of a topic, and more of an everlasting debate that I will not be getting into in this article. For more information on this you can take a look at the <a href="https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/onboarding/">iOS</a> and <a href="https://material.io/design/communication/onboarding.html#self-select-model">Material Design</a> HCI guidelines as a starting point.</p><p>Nonetheless, in my opinion users need certain things spelt out to them in an initial onboarding flow — the context in which they read the information is most consistent here i.e. any UX flows in your app, good or bad, have not yet altered their perception of your app. This is the best place to provide the user with an overview of your app so that they don’t feel flustered when they finally reach the first “functional” screen.</p><p>For the old onboarding flow, I used a library called <a href="https://github.com/Nightonke/WoWoViewPager">WowoViewPager</a> in which dimensions and positions are specified as pixel values. This as you can expect, presents its own challenges as far as tackling the age old problem of Android fragmentation.</p><p>My first solution to fixing this problem was to use the handy <strong>dpToPx</strong> converter method from the <strong>Resources</strong> class; passing dimension values declared in the <strong>dimens.xml</strong> file. However, this did not work consistently across all the views, as the animation of some views were not always driven by the viewpager. This caused some jittery animations, and certain views to look misaligned on some devices; breaking the user experience. Also, there are some additional issues when it comes to dealing with devices with a notch or hardware navigation buttons. Suffice it to say, this system that resulted from using this library has haunted me for a while as it led to a lot of elbow grease code.</p><p>The new onboarding implementation with <strong>MotionLayout</strong> is quite similar to the <strong>WowoViewPager</strong> implementation in that majority of the animations are driven by a <strong>ViewPager</strong>. For the new onboarding flow, I made use of an “empty” <strong>ViewPager</strong> that fills the full height of the layout, and simply created a custom view to extend the MotionLayout, then I attached an <strong>OnPageChangeListener, </strong>like so:</p><pre>class OnboardingSceneView @JvmOverloads constructor(<br>    context: Context, <br>    attrs: AttributeSet? = null,<br>    defStyleAttr: Int = 0) : <br>    MotionLayout(context, attrs, defStyleAttr),<br>    ViewPager.OnPageChangeListener {<br><br>    private val numPages = 16<br>    override fun onPageScrollStateChanged(state: Int) {<br>    }<br><br>    override fun onPageScrolled(position: Int,<br>    positionOffset: Float,<br>    positionOffsetPixels: Int) {<br>        <em>progress </em>= (position + positionOffset) / (numPages - 1)<br>    }<br><br>    override fun onPageSelected(position: Int) {<br>    }<br>}</pre><p>All of the positions and attributes for specific <strong>framePosition</strong>s<strong> </strong>are then declared in the MotionScene. Each framePosition is related to the different positions of the ViewPager. <a href="https://medium.com/google-developers/defining-motion-paths-in-motionlayout-6095b874d37">Part IV</a> of Nicolas’ article series provides enough insight into how this is done.</p><p>The versatility of MotionLayout, is superior to WowoViewPager, or any other libraries that I have come across, for that matter, as it allowed me to reuse certain views. Whereas, with WowoViewPager I had to create multiple instances of the same view, and create different variations of assets, because not all of its <a href="https://github.com/Nightonke/WoWoViewPager/wiki/Position-Animation">Animations</a> were compatible with SVGs.</p><h3>My Experience</h3><p>In the end, I was able to get rid of 40% of the assets, and layout views. The interactive portion of the onboarding flow is a good example of this. I was able to use just one <strong>ImageFilterView</strong> to animate the image saturation, and its source into an Animated Vector Drawable, instead of three separate assets and views.</p><pre>&lt;androidx.constraintlayout.utils.widget.ImageFilterView<br>    android:id=&quot;@+id/julio&quot;<br>    android:layout_width=&quot;@dimen/julio_test_height&quot;<br>    android:layout_height=&quot;@dimen/julio_test_height&quot;<br>    android:scaleType=&quot;fitXY&quot;<br>    app:altSrc=&quot;@drawable/julio_avd&quot;<br>    android:src=&quot;@drawable/julio&quot; /&gt;</pre><p>There is one major bug I discovered with MotionLayout that caused the KeyAttributes and KeyPositions for a framePosition to be prematurely applied in another earlier framePosition. I am still trying to get down to the bottom of this. If I do, I will update this post.</p><p>Other than that, I found that it can be a bit daunting to keep track of all the <strong>KeyFrame</strong>s but then again, there is really no better alternative. The states of views need to be declared somewhere. Moreover, there are an extraordinarily large number of <strong>KeyFrame</strong>s in my use case.</p><p>For more simpler use cases, I think MotionLayout would be a great tool, and in most cases offers the most straightforward workflow. It helps that it facilitates separation of concerns by keeping your animations separate, and it is fully testable if your project requires it.</p><p>For my use case, keeping the KeyFrames in a separate xml layout and out of my code significantly improved readability of my codebase. For example, I am able to dynamically change the text shown to the user based on server responses, with just a few lines of code, which could not previously be done with WowoViewPager. Below is a snippet from my OnboardingActivity.kt file.</p><pre><strong>private</strong> fun <strong>initObservers</strong>(){<br>    viewModel.mainText<br>        .observe(this, <em>Observer</em><strong>{</strong>this.updateMainTextView(<strong>it</strong>)<strong>}</strong>)<br>    <br>    ...<br>}</pre><pre><strong>override </strong>fun <strong>onPageSelected</strong>(position: Int) {<br>    viewModel.getText(position)</pre><pre>    ...<br>}</pre><pre>...</pre><p>I was not a fan of ConstraintLayout initially for many reasons, mostly due to its instability but, with the newest version most of my concerns have been addressed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a5d73239f76" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ot-design/refining-an-onboarding-experience-with-motionlayout-4a5d73239f76">Refining an Onboarding Experience with MotionLayout</a> was originally published in <a href="https://medium.com/ot-design">OT Design</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the Power of Animated Vector Drawables]]></title>
            <link>https://medium.com/ot-design/harnessing-the-power-of-animated-vector-drawables-6c700c7d7ef6?source=rss----d86e902595db---4</link>
            <guid isPermaLink="false">https://medium.com/p/6c700c7d7ef6</guid>
            <category><![CDATA[material-design]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Tito Moyela]]></dc:creator>
            <pubDate>Sat, 29 Jun 2019 19:17:10 GMT</pubDate>
            <atom:updated>2021-02-09T21:02:48.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*LIcddLPKcBidvSB1IoarRA.gif" /></figure><p>Dealing with the UI/UX portion of the development process can be a very daunting task, whether you work as part of a team, or as a freelancer. The animation support, or lack thereof, is a topic that a majority of, if not all Android developers have discussed with varying degrees of passion.</p><p>With the industry changing, companies are paying more attention to the importance of a good UI/UX — an aspect of software development that some of us may never have to deal with if they so chose. However, for those of us that do, it would help a lot if there was just a little bit more support. Don’t get me wrong, I think the team at Google are working towards making animations a bit less daunting for developers but, this is a-whole-nother topic for another day; perhaps another Medium post. Anyway, there are certainly way more APIs available now that help us create beautiful, and responsive apps, but like everything else, you have to know what you’re doing. Thankfully there are a lot of communities such as Medium, dribble, reddit e.t.c to help us make the right decisions.</p><h3>The AVD</h3><p>The animated vector drawable has been around for around a couple of years now, with the launch of Lollipop. However, like many developers, I only saw it as a pointless library to change a hamburger menu into an arrow. We’ve all seen it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*ix7e592uuNfha617MiQgeg.gif" /><figcaption>source: <a href="https://dribbble.com/shots/1618281-Material-Design-Animation">https://dribbble.com/shots/1618281-Material-Design-Animation</a></figcaption></figure><p>This was my view of AVDs for while. I just didn’t see any other use cases for it.</p><p>I was also developing an app while Lollipop was making its way to production, and you can say that this <em>really</em> wasn’t a very optimistic time for animations in the Android world. No matter how hard I tried I just couldn’t get this app to look as polished as some well designed iOS apps. As a matter of fact a good amount of the people that I demoed it to said that it looked really great, but it was “Android-y”, or something to that respect. I may not have 100% understood what that meant at the time, but I digress. It was an opinion nonetheless, and sometimes it was meant negatively, and something had to be done about it.</p><p>As time went on I came across <a href="https://github.com/tarek360/RichPath">this library</a>, as well as <a href="https://shapeshifter.design/">this tool</a> while watching a talk on animations from two people who I believe where on the Android development team at the time. I wasn’t able to find the video but, it was definitely one of the catalysts in helping me create the app where the animation at the top of this post lives.</p><p>I’ve never really used the library in a project but, the shape shifter tool has been a game changer in terms of my work flow.</p><h3>“As developers, we make programs by breaking ideas up into smaller segments. Animations are done the same way.”</h3><p>Before I continue, yes, <strong>this is for API 21 and above — </strong>I simply don’t have the time to cater to a different UX anymore. Also, material design animations look out of place pre-lollipop, in my opinion.</p><h3>Design &amp; Application</h3><p>Animations aren’t that hard to implement. As developers, we make programs by breaking ideas up into smaller segments. Animations are done the same way.</p><p>In order to try and keep this post short, I will be showing a less complex animation than the one above. Also, I will only be talking about the AVD, not the translation, or the ripple animation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FdVcEz0uJXEwdgIEXV3%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FdVcEz0uJXEwdgIEXV3%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FdVcEz0uJXEwdgIEXV3%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="477" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1a9b8798a9f3110ff98b944adc67fda/href">https://medium.com/media/c1a9b8798a9f3110ff98b944adc67fda/href</a></iframe><p>My main issue with a lot of tutorials and teaching material in general is that they don’t usually provide a use case to accompany their content. So, I’m compelled to explain how/why I use this animation in my app although, this is not a tutorial. Feel free to skip this and head over to the next section if you don’t share this ideology.</p><p>To put it simply, this article centres around an Android app in the puzzle game genre in which users have to solve a series of puzzles without directly interacting with them. The reason the card turns grey as opposed to green, and the circle bounces off the top edge of the card instead of completely “escaping” the card as in the first animation is due to one of the constraints of the game. I don’t want to ramble on about this for longer than I need to so, <a href="https://play.google.com/store/apps/details?id=julio.ai.moyela.tito.timetoolay">this is a link</a> to it where you can find out some more information about it, and try it out if you please. It’s still in it’s beta phase so try not to be too critical but, do let me know what you think if you find the time. A lot more content for it will be coming over the following days as well.</p><h3>Animated States</h3><p>Building on what I said earlier, though the animation may seem like it has a lot going on, you just need to look at it critically. In reality, the AVD has only three main states. This is great because you can delegate the task of making the AVD to the designer, and the developer would only need to worry about these three states in their code. More on this later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efKMlCNPUM33bHn4e1Tqng.png" /></figure><p>Obviously you have to make the images first, and they have to be in .svg format, so use a tool that allows you to export to that format. I use Adobe Illustrator. If you have a UX designer on your team, then they can deal with this part. If not, the great thing about AVDs is that they are 2D. All of the images in this post are just a combination of simple shapes. The first state for example, just consists of rectangles and a polygon. Once you have your images, head over to the <a href="https://shapeshifter.design/">tool</a> I mentioned earlier.</p><p>You can also have as many states as you like. You could even break down this particular example into more states, if you so please. I chose three states because that was my use case.</p><h3>Shape Shifter</h3><p>This tool is great because it allows you to design animations visually. Before this tool, you had to code up the image by hand 🤢.</p><p>With shape shifter, I just drag the first state of the AVD onto the webpage, and start from scratch. Lets take another look at the animation in slow motion where you’ll hopefully be able to see the AVD animating to all three states.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FIzWoy7uM9cwGxJoC3s%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FIzWoy7uM9cwGxJoC3s%2F200w_d.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FIzWoy7uM9cwGxJoC3s%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="490" frameborder="0" scrolling="no"><a href="https://medium.com/media/7fcb31d4e62c80f44a3fafbfb2be68d0/href">https://medium.com/media/7fcb31d4e62c80f44a3fafbfb2be68d0/href</a></iframe><p>All the animation that happens in-between is done visually in Shape shifter. As you can see, the shapes are just being translated downwards at different rates with a bounce interpolator added to the translation animation of the polygon to give it realistic, falling look.</p><p>The animation to the third state is called a path animation. Shape shifter does this for you as well. All you need is the image that you are animating to, and from.</p><p>This tool also has pre-made, fully exportable path animations that you can play around with by clicking on the “Demo” option in the File menu. This is one of them but with a fill-color animation added to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPqXXMTSi4DFD7_ZyoOv_A.gif" /></figure><h3>Code</h3><p>If all the animations are done its just a matter of exporting the separate animations into to an AVD file, which is in .xml format. In this case, there are only two. If you’re on the design team, this is where you can call it a day. Just make sure you email those .svg and .xml files to the dev team.</p><p>Once that is done, you just need to put them into the drawable folder. Now, you just need to make your program understand <em>how to animate these files.</em></p><p>The first step is making a state selector file, which is just another .xml file that goes in the drawable folder. This is an example of what it should look like for the animation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66f80b7a5b4bd5a4f1ea6b0d5460747f/href">https://medium.com/media/66f80b7a5b4bd5a4f1ea6b0d5460747f/href</a></iframe><p>Then add the states to the attrs.xml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6218aa2bc41306798534d131b63192b5/href">https://medium.com/media/6218aa2bc41306798534d131b63192b5/href</a></iframe><p>Now, all you need to do is set this file as the src value of your ImageView element. Then in the code, all you need to do is declare the states as int arrays.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb9496d87608614598e7c902be9c0519/href">https://medium.com/media/bb9496d87608614598e7c902be9c0519/href</a></iframe><p>That’s it. All you need to do is call img.setImageState(STATE_ONE,true); and watch your animation come to life.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c700c7d7ef6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ot-design/harnessing-the-power-of-animated-vector-drawables-6c700c7d7ef6">Harnessing the Power of Animated Vector Drawables</a> was originally published in <a href="https://medium.com/ot-design">OT Design</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>