<?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 Nasc on Medium]]></title>
        <description><![CDATA[Stories by Nasc on Medium]]></description>
        <link>https://medium.com/@nascimpact?source=rss-b32ff54481d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Y3OTOKqVnQEtp8RJ.jpg</url>
            <title>Stories by Nasc on Medium</title>
            <link>https://medium.com/@nascimpact?source=rss-b32ff54481d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:05:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nascimpact/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[Jetpack Compose working with rotation animation]]></title>
            <link>https://nascimpact.medium.com/jetpack-compose-working-with-rotation-animation-aeddc5899b28?source=rss-b32ff54481d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeddc5899b28</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <dc:creator><![CDATA[Nasc]]></dc:creator>
            <pubDate>Fri, 16 Apr 2021 10:04:19 GMT</pubDate>
            <atom:updated>2021-04-16T10:06:09.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hw3LMBD6JCznFo5nqLW4TQ.png" /></figure><p>I discovered <strong>Jetpack Compose</strong> a few months ago and I wanted to share with you a simple prototype. For fun I tried to create an audio player prototype with an old school vinyl style in <strong>Jetpack Compose</strong>.</p><p>I tweeted the result with a short video.</p><figure><a href="https://twitter.com/NascImpact/status/1379365695725658112"><img alt="https://twitter.com/NascImpact/status/1379365695725658112" src="https://cdn-images-1.medium.com/max/600/1*EPX6VOLCGycXZ9fYyynpwg.png" /></a><figcaption><a href="https://twitter.com/NascImpact/status/1379365695725658112">https://twitter.com/NascImpact/status/1379365695725658112</a></figcaption></figure><blockquote>First of all, if you are starting with Jetpack Compose, take a look <a href="https://developer.android.com/jetpack/compose/documentation">Get started with Jetpack Compose</a>, very good point of start with Jetpack Compose.</blockquote><p>In this sample I just create a vinyl with rotation animation and a play/pause button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*xCqz_wTZy3qlyagIN7bnGw.jpeg" /></figure><h3>The vinyl</h3><p>In my sample I tried to use my Photoshop skills to draw the vinyl. I created three images for three layers. The first layer for vinyl background, the second layer for lighting effect and the last a fake album cover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*A8k8wUh6cqM0pR2_auYjJg.jpeg" /></figure><p>This composable is a simple Box with rotation as parameters. This rotation will be applied only to the vinyl layer and the album layer (light effect stay static). A shape is applied to the box to simulate the small hole in the vinyl.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e4f9d1bba3915603a6443ac8de254df/href">https://medium.com/media/3e4f9d1bba3915603a6443ac8de254df/href</a></iframe><h3>Rotation animation</h3><p>This composable only allows you to manage the rotation animation based on the playing status.</p><p>If status is play, an infinite repeatable animation start, else if status is pause, a simple animation start based on current rotation value and end the rotation by slowing down. This value is given to the composable Vinyl()</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0589dadd4ef7d20631facb859c5c3b7e/href">https://medium.com/media/0589dadd4ef7d20631facb859c5c3b7e/href</a></iframe><h3>Play/Pause</h3><p>A simple composable working as toggle button.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff88527a9f43a20de3150fcb214274a4/href">https://medium.com/media/ff88527a9f43a20de3150fcb214274a4/href</a></iframe><h3>Final result</h3><p>I just compose the main page (with a gradient as background) with VinylAnimation() and AudioControl(). The playing state is passed to these two composable for changing animation and button icon.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a31326ab8e2780282f2af5263eea6ed/href">https://medium.com/media/8a31326ab8e2780282f2af5263eea6ed/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZiwfREDtXVU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZiwfREDtXVU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZiwfREDtXVU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/73a39c25304d81eeeadf8771989d238d/href">https://medium.com/media/73a39c25304d81eeeadf8771989d238d/href</a></iframe><h3>Source code</h3><p>The complete source code is available on GitHub, working with Android Studio Canary 14 and Jetpack Compose 1.0.0-beta04</p><p><a href="https://github.com/Nasc/JetpackCompose-Vinyl">Nasc/JetpackCompose-Vinyl</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeddc5899b28" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>