<?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 Siddharth Singh on Medium]]></title>
        <description><![CDATA[Stories by Siddharth Singh on Medium]]></description>
        <link>https://medium.com/@SiddyDevelops?source=rss-e033f4702471------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bs4JFzHOIANqCurgmnHZ8w.jpeg</url>
            <title>Stories by Siddharth Singh on Medium</title>
            <link>https://medium.com/@SiddyDevelops?source=rss-e033f4702471------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:48:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@SiddyDevelops/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[Creating Instagram Story View in Android]]></title>
            <link>https://blog.devgenius.io/creating-instagram-story-view-in-android-b5e4dbb27185?source=rss-e033f4702471------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5e4dbb27185</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[jitpack]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[instagram]]></category>
            <dc:creator><![CDATA[Siddharth Singh]]></dc:creator>
            <pubDate>Sat, 02 Jul 2022 08:45:06 GMT</pubDate>
            <atom:updated>2022-07-02T08:45:06.374Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*FvXJXnPh9MTt0-KNjW2qMA.gif" /></figure><p>Instagram is one of the most used application in smart phones, and its features are again a very popular topic of discussion among the developers. Stories are now becoming one of the most seen features in many different apps such as WhatsApp, LinkedIn, Instagram, and many more. Nowadays Instagram like stories widely uses in apps for displaying news, educational content, and for interactions with users. I have created an android library that allows implementing full story functionality with only 3–4 lines of code. You can check out the library and read its documentation to understand its working and include it in your applications.</p><p><a href="https://github.com/SiddyDevelops/InstaStoryView">GitHub - SiddyDevelops/InstaStoryView: An android library which provides a progressive and dynamic Instagram-Story like features.</a></p><p>But in this blog I won’t be talking about my library and its functionality but instead we will take a look at creating a our own custom story view for our Android Applications. So, shall we start?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*3w3OJKcIqKZqm9496DX50A.gif" /></figure><blockquote><strong>Creating our application: Touch Base</strong></blockquote><p>In order to view our story we will require items/icons by clicking which, the user can see the progressive story images. We will need a <em>RecyclerView</em> to display the view icons which on-click will inflate the story viewer. The <em>RecyclerView </em>is placed inside the <em>MainActivity</em>. The <em>layout_item.xml</em> for the <em>RecyclerView</em> is designed as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*weJrwb2HvgO8-bfeMX8nGA.jpeg" /><figcaption>RecyclerView inside MainActivity</figcaption></figure><p><strong><em>Code for </em></strong><a href="https://gist.github.com/SiddyDevelops/68d47a7b5e31deca3cdb54d55d48a9b0"><strong>story_icon_item.xml</strong></a> <strong><em>for RecyclerView:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45b021f136cabdce63f373a9e2efc11b/href">https://medium.com/media/45b021f136cabdce63f373a9e2efc11b/href</a></iframe><p><strong>Code for </strong><a href="https://gist.github.com/SiddyDevelops/d43c25aa792cf71f31ddc1c54064f6d8"><strong>RecyclerViewAdapter.java</strong></a> <strong>to display the icons for story items:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/20437621843b733a65558e0273397ff2/href">https://medium.com/media/20437621843b733a65558e0273397ff2/href</a></iframe><p><strong><em>Code for </em></strong><a href="https://gist.github.com/SiddyDevelops/5cc042673e484438963e85214b39629b"><strong>MainActivity.java</strong></a> <strong><em>and </em></strong><a href="https://gist.github.com/SiddyDevelops/6994c4c7d01d0074476482e433e0618c"><strong>activity_main.xml</strong></a><strong><em>:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/250f83ca0e9cdc3cc4bfae1e15709d9c/href">https://medium.com/media/250f83ca0e9cdc3cc4bfae1e15709d9c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f2ca86fe666f86fd3fdaf32c8a341fc/href">https://medium.com/media/3f2ca86fe666f86fd3fdaf32c8a341fc/href</a></iframe><blockquote><strong>Creating our custom template</strong></blockquote><p>We will have a basic template which will contain <em>ImageView</em>,<em> TextViews</em> and a like button. In all stories we will change the contents in these views through an adapter. So all the progressive stories will follow the same template with different contents in the Views. This is what our template will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*PgEDl3MmZ0-Mi_R12FPqRw.jpeg" /><figcaption>Template Design for Story-View</figcaption></figure><p>Thanks for the Android open-source community, I found out an excellent library and, based on this library, we will have control over the top progress bar which will control the methods like <em>onPause</em>,<em> onTouch</em>,<em> onResume</em>. This library will also help us to divide the top progress bar into parts depending on the number of images in each story. So enough chit-chatting, let us start coding our custom story view.</p><p><a href="https://github.com/shts/StoriesProgressView">GitHub - shts/StoriesProgressView: show horizontal progress like instagram stories.</a></p><p><em>Step 1. </em>The very first step would be including the library dependency in our <em>Build.Gradle</em>.</p><pre>// Inside build.gradle(Project:app)<br>allprojects {<br>    repositories {<br>        ...<br>        maven { url &quot;https://jitpack.io&quot; }<br>    }<br>}<br>// Inside build.gradle(Module:app)<br>dependencies {<br>    ...<br>    implementation &#39;com.github.shts:StoriesProgressView:3.0.0&#39;<br>}</pre><p><em>Step 2. </em>It is necessary to have a theme with <em>NoActionBar</em> hence, inside the <em>theme.xml</em> change the root style to:</p><pre>Theme.MaterialComponents.DayNight.NoActionBar</pre><p><em>Step 3. </em>Now its time for us to design the base template for our story viewer. Create a new Activity which will contain this template<em>. </em>Inside the new layout we will design and code our layout as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*U_oeyF2Y7SC5TsGyQaZMtQ.png" /></figure><p><strong><em>Code for </em></strong><a href="https://gist.github.com/SiddyDevelops/9414d270bb67445e413fb1d9bbbbab16#file-activity_story_player-xml"><strong><em>activity_story_player.xml</em></strong></a><strong><em>:</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83fafe9cbb0ed12d5b7d0d6641904ce2/href">https://medium.com/media/83fafe9cbb0ed12d5b7d0d6641904ce2/href</a></iframe><p><em>Step 4: </em>Now here comes the most important step, we need to code the functionality for our activity and story player. Here we will include the function like Skip story, pause and resume story, go to next story or move back to previous story. (<a href="https://gist.github.com/SiddyDevelops/72fe612020664cc6d03d8ac630c212ba#file-storyplayeractivity-java">StoryPlayerActivity.java</a>)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee2826e0cf441c73aeca73b94a3acd0d/href">https://medium.com/media/ee2826e0cf441c73aeca73b94a3acd0d/href</a></iframe><p>That’s it! Now your app has Instagram stories with caching and powerful features. Congratulations! You have now an application which has the same behavior as the Instagram story viewer.</p><p>Thanks for reading the article! Make sure to save this article and shower some claps if you like it. Stay tuned for more exciting articles like this one. Till then enjoy coding! 🚀 🔥</p><p><a href="https://github.com/SiddyDevelops/InstaStory-Blog"><strong><em>Source-Code</em></strong></a></p><p><a href="https://siddydevelops.github.io/"><strong><em>Know About Me</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5e4dbb27185" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/creating-instagram-story-view-in-android-b5e4dbb27185">Creating Instagram Story View in Android</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Populating Android-App Widgets with Room-Database]]></title>
            <link>https://medium.com/@SiddyDevelops/populating-android-app-widgets-with-room-database-713e12bdcc63?source=rss-e033f4702471------2</link>
            <guid isPermaLink="false">https://medium.com/p/713e12bdcc63</guid>
            <category><![CDATA[widget]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[ui-ux]]></category>
            <category><![CDATA[appwidgetprovider]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Siddharth Singh]]></dc:creator>
            <pubDate>Sat, 25 Jun 2022 12:16:08 GMT</pubDate>
            <atom:updated>2022-06-25T12:16:08.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ARPagZ94VKYZ7h4SkCHhMA.png" /></figure><p>In this tutorial-guide we will be exploring the use of Android-App Widgets and how can we parallelly use them with databases like <a href="https://developer.android.com/training/data-storage/sqlite"><em>SQLite</em></a>, <a href="https://developer.android.com/training/data-storage/room"><em>Room-database</em></a>, etc. You will learn how you can customize your widgets, but mainly we will be learning on how we can display a list of items in a <a href="https://developer.android.com/reference/android/widget/ListView"><em>ListView </em></a>or <a href="https://developer.android.com/reference/android/widget/StackView"><em>StackView </em></a>using room-database as our data source.</p><p>Before getting started, what is an Android-App Widget? If you prefer 🧑‍💻 rather than 📖, you can directly hop to <a href="https://github.com/SiddyDevelops/ShoppingList-Widget"><em>this repo</em></a>. Feel free to star and fork the <a href="https://github.com/SiddyDevelops/ShoppingList-Widget"><em>repository</em></a>. All sorts of contributions are welcome!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*18An-qiaOvIS8zPv8Zf1Zw.gif" /></figure><p><a href="https://developer.android.com/design/patterns/widgets.html"><em>App Widgets</em></a><em> are miniature application views we like to embed on the home screen. You can imagine them as “at-a-glance” views of an app’s most important data and functionality that is accessible right from the user’s home screen.</em></p><p>If you have not worked with app widgets before, it is recommended to first learn basic functionality and how to create one. Please refer to <a href="https://medium.com/android-bits/android-widgets-ad3d166458d3"><em>this article</em></a> which in-depth explains how you can create a widget.</p><p><a href="https://medium.com/android-bits/android-widgets-ad3d166458d3">Android Widgets</a></p><blockquote><strong><em>Enough Chit-chatting, Lets Get Started!</em></strong></blockquote><p>In order to have a functionable app-widget we require 3 files:</p><ul><li>A Widget-layout which gets inflated when user places widget on the home screen.</li><li>An XML file which defines the properties of widgets.</li><li>A class for widget actions.</li></ul><p>You can either manually create these files and specify these files in <em>Manifest </em>or you can directly create a basic app-widget by navigating in android studio to: <strong><em>File-&gt;New-&gt;Widget-&gt;AppWidget.</em></strong></p><p>Now let us modify our <em>appwidget_layout.xml</em> and create listview item layout:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7931775c53784f5987bd4a6ad16eec98/href">https://medium.com/media/7931775c53784f5987bd4a6ad16eec98/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/907bdc250c901d8d522c49cbe6de5451/href">https://medium.com/media/907bdc250c901d8d522c49cbe6de5451/href</a></iframe><p>Our goal is to display the list of editable items in the <em>widget_listview </em>from room-database. The configurations for room database is already set-up. I have created an <em>Entity </em>for a <em>ShoppingItem </em>which have name of the item as primary-key and one property and amount as another property. The DAO consists of 4 major suspended functions:</p><ul><li><strong><em>Upsort</em></strong>: To insert new item in the list. This function can also be used to modify amount of a particular item.</li><li><strong><em>UpdateAmount</em></strong>: To modify amount of a particular item.</li><li><strong><em>Delete</em></strong>: To delete an item from the list.</li><li><strong><em>GetAllShoppingItems</em></strong>: Returns a <em>Obervable-List</em> of ShoppingItems present in the database.</li></ul><p>In order to use <a href="https://proandroiddev.com/understanding-mvvm-pattern-for-android-in-2021-98b155b37b54"><em>MVVM Architecture</em></a>, <em>ViewModel </em>and <em>Repository </em>Classes are also defined. But since App-Widget run with the help of Broadcast receivers, it does not have lifecycle. An instance of your <em>AppWidgetProvider</em> lives for exactly one callback method (e.g., <em>onUpdate()</em>). Hence, there is no mapping to <em>Lifecycle </em>events, just as there is no mapping of <em>Lifecycle </em>events to an ordinary <em>BroadcastReceivers</em>. We will looking at a significantly different approach in order to Room-database and its methods.</p><p>Firstly, let us write the code to configure <em>ListView </em>and to populate it. The <em>WidgetproviderClass</em> or <em>AppWidget.kt </em>will have code to to bind our views to an object to <em>RemoteView. </em>A <em>ServiceIntent </em>will be require to set adapter for our <em>ListView. </em>This is what <em>AppWidget.kt</em> would look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2fc384398743fcb04c928bd4d7a52ec/href">https://medium.com/media/c2fc384398743fcb04c928bd4d7a52ec/href</a></iframe><p>We don’t want our <em>ListView </em>to be static. Hence to register <em>onClick </em>events and populate it with room database, we will require to create a <strong><em>RemoteViewsService</em></strong> class with <strong><em>RemoteViewsFactory </em></strong>inner class. The <em>WidgetItemFactory </em>delivers the following methods:</p><ul><li><em>onCreate</em>(): Called when your factory is first constructed.</li><li><em>onDataSetChanged</em>(): Called when notifyDataSetChanged() is triggered on the remote adapter.</li><li><em>onDestroy</em>(): Called when the last RemoteViewsAdapter that is associated with this factory is unbound.</li><li><em>getCount</em>(): How many items are in the data set represented by this Adapter.</li><li><em>getViewAt</em>(): Get a View that displays the data at the specified position in the data set. This is where we bind views to <em>RemoteView</em>.</li><li><em>getLoadingView</em>(): This allows for the use of a custom loading view which appears between the time that <em>getViewAt()</em> is called and returns.</li><li><em>getViewTypeCount</em>(): Returns the number of types of Views that will be created by <a href="https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)"><em>getView(int,View,ViewGroup)</em></a>.</li><li><em>getItemId</em>(): Get the row id associated with the specified position in the list.</li><li><em>hasStableIds</em>(): Indicates whether the item ids are stable across changes to the underlying data.</li></ul><p>Once we have bonded our views we can initialize our room database and access the entities and methods through our <em>Repository </em>Object. We will now set <em>onClick </em>events on the buttons which will either increment/decrement amount or delete an item. We will require to create Intent() objects and pass data to the <em>onReceive()</em> function in our <em>AppWidget.kt</em>. In the <em>onUpdate()</em> method we will create <em>PendingIntent </em>and set it our ListView’s <em>PendingIntentTemplete</em>. Again in order to access our room database we will initialize our repository object. In the <strong><em>onReceive() </em></strong>method, depending on the intent received we will call our repository methods to update the room database entities.</p><p>Also don’t forget to use <strong><em>notifyAppWidgetViewDataChanged() </em></strong>method to update the views of all the app-widgets deployed when the data has been changed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b04c2fb998b219a417dd7bdfa6a88b63/href">https://medium.com/media/b04c2fb998b219a417dd7bdfa6a88b63/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3dfce49b1455e2dc53cd72a36c98b7ca/href">https://medium.com/media/3dfce49b1455e2dc53cd72a36c98b7ca/href</a></iframe><p>With this we come to an end. You now will be able to use Room-Database in along with App-Widget to add new feature to your android projects. If you made it at this far, personally thank you for reading. Here is the promised <a href="https://github.com/SiddyDevelops/ShoppingList-Widget"><em>Github-Repo</em></a> which includes whole project in this article.</p><p><em>To help others to reach the article don’t forget to recommend </em>💚<em>. It means a lot to me. Follow up on me. Signing Out, </em><a href="https://siddydevelops.github.io/"><strong><em>Siddy</em></strong></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=713e12bdcc63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Cold Start and Buffer Screen]]></title>
            <link>https://medium.com/skillship-vellore/android-cold-start-and-buffer-screen-6833af67d4cd?source=rss-e033f4702471------2</link>
            <guid isPermaLink="false">https://medium.com/p/6833af67d4cd</guid>
            <category><![CDATA[ui-ux]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[splash-screen]]></category>
            <dc:creator><![CDATA[Siddharth Singh]]></dc:creator>
            <pubDate>Mon, 15 Nov 2021 06:52:19 GMT</pubDate>
            <atom:updated>2021-11-15T06:52:19.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*OJEOXsADAmunWgmEsEDPkg.gif" /></figure><p>What makes an android app complete? Implementing functionalities, view, activities, using databases, adding animations, adding the perfect theme to go with the app, etc. might be the answer. But as developers, we always forget about one important thing, the first impression, i.e. <em>Splash Screen</em>. Even though some of us remember to implement it, we don’t like how a short-bright-white-screen ruins the splash screen, whenever we launch an android app. Have you ever wondered, why this white screen appears before the Splash-Screen? Refer to the blog below to learn more about a splash screen and how to create one.</p><p><a href="https://uxplanet.org/splash-screen-is-more-important-than-you-think-855e78da3c2c">Splash Screen is More Important Than You Think</a></p><h3>Why we experience a white-screen on-start?</h3><p>A bright screen may appear due to many factors, one of the major factor being <em>Cold-Start</em>. It means that while the app loads memory for the app to run, android by-default presents a buffer layout (which is usually white in color). The duration of this buffer screen may vary depending upon how much memory the application requires. In other words, the buffer screen is shown while e.g. onCreate() runs and the layouts are being inflated. It can take some time especially if there’s a lot of resources that needs to be read, decoded and scaled. <em>In simple words, android requires significant time to gather sh*t together, so that the app can work and instead of providing a laggy-delay, android choses to display a buffer screen.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*CHtHPzi7dY8w9VhhgXcVpw.gif" /><figcaption>Default Buffer Screen VS Custom Buffer Screen</figcaption></figure><h3><strong>How can we resolve this issue?</strong></h3><p>To be honest, we cannot avoid a buffer screen. Processes require time to load in the beginning so that app doesn&#39;t crashes or ruin user-experience later. But instead of android, by default providing us a buffer screen, we can create one for our app. We can replace the default screen by a custom screen. We do not need to create a new <em>layout.xml </em>because a buffer-layout will again require a buffer screen while our <em>layout.xml</em> inflates. What we need, is just a drawable to replace the buffer screen. But again we need to make this drawable as the <em>first-thing-to-load</em> when the app launches so that we can use it as our buffer. There is a lot to remember for now, lets us prepare a list of things that we need to do:</p><ul><li>Creating a traditional Splash-Screen.</li><li>Creating a drawable to replace the buffer.</li><li>Creating a custom style for our splash-screen.</li><li>Celebrating our Success!</li></ul><p>So, shall we begin?</p><blockquote><strong>Creating a splash screen:</strong></blockquote><p>A Splash Screen is a screen that appears when you open an app on your mobile device. Sometimes it’s referred to as a launch screen or startup screen and shows up when your app is loading after you’ve just opened it. There is no restriction on creating a splash screen, you can design it the way you want. Add animations, texts, you name it! But we need the buffer screen to synchronize with the splash screen, and hence give users the experience that the <em>(buffer + splash-screen) </em>is actually the <em>splash-screen</em>. There are a number of ways of doing this, one of the methods being the addition of an image (our logo/icon) to the center of the buffer screen and then in the splash screen, translating the image above some text (our app-name). I know this is quite a lot to understand and hence have a look at the <em>gif </em>below. Also, if you get stuck anytime while following along with me, feel free to checkout the <a href="https://github.com/SiddyDevelops/Siddy-Pizza"><em>Source-Code</em></a><em>.</em></p><blockquote><strong>Creating our Buffer-Drawable:</strong></blockquote><p>For the drawable, which would replace the buffer-screen, I have chosen a background color (same as the background-color of splash-screen) and an image which is fixed at the center of the screen. <strong>The same image is also in the center of the screen in our <em>activity_splash_screen.xml</em>.</strong></p><pre><em>&lt;!--Drawable_File_Name: </em>splash_buffer<em>--&gt;</em><br>&lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:opacity=&quot;opaque&quot;&gt;<br>    &lt;item android:drawable=&quot;#C2D5E4&quot;/&gt;<br>    &lt;item&gt;<br>        &lt;bitmap<br>            android:gravity=&quot;center&quot;<br>            android:src=&quot;@drawable/pizza&quot;/&gt;<br>    &lt;/item&gt;<br>&lt;/layer-list&gt;</pre><blockquote><strong>Creating Custom Style for our drawable:</strong></blockquote><p>Add the below code-snippet in <em>themes.xml. </em>This is the step which is responsible for replacing the default-white-buffer with our new buffer-drawable. So this is important!</p><pre>&lt;style name=&quot;Theme.SplashScreenBlog.SplashScreen&quot;&gt;<br>    &lt;item name=&quot;android:windowBackground&quot;&gt;@drawable/splash_buffer&lt;/item&gt;<br>&lt;/style&gt;</pre><blockquote><strong>Celebrating our Success</strong></blockquote><p>Congratulations! We have successfully made our android application more efficient. We have now resolved the issue of Android Cold Start and Buffer screen.</p><p>Thanks for reading the article! Make sure to save this article and shower some claps if you like it. Stay tuned for more exciting articles like this one. Till then enjoy coding! 🚀 🔥</p><p><a href="https://siddydevelops.github.io/"><em>Know About Me</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6833af67d4cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/skillship-vellore/android-cold-start-and-buffer-screen-6833af67d4cd">Android Cold Start and Buffer Screen</a> was originally published in <a href="https://medium.com/skillship-vellore">Skillship Vellore</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Publishing android libraries to Jitpack with Gradle 7.+]]></title>
            <link>https://medium.com/adg-vit/publishing-android-libraries-to-jitpack-with-gradle-7-4b932e849284?source=rss-e033f4702471------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b932e849284</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[jitpack]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-libraries]]></category>
            <dc:creator><![CDATA[Siddharth Singh]]></dc:creator>
            <pubDate>Fri, 15 Oct 2021 13:12:22 GMT</pubDate>
            <atom:updated>2021-10-15T13:12:22.008Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXjYEbyqmFWAuPaqDdR-Mg.jpeg" /><figcaption>Image is taken from <a href="https://www.spaceotechnologies.com/">https://www.spaceotechnologies.com/</a></figcaption></figure><p>Android frameworks and libraries (or just libraries in general) are a set of implementations of behaviour that are written in programming languages and have a well-defined interface. Android libraries are developed and published to help out the developers and ease the process of building android apps.</p><p>Gradle 7.+ is the next step in Gradle’s evolution in build automation and developer productivity. With the latest release of Gradle and its modules, the process of publishing an android library is slightly changed.</p><p>In this blog, I will be talking about how we can publish our android library to Jitpack with our Gradle version being 7.+.</p><p>To learn how to publish an Android library, we first need to create one. So shall we begin?</p><h3><strong>Creating Android Library</strong></h3><p><em>Step 1</em>. Lets us start by creating a standard android project and let us name it <em>MyLibraryExample</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TbbtsduTBZX4PdFVKFyxQ.png" /><figcaption>Creating a standard android project.</figcaption></figure><p><em>Step 2.</em> Now create a new module from File → New → New Module… Select <em>Android Library</em> from templates and provide the module name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*hfbSAkQqpkqcSwM2iyww3g.png" /><figcaption>Creating a new module.</figcaption></figure><p>Step 3. Your project structure must look like this. You can include all your Java classes, XML Layouts, drawable, fonts, etc. inside this newly created module.</p><pre>Note: If your are unable to find res directory, you can simply create one and add Android Resource Directories inside of it.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*72Y-wE7Z2vWIPlKVKp7uMw.png" /><figcaption>Project Structure</figcaption></figure><p><em>Step 3.</em> Here comes the most important step. Once you have added all the required code for your library, you need to create a new file, <em>jitpack.yml </em>inside the project-level directory. Add the following code inside the newly created file.</p><pre>jdk:<br>  - openjdk11<br>before_install:<br>  - chmod +x gradlew<br>install:<br>  - ./gradlew build :MyLibrary:publishToMavenLocal</pre><p><em>Step 4: </em>Now edit your module-level<em> build.gradle </em>as follows and after editing it must look something similar to this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ad49e96545773de2dba2b15f616c8f2/href">https://medium.com/media/3ad49e96545773de2dba2b15f616c8f2/href</a></iframe><p>Now inside <em>settings.gradle</em> add the following code snippet:</p><pre>repositories {<br>    google()<br>    mavenCentral()<br>    maven { url &#39;https://jitpack.io&#39; }<em><br></em>}</pre><p>Click on <em>Sync</em>.</p><p>Congratulations you have successfully created your library. Now we need to publish it.</p><h3><strong>Publishing Library to Jitpack</strong></h3><p><em>Step 1.</em> Create a new repository on <em>Github</em> and push all your code to the repository. Create a new release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4B87WtG3gm2ldbVj6h0Eg.png" /><figcaption>Create a release after uploading code to repo.</figcaption></figure><p>Step 2. Now go to <a href="https://jitpack.io/"><em>Jitpack</em></a> and paste your repository link and click <em>Look Up. </em>Now select the release version and click on<em> GET IT. </em>Check the <em>Logs </em>for any errors. You can refer below to the same page to learn how to use your library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ct8HNEFBR48KoWmYUheLeA.png" /><figcaption>Publish your library to Jitpack.</figcaption></figure><p>Congratulations, you have successfully created your first library. Share it with your friends.</p><p>Thanks for reading the article make sure to save this article and shower some claps if you like it. Stay tuned for more exciting articles like this one. Till then enjoy coding! 🚀 🔥</p><p>Contact Me: <a href="https://github.com/SiddyDevelops"><em>Github</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b932e849284" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adg-vit/publishing-android-libraries-to-jitpack-with-gradle-7-4b932e849284">Publishing android libraries to Jitpack with Gradle 7.+</a> was originally published in <a href="https://medium.com/adg-vit">ADGVIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top Android UI Libraries]]></title>
            <link>https://medium.com/adg-vit/top-android-ui-libraries-81471af69256?source=rss-e033f4702471------2</link>
            <guid isPermaLink="false">https://medium.com/p/81471af69256</guid>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[app-design]]></category>
            <dc:creator><![CDATA[Siddharth Singh]]></dc:creator>
            <pubDate>Thu, 19 Aug 2021 05:18:48 GMT</pubDate>
            <atom:updated>2021-08-19T05:18:48.685Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wondered while developing apps, “How can I reach more people? How can I attract more users to use my app?” The answer is simple yet difficult to understand. Nowadays, users tend to prefer apps that have user-friendly interactions over old-age static apps. Besides, an interactive app would brighten up the user’s expectations while using the app.</p><p>Using libraries that are easily available over Github is one of the best ways to add interactive functionality and provide users with the missing element in the app.</p><p>In this blog, I have selectively chosen some of the widely used android libraries which can be made easier for you to use and smartly apply them. The libraries which are included in this blog are free to use and can be implemented both in Java and Kotlin. So, shall we start?</p><blockquote>Contents:</blockquote><blockquote>1. Circular Menu</blockquote><blockquote>2. Spark Button</blockquote><blockquote>3. Carousel AppIntro</blockquote><h3><strong>Circular Menu:</strong></h3><p>There are different ways to navigate to other activities or fragments. Navigation drawer, menu-items, drop-down list navigation are some of the widely used methods to provide an interface for the user to navigate. You will find these types of navigations in almost every app. Thus, something new, something unique; a navigation circular menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AUyMKHlP2Vzl2FpOh_jiqg.gif" /><figcaption>(This is the traditional Navigation-drawer)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*JjB4x_Ec_PdlWxsWnKh4iQ.gif" /><figcaption>(This is a Circular Menu Navigator)</figcaption></figure><p><strong>Installation and Implementation:</strong></p><ol><li>Firstly add the required dependency in gradle.AppModule and sync the project:</li></ol><pre>implementation &#39;com.ramotion.circlemenu:circle-menu:0.3.2&#39;</pre><p>2. Create a new value resource file, ‘buttons’ and add two arrays:</p><p>· One for menu icons</p><p>· Another for icons colour</p><p>Also, add the required Vector assets in the drawable folder:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd7b526ca01e62c52354c20492c577b0/href">https://medium.com/media/fd7b526ca01e62c52354c20492c577b0/href</a></iframe><p>3. Edit the activity_main.xml and add the component of the circular menu.</p><p>Assign appropriate constraints and add the buttons array.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a91c729388d671ffbeffad87e5814ab/href">https://medium.com/media/6a91c729388d671ffbeffad87e5814ab/href</a></iframe><p>4. In the MainActivity.java set an event click listener on the menu attribute. Implement all the methods as shown. You can set onClick to the methods or pass to another activity/fragment.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ec8cd30458cbe4b57d5d19031dd922f/href">https://medium.com/media/2ec8cd30458cbe4b57d5d19031dd922f/href</a></iframe><p>Source: <a href="https://github.com/Ramotion/circle-menu-android">Ramotion CircularMenu</a></p><h3><strong>Spark Button:</strong></h3><p>When a user uses an app and wants to save something or a part of something, maybe a book or a product which he/she wants to purchase later, the user usually either Bookmarks or add that particular item to favourites. What if we can make this small process more attractive?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*Nkar5GeuLo7QNZ8LhmLmNg.gif" /><figcaption>A highly customizable and lightweight library that allows you to create a button with an animation effect similar to Twitter’s heart animation.</figcaption></figure><p><strong>Installation and Implementation:</strong></p><ol><li>Add the following required dependency in build.gradle and gradle.AppModule respectively and sync the project:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1013b4445198e165d83300b8e1bfbd9/href">https://medium.com/media/c1013b4445198e165d83300b8e1bfbd9/href</a></iframe><p>2. Now add two vector assets of favourite one without any fill-color another with a fill-color red. Also, add the following colour to the color.xml file:</p><pre>&lt;color name=&quot;red&quot;&gt;#FA0000&lt;/color&gt;<br>&lt;color name=&quot;orange&quot;&gt;#F37A2A&lt;/color&gt;</pre><pre>These color are important as when user clicks the favorite icon an spark-alike-animation is generated which consists of these two colors.</pre><p>3. Switch to activity_main.xml and add the following code. The following code creates an icon and assigns the image (vector assets) to the cases when the user clicks on the button. We also add the colour which we defined in step 2 to display while the user clicks on the button.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b018006836e33ee238bbc028022c76c/href">https://medium.com/media/8b018006836e33ee238bbc028022c76c/href</a></iframe><p>4. After working on XML and layout, switch to MainActivity.java, declare an attribute of SparkButton and assign it to its appropriate id. The library provides some event listeners which can be used and modified to our use.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31a5d2a35bccb7f93a043f6dc7a7010d/href">https://medium.com/media/31a5d2a35bccb7f93a043f6dc7a7010d/href</a></iframe><p>Source: <a href="https://github.com/varunest/SparkButton">Varunest SparkButton</a></p><h3><strong>Carousel App-Intro:</strong></h3><p>I am sure you have noticed quite a few times, when we download an app we get a brief introduction about the app, how to use it and a little more. This introductory app part is only when you launch it for the very first time. Let us learn how do we create it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*TFs1vEpkggk-LQvaCbMbtg.gif" /><figcaption>Example of how this library appears.</figcaption></figure><p><strong>Installation and Implementation:</strong></p><ol><li>Add the following required dependency in build.gradle and gradle.AppModule respectively and sync the project:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06fba21d5c07bbaab3d3c84f21e165bc/href">https://medium.com/media/06fba21d5c07bbaab3d3c84f21e165bc/href</a></iframe><p>2. Extend the MainActivity.java with AppIntro. Add the colours you may wish to use in the AppIntro. Implement the override methods provided by the library as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09e4e6e417c68a3504eed384e1629816/href">https://medium.com/media/09e4e6e417c68a3504eed384e1629816/href</a></iframe><p>3. Add the ‘addSlide’ method to ‘onCreate’ and pass attributes like the title of the screen, description, image and background colour. You can add as many slides as you want. PS: Don’t forget to remove the ‘setContentView()’ method from the .java file otherwise the app with the launch with the respective XML file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/da9c0e39909f03b3deded8dfb4b13cac/href">https://medium.com/media/da9c0e39909f03b3deded8dfb4b13cac/href</a></iframe><p>4. Quick question: Will the application always start with the AppIntro every time the user launches the application? The answer is YES. Now, what should we do? SHARED PREFERENCES.</p><p>a. Create an object of Shared Preferences and initialize it. Do the same with SharedPreference.Editor. On the override method of onSkipPressed and onDonePressed define a shared Preferences with KEY: checkState and pass a Boolean true.</p><p>b. In the onCreate method check the contents of sharedPreferences and pass the intent depending on the contents of said sharedPreferences.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c39cf140b231ace26f8129be742da41a/href">https://medium.com/media/c39cf140b231ace26f8129be742da41a/href</a></iframe><p>5. After adding the Shared Preferences to our code we can now implement the methods we discussed earlier.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd829c6b35e0a2a61ae2d3607cc5f4b4/href">https://medium.com/media/fd829c6b35e0a2a61ae2d3607cc5f4b4/href</a></iframe><p>Yay! You made it to the end of the blog. I hope you may have learned about the new library which is easily available and can be used to stand out.</p><p>Thanks for reading the article make sure to save this article and shower some claps if you like it. Stay tuned for more exciting articles like this one. Till then enjoy coding! 🚀 🔥</p><p>Source: <a href="https://github.com/AppIntro/AppIntro">AppIntro</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81471af69256" width="1" height="1" alt=""><hr><p><a href="https://medium.com/adg-vit/top-android-ui-libraries-81471af69256">Top Android UI Libraries</a> was originally published in <a href="https://medium.com/adg-vit">ADGVIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>