<?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[Droid Digest - Medium]]></title>
        <description><![CDATA[Where we serve up Android goodness, one delicious byte at a time! - Medium]]></description>
        <link>https://medium.com/droid-digest?source=rss----90d734ae5858---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Droid Digest - Medium</title>
            <link>https://medium.com/droid-digest?source=rss----90d734ae5858---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:30:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/droid-digest" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dreams to Reality—  Building with Confidence]]></title>
            <link>https://medium.com/droid-digest/dreams-to-reality-building-with-confidence-cecddcd07101?source=rss----90d734ae5858---4</link>
            <guid isPermaLink="false">https://medium.com/p/cecddcd07101</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Nirbhay Pherwani]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 22:30:15 GMT</pubDate>
            <atom:updated>2023-10-23T22:30:15.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dreams to Reality— Building with Confidence</h3><h4><strong>This article was originally posted in </strong><a href="https://www.discoverwalks.com/blog/columnist/nirbhay-pherwani/dreams-to-reality-building-with-confidence/"><strong>Discover Walks</strong></a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WEUMEMvRPrlZb_aQ" /><figcaption>All you need to start now!! [Photo by <a href="https://unsplash.com/@laurenmancke?utm_source=medium&amp;utm_medium=referral">Lauren Mancke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>]</figcaption></figure><p>Imagine this — YOU, a budding digital artisan with an insatiable <strong>appetite for creating</strong>, immersed in a dimly lit room, fingers gracefully dancing on the keyboard.</p><p>Your mission, should you choose to accept it — <strong><em>To breathe life into your wildest ideas on the screen of a smartphone.</em></strong></p><p>It’s going to be an adventure teeming with challenges and creative breakthroughs, akin to the voyage behind Flappy Musketeer, a mobile game that seamlessly marries addictive game play with captivating visuals.</p><p>This article is your personal invitation to embark on your unique creative quest, a journey that encompasses not only development but also marketing and growth strategies, turning your dreams into digital triumphs.</p><h3>The Story of Flappy Musketeer — Fueling Dreams</h3><p>Flappy Musketeer isn’t just a game; it’s a testament to the spirit of content creation, a delightful fusion of engaging game play and striking aesthetics. It’s proof that whether you’re a solo developer or a budding programmer, you have the power to turn your dreams into reality.</p><h4><strong>The Birth of Flappy Musketeer</strong></h4><p>The creative spark behind Flappy Musketeer ignited when the worlds of app development and innovation collided. As an Android developer, I yearned for more than just lines of code; I craved an opportunity to craft an experience that would resonate with users around the world.</p><h4><strong>Challenges Along the Way</strong></h4><p>The path to bringing Flappy Musketeer to life was no walk in the park. It was a journey filled with trials and tribulations, each challenge offering a valuable lesson. As you embark on your own creative adventure, it’s crucial to understand and anticipate the hurdles you might encounter.</p><ul><li><strong>Technical Hurdles —</strong> Learning modern programming techniques, such as Jetpack Compose, can be intimidating, especially for beginners. The ever-evolving landscape of app development requires staying updated with the latest tools and technologies. Familiarize and experiment with them to understand their capabilities and find what resonates with your development style. Overcoming these technical hurdles demands dedication and a willingness to embrace continuous learning.</li><li><strong>Design Dilemmas —</strong> Crafting captivating user interfaces and visuals that resonate with your target audience can be a daunting task. You might grapple with questions like, “How do I make my app visually appealing?” or “What color scheme suits my app’s theme?” Design challenges often require iterative experimentation, taking feedback and a keen eye for aesthetics.</li><li><strong>Coding Conundrums —</strong> Writing code is at the core of app development, but it’s not always smooth sailing. Bugs, errors, and unexpected behaviors are part and parcel of the coding process. These challenges can be frustrating, but they also offer opportunities to refine your coding skills and problem-solving abilities.</li><li><strong>Resource Limitations —</strong> As an individual developer or junior programmer, you may not have access to extensive resources or a large team. Limited budgets and manpower can pose significant challenges when it comes to marketing, testing, and scaling your app. However, resource constraints can also inspire creativity and innovative solutions.</li><li><strong>User Feedback —</strong> Once your app is in the hands of users, you’ll receive feedback — both positive and critical. Dealing with user reviews and feedback gracefully can be challenging. It requires humility, adaptability, and the ability to separate constructive criticism from noise.</li><li><strong>Time Management —</strong> Balancing your creative pursuits with other commitments, whether it’s a full-time job or studies, can be a constant struggle. Effective time management and setting realistic milestones are crucial skills to master.</li><li><strong>Self-Doubt and Motivation —</strong> Along the way, you might encounter moments of self-doubt. Is your idea good enough? Can you really succeed in the competitive world of app development? Staying motivated during these times is vital.</li></ul><blockquote>As you navigate these challenges, keep in mind that the best time to start your creative adventure is now!!</blockquote><h3><strong>The Creative and Technical Aspects</strong></h3><p>Bringing your app or game to life involves a harmonious blend of creativity and technical prowess. Here’s a closer look at these two vital components.</p><h4><strong>1. Creative Aspects</strong></h4><ul><li><strong>Conceptualization —</strong> Every successful app or game begins with a solid concept. It’s the seed from which your project grows. Spend time brainstorming ideas, and don’t hesitate to explore unique, offbeat concepts. Flappy Musketeer, for instance, emerged from a desire to blend a classic gaming experience with a fresh twist.</li><li><strong>User-Centered Design —</strong> User experience (UX) and user interface (UI) design play a pivotal role in engaging your audience. Consider the flow of your app, the placement of buttons, and the overall aesthetics. A user-centric approach ensures that your app is intuitive and enjoyable to use.</li><li><strong>Visual Appeal —</strong> Visuals are the first thing users notice. Invest time in creating eye-catching graphics and animations. Even if you’re not a professional designer, tools and resources are available to help you create stunning visuals that align with your app’s theme.</li><li><strong>Sound and Music —</strong> Don’t underestimate the power of audio in enhancing the user experience. Thoughtful sound effects and music can elevate your app’s appeal. Explore royalty-free music and sound libraries to find the perfect audio elements for your project.</li><li><strong>Iterative Development —</strong> Creativity thrives through iteration. Be open to refining and enhancing your app’s creative elements based on feedback and your evolving vision.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejX1s0JmQTvd9RTVJNomFg.png" /><figcaption>An Example (My Creative Quest)</figcaption></figure><h4><strong>2. Technical Aspects</strong></h4><ul><li><strong>Performance Optimization —</strong> App performance is a critical factor in user satisfaction. Optimize your code and assets to ensure your app runs smoothly, even on devices with lower specifications.</li><li><strong>Testing and Debugging — </strong>Thoroughly test your app on various devices and platforms to identify and rectify bugs. Debugging can be time-consuming but is essential for a smooth user experience.</li><li><strong>Security —</strong> Prioritize the security of user data and app functionality. Implement best practices for data encryption, secure authentication, and protection against common security vulnerabilities.</li><li><strong>Documentation —</strong> Maintain clear and comprehensive documentation for your project. This not only helps you understand your own code but also assists other developers who may collaborate with you in the future.</li></ul><h3>Tips and Strategies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tOWK6H5Dv6DzRnVi" /><figcaption>Embrace Challenges [Photo by <a href="https://unsplash.com/@tateisimikito?utm_source=medium&amp;utm_medium=referral">Jukan Tateisi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>]</figcaption></figure><p>These next 5 points are going to set you on the path to success!</p><h4><strong>1. Start with Simple Concepts</strong></h4><h4><strong>2. Design Matters</strong></h4><p><em>Strong Design can Transform an </em><strong><em>ordinary </em></strong><em>creation </em><strong><em>into an</em></strong><em> </em><strong><em>exceptional </em></strong><em>one.</em></p><h4><strong>3. Collaborate and Seek Feedback</strong></h4><h4><strong>4. Embrace Challenges</strong></h4><h4>5. Build a Minimum Lovable Product (MLP) not a MVP.</h4><h3><strong>Marketing and Promotion</strong></h3><p><strong>Effectively promoting</strong> your creation can be a <strong>significant challenge</strong>, especially <strong>as an individual developer or creator</strong>. Here’s how you can get your app or product in front of your target audience without a massive budget or a dedicated marketing team.</p><h4><strong>1. Harness the Power of Social Media</strong></h4><p>Utilize social media platforms to connect with your potential users or customers. Share teasers, development updates, and engaging content that piques interest and encourages interaction. Use tools like Canva or Adobe After Effects to create product promos. Here’s an <a href="https://www.youtube.com/watch?v=433Kd9edueE">example</a> of what I was able to come up with.</p><h4><strong>2. Engage with Relevant Communities</strong></h4><p>Participate in online communities, forums, or platforms related to your app or product’s niche. Engage in discussions, share your progress, and build anticipation by involving potential users or customers in your journey. Use a website like Product Hunt to launch your product.</p><h4><strong>3. Showcase Your Creation</strong></h4><p>Consider attending relevant conferences, meetups, or virtual events to showcase your app or product. Networking with peers and industry professionals can open doors to promotion opportunities.</p><h4><strong>4. Establish an Online Presence</strong></h4><p>Create a dedicated website or blog for your app or product. Share development insights, behind-the-scenes stories, and interactive content to keep your audience engaged and informed. Also, I decided to go with Linktree to add a list of <a href="https://linktree.com/flappymusketeer"><strong>all relevant links</strong></a> about my creation.</p><h4><strong>5. Collaborate with Influencers</strong></h4><p>Explore partnerships with influencers whose audience aligns with your app or product’s target demographic. Influencers can provide exposure through various forms of content, such as reviews, tutorials, or live demonstrations.</p><h3>Lessons Learned</h3><p>As I reflect on the journey of creating Flappy Musketeer and venturing into game development, three valuable lessons stand out.</p><h4>1. Passion Fuels Progress</h4><p>Passion is the driving force behind overcoming challenges. It’s the unwavering belief in your idea and your vision that propels you forward, even in the face of adversity.</p><h4>2. Perseverance Pays Off</h4><p>This can be demanding, but perseverance pays off. Every setback is an opportunity to grow and improve.</p><h4>3. Be User Centric</h4><p>Put the player/user at the center of your development journey. Understand their preferences, listen to their feedback, and iterate to create a remarkable experience.</p><p>Your creative journey centered around being a developer first, has already begun. As you sit in that dark room, typing on the keyboard, remember this — <strong>Your dreams are waiting to be realized.</strong></p><p>Your community of fellow developers is there to support you, and your users are at the heart of your journey. Be user-centric, and you’ll create experiences that resonate. The lessons you’ll learn along the way will shape not only your projects but also your personal and professional growth.</p><blockquote>You are just one step away, 1% progress beats 0% every time!</blockquote><p>Time to start creating, no?</p><p><em>A complete technical deep dive on the game built is available </em><a href="https://medium.com/@pherwani37/building-the-flappy-musk-eteer-arcade-game-with-jetpack-compose-d2af63a634ea"><em>here</em></a><em>.</em></p><p><em>Liked my writing? Follow me on </em><a href="https://medium.com/@pherwani37"><em>Medium</em></a><em> for new articles!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cecddcd07101" width="1" height="1" alt=""><hr><p><a href="https://medium.com/droid-digest/dreams-to-reality-building-with-confidence-cecddcd07101">Dreams to Reality—  Building with Confidence</a> was originally published in <a href="https://medium.com/droid-digest">Droid Digest</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jetpack Compose for Wearables — Developing UIs for Smartwatches]]></title>
            <link>https://medium.com/@pherwani37/jetpack-compose-for-wearables-developing-uis-for-smartwatches-e2208ec4815f?source=rss----90d734ae5858---4</link>
            <guid isPermaLink="false">https://medium.com/p/e2208ec4815f</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[watches]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Nirbhay Pherwani]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 01:59:21 GMT</pubDate>
            <atom:updated>2023-09-13T01:59:21.246Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn iOS Development</h4><h3>Jetpack Compose for Wearables — Developing UIs for Smartwatches</h3><h4><strong>Simplifying User Interface Development for Wearables</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*UpcDpvxGIv-UVkln-NuJbw.jpeg" /><figcaption>Sourced from <a href="https://dribbble.com/shots/22244840-Simple-Watch-Face">Dribbble</a></figcaption></figure><h3>Introduction</h3><p>In the ever-evolving world of technology, smartwatches have emerged as a powerful extension of our digital lives. These tiny yet sophisticated devices have become an integral part of our daily routines, offering quick access to information, notifications, and even health tracking. To make these devices even smarter, Google introduced Jetpack Compose for Wearables, a toolset that empowers developers to create captivating and efficient user interfaces (UIs) for smartwatches. In this article, we will explore the unique challenges, exciting opportunities, and remarkable benefits that come with designing UIs for smartwatches using Jetpack Compose.</p><h3>The Challenges of Smartwatch UI Design</h3><h4>1. Limited Screen Real Estate</h4><p>Smartwatches typically have small screens with limited space for displaying information. This constraint forces designers to prioritize essential content and minimize clutter.</p><p><strong>Example —</strong> Imagine creating a weather app for a smartwatch. Instead of displaying a detailed 7-day forecast, you might focus on the current weather conditions and temperature, with an option to view more details if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_O58My6ewWU0ev6_tqk7Pg.png" /><figcaption>Sourced from <a href="https://dribbble.com/shots/6771187-Weather-App-Watch-UI-Design">Dribbble</a></figcaption></figure><blockquote>In smartwatch UI design, less is often more. Think of it as creating a ‘lite’ version of your smartphone app — only the essentials, please!</blockquote><h4>2. Touch and Interaction Constraints</h4><p>Smartwatches rely on touch, voice commands, and gestures for interaction. Unlike smartphones, there is no room for complex gestures or intricate touch interactions.</p><p><strong>Example —</strong> In a fitness tracking app, swipe gestures can be used for simple navigation between screens, making it easy for users to access their workout data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0HQ2s9ulCgcZaqk4OmD2g.gif" /><figcaption>Sourced from <a href="https://dribbble.com/shots/5835400-Freebie-Apple-Watch-Fitness-App">Dribbble</a></figcaption></figure><blockquote>Swipe left to view more steps, swipe right to order a pizza. Just kidding, keep swiping for your workout stats!</blockquote><h4>3. Battery Life Concerns</h4><p>Smartwatches must be power-efficient to ensure they last throughout the day. Continuous animations and resource-intensive UI elements can drain the battery quickly.</p><p><strong>Example —</strong> For a step-tracking app, you might use subtle animations to display progress, preserving battery life while providing visual feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OiLyVrDmuEtdEeyAqEilBw.png" /><figcaption>Sourced from <a href="https://www.istockphoto.com/vector/smart-watch-with-fitness-tracker-or-step-counter-app-on-screen-vector-illustration-gm1146224652-308787637">iStock</a></figcaption></figure><h3>The Benefits of Jetpack Compose for Wearables</h3><p>Jetpack Compose for Wearables addresses these challenges and provides several unique benefits that significantly enhance the smartwatch UI design process. Let’s explore these benefits through engaging examples.</p><h4>1. Compose Elements for Wearables</h4><p>Jetpack Compose offers a set of UI elements tailored for smartwatches, such as WearableTheme and Icon, which are optimized for small screens and touch interactions. In itself, many of the existing elements that we use for development on phones can be easily used for watches directly. In all the entire suite of elements simplifies the design process and ensures consistency across different smartwatches.</p><p><strong>Example —</strong> Consider designing a fitness app. With Jetpack Compose, you can easily create a visually appealing workout summary —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qP2h28s9YL3IPrWpEVKhdg.png" /><figcaption>Workout Overview Example</figcaption></figure><pre>Column(<br>    modifier = Modifier.fillMaxSize().padding(16.dp),<br>    verticalArrangement = Arrangement.Center,<br>    horizontalAlignment = Alignment.CenterHorizontally<br>) {<br>    Text(text = &quot;Your Workout!&quot;, style = MaterialTheme.typography.title3)<br>    Spacer(modifier = Modifier.height(8.dp))<br>    Text(text = &quot;Steps → 4500&quot;, style = MaterialTheme.typography.caption2)<br>    Text(text = &quot;Calories → 320&quot;, style = MaterialTheme.typography.caption2)<br>}</pre><blockquote>Compose elements are like building blocks for your smartwatch masterpiece. Stack them wisely!</blockquote><h4>2. Scaling Lazy Lists</h4><p><strong>Example —</strong> For a messaging app, Jetpack Compose allows you to create playful items that appear and disappear gracefully when new messages arrive as an example. Here’s a snippet showcasing a list of chat messages. Here we have used the scaling lazy column to implement it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blbb55UE_Wx7Ys3dwla2pA.gif" /><figcaption>Scaling Lazy Column Example</figcaption></figure><pre>ScalingLazyColumn {<br>    items(count = messages.value.size) { index -&gt;<br>        Text(<br>            text = messages.value[index],<br>            textAlign = TextAlign.Center,<br>            modifier = Modifier.border(<br>                width = 1.dp,<br>                shape = RoundedCornerShape(16),<br>                color = Color.White<br>            ).padding(4.dp)<br>        )<br>    }<br>}</pre><h3>More Examples Anyone?</h3><h4><strong>1. Smart Home Control — Your Home, Your Rules</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCfF4H1aCTG0vOrnUHEIbQ.png" /><figcaption>Sourced from <a href="https://dribbble.com/shots/20651561-Smart-house-for-Apple-Watch">Dribbble</a></figcaption></figure><p><strong><em>Case Study —</em></strong> The “Smart Home Control” app empowers users to control their smart home devices from their wrists. Jetpack Compose helps create a touch-friendly interface that lets users easily adjust lighting, thermostat settings, and security systems. The app’s intuitive design ensures that even complex tasks can be accomplished with a few taps.</p><p><strong><em>Composable Idea —</em></strong> A “Control Panel” composed of customizable tiles that represent different smart home devices. Users can rearrange and resize these tiles to create a personalized control center for their home.</p><h4><strong>2. Smart Car Controller — Start Your Vehicle Remotely</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJXx5rVrg6nhPMRcQTEhvw.jpeg" /><figcaption>Sourced from <a href="https://www.youtube.com/watch?v=EH9e8unubg8">YouTube</a></figcaption></figure><p><strong><em>Case Study —</em> </strong>The “Smart Car Controller” app transforms your smartwatch into a remote control for your car. Using Jetpack Compose, the app provides a user-friendly interface that enables you to start your car’s engine, lock or unlock doors, control the climate settings, and even track your car’s location, all from the convenience of your wrist.</p><p><strong><em>Composable Idea —</em></strong> A mini dashboard-like interface on the smartwatch displaying essential car functions, such as a “Start Engine” button, temperature controls, and a map showing your car’s location. Users can tap and interact with these elements to initiate actions remotely.</p><h4><strong>3. Time Management Watch Face — Your Daily Planner</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4gNLbRoz4mDX42Vb2dZew.png" /><figcaption>Sourced from <a href="https://dribbble.com/shots/22211288-Global-Clock">Dribbble</a></figcaption></figure><p><strong><em>Composable Idea —</em></strong> A dynamic watch face that integrates with your calendar app. It displays your upcoming appointments, to-dos, and weather conditions. Users can tap on events to view more details or swipe to switch between days.</p><h4><strong>4. Task Manager: To-Do at a Glance</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wdY1YaCu3Bz8u-5OS9IdXg.png" /><figcaption>Sourced from <a href="https://dribbble.com/shots/14194304-Smart-watch-Task-Manager">Dribbble</a></figcaption></figure><p><strong><em>Composable Idea —</em></strong> A task manager app that displays your to-do list as a scrollable stack of cards. Each card represents a task, and users can swipe left to mark tasks as complete or right to snooze them. The app adapts to the urgency of tasks, bringing the most important ones to the top.</p><blockquote>Smartwatches are no longer just timekeepers; they are an integral part of our digital lives. In this dynamic landscape, Jetpack Compose for Wearables emerges as a powerful tool-set, empowering developers and designers to create captivating and efficient smartwatch user interfaces.</blockquote><h3>Closing Remarks</h3><p>If you liked what you read, please feel free to leave your <strong>valuable feedback</strong> or <strong>appreciation</strong>. I am always looking to learn, collaborate, and grow with fellow developers.</p><p>If you have any questions feel free to message me!</p><p>Follow me on <strong>Medium</strong> for more articles — <a href="https://medium.com/@pherwani37">Medium Profile</a></p><p>Connect with me on <strong>LinkedIn </strong>for collaboration — <a href="https://linkedin.com/in/nirbhaypherwani">LinkedIn Profile</a></p><p>Also, you’re welcome to follow me on <strong>Twitter </strong>for more updates and insights — <a href="https://x.com/nirbhayph">Twitter Profile</a></p><p>Happy Composing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2208ec4815f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an iPhone-Like Glassy Blur Effect with Jetpack Compose on Android]]></title>
            <link>https://medium.com/droid-digest/creating-an-iphone-like-glassmorphism-blur-effect-with-jetpack-compose-on-android-a271dfab7d4b?source=rss----90d734ae5858---4</link>
            <guid isPermaLink="false">https://medium.com/p/a271dfab7d4b</guid>
            <category><![CDATA[blur-composable]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[iphone-blur]]></category>
            <category><![CDATA[glassmorphism]]></category>
            <dc:creator><![CDATA[Nirbhay Pherwani]]></dc:creator>
            <pubDate>Thu, 20 Jul 2023 00:41:48 GMT</pubDate>
            <atom:updated>2023-07-20T00:58:06.953Z</atom:updated>
            <content:encoded><![CDATA[<h4>Enhancing User Interfaces with a Gentle Translucency and Harmonious Blurs</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLHuHIDjqVp_hkK8sNecuA.png" /><figcaption>iPhone Like Blur Effect</figcaption></figure><p>In this article, I will introduce you to a library that simplifies the process of achieving our desired iPhone like blur effect. We will explore how to seamlessly integrate our own code changes (wrapper), allowing for easy incorporation of the blur effect into our composables. By doing so, we will unlock a captivating and distinctive visual experience that is truly one of a kind.</p><p>To begin, we will add the required dependency by following the instructions provided in the repository.</p><pre>allprojects {<br>    repositories {<br>    maven { url &#39;https://jitpack.io&#39; }<br>    }<br>}<br><br>implementation &#39;com.github.jakhongirmadaminov:glassmorphic-composables:0.0.4&#39;</pre><h4>Idea</h4><p>The thought behind this approach is to develop a composable that can be seamlessly applied as a wrapper around our own composables, enabling us to effortlessly achieve a blurred background for the target view (in our case the background)</p><pre>@Composable<br>fun FullSizeBlur(<br>    modifier: Modifier = Modifier,<br>    alpha: Float = 1F,<br>    scrollState: ScrollState = rememberScrollState(),<br>    captureController: CaptureController = rememberCaptureController(),<br>    wallpaperResource: Int = R.drawable.stock_wallapaper,<br>    blurRadius: Int = 100,<br>    color: Color = colorResource(id = R.color.gray),<br>    scale: Float = 1f,<br>    strokeWidth: Float = 1f,<br>    content: @Composable () -&gt; Unit<br>) </pre><p>This composable offers the ability to effortlessly create a seamless and customizable indefinite blur background for any full-sized scroll-able view.</p><p>Through the utilization of default parameter values, developers gain the ability to alter properties such as blur radius, color, and stroke width. This grants them the freedom to tailor the blur effect precisely to their preferences, achieved through the implementation of the <a href="https://developer.android.com/jetpack/compose/graphics/draw/overview#draw-path">Draw Path </a>method.</p><p>And, you can easily set your preferred image as the wallpaper resource, which will be elegantly blurred to serve as the background for your full-size composable.</p><h4>Fast Blur</h4><p>The next step is to create the blurred effect for the image resource passed in the above function.</p><pre>Capturable(<br>    controller = captureController,<br>    onCaptured = { bitmap, _ -&gt;<br>        bitmap?.let {<br>            fastblur(it.asAndroidBitmap(), scale, blurRadius)?.let { <br>                fastBlurred -&gt;<br>                capturedBitmap = fastBlurred<br>            }<br>        }<br>    }<br><br>) {<br>    Image(<br>        painter = painterResource(id = wallpaperResource),<br>        contentDescription = &quot;wallpaper&quot;,<br>        modifier = Modifier.fillMaxSize(),<br>        contentScale = ContentScale.Crop<br>    )<br>}<br><br>LaunchedEffect(key1 = true, block = {<br>    withContext(Dispatchers.Main) {<br>        if (capturedBitmap == null) captureController.capture()<br>    }<br>})</pre><p>Here, we capture the blurred effect for the image passed using the library function <a href="https://github.com/paveldudka/blurring/blob/master/app/src/main/java/com/paveldudka/util/FastBlur.java">Fast Blur</a> (taken from <a href="https://underdestruction.com/2004/02/25/stackblur-2004/">Stack Blur</a>) which is a compromise between Gaussian Blur and Box Blur effects.</p><blockquote>It creates much better looking blurs than Box Blur and was created back in 2004 by <a href="https://en.wikipedia.org/wiki/Mario_Klingemann">Mario Klingemann</a> who wrote the <a href="https://underdestruction.com/2004/02/25/stackblur-2004/">Stack Blur Algorithm</a></blockquote><h4>The Wrapper</h4><p>Originally designed to apply blur backgrounds to individual items within a list, the library serves as the foundation for our wrapper. However, we extend its functionality to cater specifically to a targeted composable that occupies the entire screen size. This refined approach allows us to achieve a the effect exclusively for the desired composable (Second image in cover photo)</p><p>The library accepts a parameter called childMeasures which is a list of Place(lib class) objects that have the position and offset for the items in the list that need to be applied with the desired effect.</p><p>As we intend to only have one item in our list as we can see in the second image above, we can create our child measures in the following way and populate it using the onGloballyPositioned modifier.</p><pre>val childMeasures = remember { mutableStateListOf(Place()) }</pre><pre>Modifier<br>    .onGloballyPositioned {<br>        childMeasures[0].apply {<br>            this.size = IntSize(it.size.width, it.size.height)<br>            this.offset = Offset(<br>                it.positionInParent().x,<br>                it.positionInParent().y<br>            )<br>        }<br>    }</pre><p>The library supports two composables GlassmorphicRow / GlassmorphicColumn</p><p>We can use either as we just have one item in our list.</p><pre>capturedBitmap?.let { capturedImage -&gt;<br>    GlassmorphicColumn(<br>        scrollState = scrollState,<br>        childMeasures = childMeasures,<br>        targetBitmap = capturedImage,<br>        dividerSpace = 10,<br>        blurRadius = blurRadius,<br>        drawOnTop = { path -&gt;<br>            drawPath(<br>                path = path,<br>                color = color,<br>                style = Stroke(strokeWidth),<br>                blendMode = BlendMode.Overlay <br>                // Can even have BlendMode.Plus, <br>                // .Screen or .Lumniosity here<br>            )<br><br>        },<br>        content = {<br>            Box(<br>                modifier = Modifier<br>                    .onGloballyPositioned {<br>                        childMeasures[0].apply {<br>                            this.size = IntSize(it.size.width, it.size.height)<br>                            this.offset = Offset(<br>                                it.positionInParent().x,<br>                                it.positionInParent().y<br>                            )<br>                        }<br>                    }<br>            ) {<br>                content()<br>            }<br>        }<br>    )<br>}</pre><blockquote><em>Capturable</em> and <em>Glassmorphic</em> composables must share the same parent Composable like a <em>Box (Note from the library author)</em></blockquote><h4>Sample Usage</h4><pre>FullSizeBlur{<br>      Column(<br>          modifier = Modifier<br>              .fillMaxSize()<br>              .height(LocalConfiguration.current.screenHeightDp.dp)<br>      ) {<br>          // Code that needs to have the blur background goes here ...<br>          // You can even set an alpha value on your code here so that<br>          // the blur is visible through this composable<br>          Card(modifier = Modifier.alpha(0.6F)) {<br>            // Card content here ...<br>          }<br>      }<br>}</pre><h4>Complete Code</h4><p>Here’s how the final Blur composable file should look like. Imports at the bottom. One can modify this code furthermore to support smaller size blurred composables with non-blurred backgrounds (<a href="https://s3-alpha.figma.com/hub/file/592796867/a98339e3-446c-4fdd-89c2-23108afc7aa0-cover.png">example</a>)</p><pre>@Composable<br>fun FullSizeBlur(<br>    modifier: Modifier = Modifier,<br>    alpha: Float = 1F,<br>    scrollState: ScrollState = rememberScrollState(),<br>    captureController: CaptureController = rememberCaptureController(),<br>    wallpaperResource: Int = R.drawable.stock_wallapaper,<br>    blurRadius: Int = 100,<br>    color: Color = colorResource(id = R.color.gray),<br>    scale: Float = 1f,<br>    strokeWidth: Float = 1f,<br>    content: @Composable () -&gt; Unit<br>) {<br>    var capturedBitmap by remember { mutableStateOf&lt;Bitmap?&gt;(null) }<br><br>    Box(<br>        modifier = modifier<br>            .fillMaxSize()<br>            .alpha(alpha)<br>    ) {<br>        Capturable(<br>            controller = captureController,<br>            onCaptured = { bitmap, _ -&gt;<br>                bitmap?.let {<br>                    fastblur(it.asAndroidBitmap(), scale, blurRadius)?.let { fastBlurred -&gt;<br>                        capturedBitmap = fastBlurred<br>                    }<br>                }<br>            }<br><br>        ) {<br>            Image(<br>                painter = painterResource(id = wallpaperResource),<br>                contentDescription = &quot;wallpaper&quot;,<br>                modifier = Modifier.fillMaxSize(),<br>                contentScale = ContentScale.Crop<br>            )<br>        }<br><br>        LaunchedEffect(key1 = true, block = {<br>            withContext(Dispatchers.Main) {<br>                if (capturedBitmap == null) captureController.capture()<br>            }<br>        })<br><br><br>        val childMeasures = remember { mutableStateListOf(Place()) }<br><br>        capturedBitmap?.let { capturedImage -&gt;<br>            GlassmorphicColumn(<br>                scrollState = scrollState,<br>                childMeasures = childMeasures,<br>                targetBitmap = capturedImage,<br>                blurRadius = blurRadius,<br>                drawOnTop = { path -&gt;<br>                    drawPath(<br>                        path = path,<br>                        color = color,<br>                        style = Stroke(strokeWidth),<br>                    )<br><br>                },<br>                content = {<br>                    Box(<br>                        modifier = Modifier<br>                            .onGloballyPositioned {<br>                                childMeasures[0].apply {<br>                                    this.size = IntSize(it.size.width, it.size.height)<br>                                    this.offset = Offset(<br>                                        it.positionInParent().x,<br>                                        it.positionInParent().y<br>                                    )<br>                                }<br>                            }<br>                    ) {<br>                        content()<br>                    }<br>                }<br>            )<br>        }<br>    }<br>}</pre><pre>import android.graphics.Bitmap<br>import androidx.compose.foundation.Image<br>import androidx.compose.foundation.ScrollState<br>import androidx.compose.foundation.layout.Box<br>import androidx.compose.foundation.layout.fillMaxSize<br>import androidx.compose.foundation.rememberScrollState<br>import androidx.compose.runtime.*<br>import androidx.compose.ui.Modifier<br>import androidx.compose.ui.draw.alpha<br>import androidx.compose.ui.geometry.Offset<br>import androidx.compose.ui.graphics.Color<br>import androidx.compose.ui.graphics.asAndroidBitmap<br>import androidx.compose.ui.graphics.drawscope.Stroke<br>import androidx.compose.ui.layout.ContentScale<br>import androidx.compose.ui.layout.onGloballyPositioned<br>import androidx.compose.ui.layout.positionInParent<br>import androidx.compose.ui.res.colorResource<br>import androidx.compose.ui.res.painterResource<br>import androidx.compose.ui.unit.IntSize<br>import dev.jakhongirmadaminov.glassmorphiccomposables.GlassmorphicColumn<br>import dev.jakhongirmadaminov.glassmorphiccomposables.Place<br>import dev.jakhongirmadaminov.glassmorphiccomposables.fastblur<br>import dev.shreyaspatil.capturable.Capturable<br>import dev.shreyaspatil.capturable.controller.CaptureController<br>import dev.shreyaspatil.capturable.controller.rememberCaptureController<br>import kotlinx.coroutines.Dispatchers<br>import kotlinx.coroutines.withContext</pre><p>Credits to the <a href="https://github.com/jakhongirmadaminov/glassmorphic-composables">repository</a> creator!</p><p>If you found this article informative and inspiring, feel free to leave your thoughts and feedback in the comments section below. Keep building and may your user interfaces always captivate with their alluring blur effect!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a271dfab7d4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/droid-digest/creating-an-iphone-like-glassmorphism-blur-effect-with-jetpack-compose-on-android-a271dfab7d4b">Creating an iPhone-Like Glassy Blur Effect with Jetpack Compose on Android</a> was originally published in <a href="https://medium.com/droid-digest">Droid Digest</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helper Utility for Jetpack Compose’s Pointer Input Scope]]></title>
            <link>https://medium.com/droid-digest/helper-utility-for-jetpack-composes-pointer-input-scope-b6011d13c03?source=rss----90d734ae5858---4</link>
            <guid isPermaLink="false">https://medium.com/p/b6011d13c03</guid>
            <category><![CDATA[gesture-handler]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[pointerinputscope]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[drag]]></category>
            <dc:creator><![CDATA[Nirbhay Pherwani]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 00:31:52 GMT</pubDate>
            <atom:updated>2023-07-16T00:33:32.963Z</atom:updated>
            <content:encoded><![CDATA[<h4>Gesture Association with Jetpack Compose in Android</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*xAiAK6TJurGEnOIiiPBljQ.png" /><figcaption>Image sourced from an <a href="https://www.justinmind.com/blog/tap-or-swipe-mobile-gestures-which-one-should-you-design-with/">article</a> published on J<a href="http://justinmind.com/">ustinmind</a></figcaption></figure><p>Jetpack Compose provides a powerful modifier called pointerInputScope, which allows us to detect various gestures such as dragging, long-press, and tapping performed by the user on the screen. Often, we want to perform certain operations once a specific gesture, like dragging in a particular direction, is completed.</p><p>To streamline this process, we can create a helper function that consolidates all the gesture-related options into one file. This function can then be invoked with the necessary actions to be performed when the gestures are complete, for example make a button appear when user drags towards the left direction.</p><p>The following block of code listens for drag gestures using detectDragGestures but we can extend the same block to listen for other gestures that pointerInputScope supports.</p><p><strong>Code</strong></p><pre>enum class GestureDirections {<br>    DOWN,<br>    UP,<br>    LEFT,<br>    RIGHT,<br>    UNKNOWN<br>}<br><br>object GestureAssociation {<br>    suspend fun associateGesture(<br>        pointerInputScope: PointerInputScope,<br>        ifDirectionIsDown: (() -&gt; Unit)? = null,<br>        ifDirectionIsUp: (() -&gt; Unit)? = null,<br>        ifDirectionIsLeft: (() -&gt; Unit)? = null,<br>        ifDirectionIsRight: (() -&gt; Unit)? = null<br>    ) {<br>        var gestureDirection = GestureDirections.UNKNOWN<br><br>        pointerInputScope.apply {<br>            detectDragGestures(<br>                onDrag = { change, dragAmount -&gt;<br>                    change.consume()<br>                    val (x, y) = dragAmount<br>                    gestureDirection = if (StrictMath.abs(x) &lt;= StrictMath.abs(y)) {<br>                        if (y &gt; 0)<br>                            GestureDirections.DOWN<br>                        else<br>                            GestureDirections.UP<br>                    } else {<br>                        if (x &gt; 0)<br>                            GestureDirections.RIGHT<br>                        else<br>                            GestureDirections.LEFT<br>                    }<br>                },<br>                onDragEnd = {<br>                    when (gestureDirection) {<br>                        GestureDirections.DOWN -&gt; {<br>                            ifDirectionIsDown?.invoke()<br>                        }<br>                        GestureDirections.UP -&gt; {<br>                            ifDirectionIsUp?.invoke()<br>                        }<br>                        GestureDirections.RIGHT -&gt; {<br>                            ifDirectionIsRight?.invoke()<br>                        }<br>                        GestureDirections.LEFT -&gt; {<br>                            ifDirectionIsLeft?.invoke()<br>                        }<br>                        else -&gt; {}<br>                    }<br>                }<br>            )<br>        }<br>    }<br>}</pre><p><strong>Usage</strong></p><pre>Box(<br>            modifier = Modifier<br>                .background(Color.LightGray)<br>                .fillMaxSize()<br>                .pointerInput(Unit) {<br>                    GestureAssociation.associateGesture(<br>                        this,<br>                        ifDirectionIsDown = { showButton() })<br>                },<br>){}</pre><p>In this example when the user will drag on the screen towards the downwards direction the block of code inside isDirectionIsDown will get executed.</p><p>By encapsulating gesture handling logic within a helper function like associateGesture, we can easily handle drag gestures in Jetpack Compose. This approach promotes code reusability and simplifies the implementation of other gesture-based interactions throughout the app.</p><p>Additionally, it frees us from the complexities of calculating precise user actions, allowing us to focus on creating delightful user experiences. Feel free to customize and extend this approach to support other gestures provided by pointerInputScope.</p><p>Have fun coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6011d13c03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/droid-digest/helper-utility-for-jetpack-composes-pointer-input-scope-b6011d13c03">Helper Utility for Jetpack Compose’s Pointer Input Scope</a> was originally published in <a href="https://medium.com/droid-digest">Droid Digest</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>