<?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 Velmurugan Perumal on Medium]]></title>
        <description><![CDATA[Stories by Velmurugan Perumal on Medium]]></description>
        <link>https://medium.com/@prasanthvel?source=rss-a668b1afa1b7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6Tu31tNXdZgndBVu</url>
            <title>Stories by Velmurugan Perumal on Medium</title>
            <link>https://medium.com/@prasanthvel?source=rss-a668b1afa1b7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 09:35:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prasanthvel/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[Create Custom Viewpager in Android Android Kotlin Tutorial]]></title>
            <link>https://prasanthvel.medium.com/create-custom-viewpager-in-android-android-kotlin-tutorial-b4c7eff76488?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4c7eff76488</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[viewpager]]></category>
            <category><![CDATA[custom-view-android]]></category>
            <category><![CDATA[android-viewpager]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Sat, 15 Aug 2020 07:26:54 GMT</pubDate>
            <atom:updated>2020-10-30T02:41:06.431Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I would like to share the way I have learned to create Custom Viewpager design in Android using Kotlin.</p><p>Viewpager is a widget in Android to make swipeable screens. The default view pager allows swiping left and right to see the next slides on the screen. In this post, we’ll see how to create a view pager with a custom view like a carousel UI. The below image is the output of this tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*jHVWSNEYf_TqcCPd3mSO8Q.png" /></figure><p>To make a custom viewpager like this, create the followings in your project<br>1.Activity for viewpager<br>2.Custom viewpager adapter by extending PagerAdapter<br>3.View layout for the page</p><h3>Activity for Viewpager</h3><p>Create an Activity for your viewpager, in the activity XML add the viewpager widget inside the layout. Then you have to create the layout for the slides, you can find the complete codes in this post <a href="http://www.overflowarchives.com/android/how-to-create-android-custom-viewpager-adapter-android-tutorial/">How to Create Android Custom Viewpager Adapter — Android Tutorial</a></p><h3>Viewpager Adapter</h3><p>After completing your layout, create a view pager adapter by extending the PagerAdapter. And send the context and itemList to the adapter.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a9ef45143b531fa01ec8f7b50b945806/href">https://medium.com/media/a9ef45143b531fa01ec8f7b50b945806/href</a></iframe><h3>Setup the Activity</h3><p>Now in your activity class create the adapter and assign it to the viewpager as below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c526dbe416ef1f4bbc4f0df7e62c61c/href">https://medium.com/media/7c526dbe416ef1f4bbc4f0df7e62c61c/href</a></iframe><p>For customization of the viewpager add the below code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3186ee8f6386767c0923a7903398a1d6/href">https://medium.com/media/3186ee8f6386767c0923a7903398a1d6/href</a></iframe><p>Also, add a pageChangeListener to the viewpager to handle the slide event, do the following.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e36704d4551a732d22080b369bf1c305/href">https://medium.com/media/e36704d4551a732d22080b369bf1c305/href</a></iframe><p>and add the viewPagerPageChangeListener to your viewpager</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/660f3cd5930b7151aff5812b5299516b/href">https://medium.com/media/660f3cd5930b7151aff5812b5299516b/href</a></iframe><p>The output of the viewpager will be like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*BlwQdwDZXzVNx8MLeixetQ.gif" /></figure><p>If you need more detail on the coding part please check in this original post. <a href="http://www.overflowarchives.com/android/how-to-create-android-custom-viewpager-adapter-android-tutorial/">How to Create Android Custom Viewpager Adapter — Android Tutorial</a>. Happy Coding! Happy Kotlin!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4c7eff76488" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Circular progress bar in Unity 3D with round edges]]></title>
            <link>https://prasanthvel.medium.com/create-circular-progress-bar-in-unity-3d-with-round-edges-39b0759ed6e7?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/39b0759ed6e7</guid>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[unity-3d-tutorials]]></category>
            <category><![CDATA[unity-ui-series]]></category>
            <category><![CDATA[circular-progress-bar]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Wed, 13 May 2020 16:32:56 GMT</pubDate>
            <atom:updated>2020-05-13T16:32:56.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*_grx3Ghar-qd8jjy93VNzw.gif" /></figure><p>In Unity 3D, we can easily create typical progress and Circular / Radical progress bar. The Circular progress bar can be done by converting the image type to <strong>Filled</strong> from <strong>Simple.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*P6DbQhLkCL5wnIYTY_nhhw.png" /></figure><p>This Radical progress bar looks good, but how about taking it to bring a fancy look and feel?</p><p>When it comes to adding fancy and curved edges to the Circular progress bar, it will be a headache with Unity, as there is no direct solution included in Unity 3D. So I have spent some time looking for a better solution to achieve this and stopped my search after founding this solution from the internet.</p><p>For the more detailed explanation please check on the following resources.<br><strong>Tutorial </strong>— <a href="https://bit.ly/2LrQK5Q">https://bit.ly/2LrQK5Q</a><br><strong>Website </strong>— <a href="https://bit.ly/2T5frJM">https://bit.ly/2T5frJM</a></p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39b0759ed6e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Parse The JSON File In Unity 3D C# — Unity 3D Tutorial — Overflow Archives]]></title>
            <link>https://prasanthvel.medium.com/how-to-parse-the-json-file-in-unity-3d-c-unity-3d-tutorial-overflow-archives-aa3b502f4094?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa3b502f4094</guid>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[unity2d]]></category>
            <category><![CDATA[unity-development]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[unity3d]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Sat, 11 Jan 2020 21:18:27 GMT</pubDate>
            <atom:updated>2022-07-21T05:33:40.906Z</atom:updated>
            <content:encoded><![CDATA[<h3>How To Parse The JSON File In Unity 3D C# — Unity 3D Tutorial — Overflow Archives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KLBylzJElw6t7fHR.png" /></figure><p>In this post, we’re going to see how to parse the JSON file in Unity 3D C#. JSON is used to handle data in an easy way, you can parse it in Unity 3D to store and display the data in your Game or Application. It stands for <strong><em>Javascript Object Notation</em></strong>, it’s a lightweight and open standard file format for storing and sharing the data. JSON is often used for data transfer from the server to the client. It can be easy to understand, as it uses human-readable text.</p><p>If you are new to Unity 3D, here is a brief about Unity 3D. <strong>U</strong>nity 3D — is one of the game development engines, using Unity 3D we can create 2D and 3D games. Unity 3D is powered by Unity Technologies. It is a cross-platform game engine.</p><h3>How To Parse | Deserialize the JSON Data in C# — Unity 3D</h3><p>To parse the JSON file in Unity 3D we need to have this following package. <a href="http://cdn.overflowarchives.com/JsonObject_C_sharpe.zip">Download Here</a>. This package Author is Matt Schoen -http://www.defectivestudios.com. Once downloaded the package, add it to your project Asset folder.</p><p>This JSON Object package will help you to deserialize the JSON files in an easy way. Let us consider a sample JSON data as followed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2ccb817ad1b2f5ccab72a081a2e5d76/href">https://medium.com/media/e2ccb817ad1b2f5ccab72a081a2e5d76/href</a></iframe><p>Now create a Model in your C# code for the JSON file, I have used</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c338797a8615fc6dc3bbf35bda70d1e6/href">https://medium.com/media/c338797a8615fc6dc3bbf35bda70d1e6/href</a></iframe><p>Above is the sample Model class for the JSON file, similarly you have to create your own model class as needed. Make sure that all the model classes mentioned as Serializable.</p><p>Read the JSON file and get the JSON string, in Unity 3D there are different data paths are available for file access, they are based on the Operating Systems. Here I’m going to use the <strong>StreamingAssets</strong> path for this example.</p><h3>Load JSON file from the system</h3><p>As mentioned I’m going to access the JSON file from the StreamingAssets folder to make the JSON parsing work on runtime. Then, to load the file, add the following lines in your code and get the JSON string from the file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5b35a2e482c903df378604179cd5c97/href">https://medium.com/media/f5b35a2e482c903df378604179cd5c97/href</a></iframe><p>The JSON string is successfully read as text data, then we have to parse the JSON string to JSON Object of our Model class. To parse the JSON text, use the following line in your code and store it as JSON Object.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8a08968f99576d62090f026f723b0a3/href">https://medium.com/media/b8a08968f99576d62090f026f723b0a3/href</a></iframe><p>The above line will parse the JSON file as JSON Object. Similarly, you can parse any of the JSON file and access them in your codes. Hope this will be useful to you. Happy Coding!</p><p><em>Originally published at </em><a href="https://www.overflowarchives.com/unity/how-to-parse-the-json-file-in-unity-3d-c-sharpe-unity-3d-tutorial/"><em>https://www.overflowarchives.com</em></a><em> on January 11, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa3b502f4094" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to generate Android studio SHA key — Overflow Archives]]></title>
            <link>https://prasanthvel.medium.com/how-to-generate-android-studio-sha-key-overflow-archives-8e482f189853?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e482f189853</guid>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[shakey]]></category>
            <category><![CDATA[android-studio]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Sun, 22 Dec 2019 18:31:00 GMT</pubDate>
            <atom:updated>2022-07-21T06:09:32.460Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to generate Android studio SHA key — Overflow Archives</h3><p>Before we proceed further in how to generate the Android studio SHA key let’s know what is SHA key is,</p><p>SHA stands for Secure Hash Algorithm, it is a cryptography hash function which takes an input and produces a 160 — a bit hash value known as a message digest. It is typically rendered as a hexadecimal number having 40 digits. It was designed by US National security.</p><p><strong>Versions of SHA</strong></p><p>There are two versions of the SHA key available.</p><ul><li>SHA-1–160 bit (5 x 32)</li><li>SHA-2–256 bit (8×32)</li></ul><p>SHA key is a unique key generated for your PC and used for signing. It is mostly used for accessing the Google API in the case of Android application development.</p><p>Also Read: <a href="http://www.overflowarchives.com/android/share-data-across-activities-in-android/">Share data across activities in Android</a></p><p><strong>How to get your SHA key</strong></p><p>There are a few following ways to generate the Android studio SHA key for Android development, by using any one of the ways you can generate your SHA key.</p><p><strong>Using the Terminal/Command prompt</strong></p><p>Open your computer terminal or command prompt and change the directory to the bin folder of Java SDK. In Windows, you can find the folder in <strong><em>C:/Program Files/Java/jdk&lt;version_number&gt;/bin</em></strong></p><p>Now type the following in the command prompt to get your SHA key, to use this method the PC should have JDK installed on it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1d76aece39dfe2d09537f9a75048328/href">https://medium.com/media/b1d76aece39dfe2d09537f9a75048328/href</a></iframe><p>for example,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1a49bc2d434c7f2a31d571f1d61f53a/href">https://medium.com/media/e1a49bc2d434c7f2a31d571f1d61f53a/href</a></iframe><p>if you’re not sure what is your username follow the below to proceed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5dd69653a5126d2aa59a548f74b6f2ef/href">https://medium.com/media/5dd69653a5126d2aa59a548f74b6f2ef/href</a></iframe><p>after this, you will get your key as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/0*T3LHyV1jxgPISL4p.png" /></figure><p><strong>Using Android Studio</strong></p><p>This is the simplest way to generate the SHA key for your Android studio project. One can easily generate and get the SHA key using the following methods.</p><p>Open Android studio and your project, now navigate to the Gradle bar located in the right-side panel. Click on the refresh from the Gradle bar and you will see the list of Gradle files.</p><p>Now click on your project — your project name from the list, and click on tasks. Then click on Android to proceed further. Double click on the signingReport and it will run and display your SHA keys in the Run bar (sometimes in the Gradle console)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/0*qCQggI7JgtnFwC4_.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/0*dyApngvE1qn4ru_n.png" /></figure><p><em>Originally published at </em><a href="https://www.overflowarchives.com/android/how-to-generate-android-sha-key/"><em>https://www.overflowarchives.com</em></a><em> on December 22, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e482f189853" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Share Data Using Intent Across Activities in Android — Overflow Archives]]></title>
            <link>https://prasanthvel.medium.com/share-data-using-intent-across-activities-in-android-overflow-archives-9cae01f55fa?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cae01f55fa</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-intents]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Sun, 15 Dec 2019 15:24:00 GMT</pubDate>
            <atom:updated>2022-07-21T05:18:42.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>Share Data Using Intent Across Activities in Android — Overflow Archives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PLuWNJ5XPuzqWwbZ.png" /></figure><p>In this read, we will see, how to share data using intent across different activities in Android app development. This post will help you to understand how the data is shared between activities inside the Let’s see how the data can be shared across the activities using Intent.</p><p><strong>What is Intent in Android</strong></p><p>The intent is a simple message object that is used for communicating between the Application components, like activity, content providers and broadcasting receivers and services. By using intent, data can be shared between the activities.</p><p>Also Read: <a href="http://www.overflowarchives.com/android/android-searchview-in-actionbar-androidx-and-kotlin/">Android SearchView in ActionBar- Androidx and Kotlin</a></p><p><strong>How to call an Intent</strong></p><p>In Android application development, the intent can be called using the startActivity() method. Using this method the intent is passed as a parameter while calling this we can share the data to the different activities. It supports all types of primitive data types and also it helps to share a data class object too.</p><p><strong>Type of data allowed to share</strong></p><p>The intent allows the application to share any data type from an activity to another activity by using intent.putExtra(Key, value) method.<br>By this way we can share the data to the different components and activities.</p><p>To get the data in activity the intent extra should be getting based on the data type, if the value is a string then intent.getStringExtra(key). Likewise, we can receive the data. If the shared data is parcelable then use getParcelableExtra(key) followed by the data type.</p><p><strong>Methods used in data sharing</strong></p><p>The extras shared in intent can be verified by hasExtra(key). This will return a boolean value. If the extra is attached to the intent the data returned upon using getExtra(), if not null will be returned.</p><p><em>note: whenever getting the data from intent, it is a best practice to check for the availability of the data for the requesting key.</em></p><p>For more information on this please visit the developer’s documentation page for an updated one. That information is available on <strong>Content/Intent</strong>.</p><p><strong>How to send and receive data</strong></p><p>For example please look at the below code for how to send and receive the data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d42500c738a6252aba9a3aadf79d356/href">https://medium.com/media/2d42500c738a6252aba9a3aadf79d356/href</a></iframe><p>Let’s consider we’re sharing a string extra through the intent. Here is how can we receive the data in NextActivity class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96ac3221582a99c03813f463fcc2d80e/href">https://medium.com/media/96ac3221582a99c03813f463fcc2d80e/href</a></iframe><p><strong>Other ways to send data</strong></p><p>Similarly, the data between different activities can be shared using a static variable in the receiver class/activity. In this way, we don’t need the intent to share the extras/bundle with the receiver activity.</p><p>We can assign the data to the static variable before we start the particular activity/class. Also accessing the data in the receiver class is too easy in this way.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c35a394dc7dc2ca11d3073275ea221b/href">https://medium.com/media/8c35a394dc7dc2ca11d3073275ea221b/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b4632dfd5d5ee3c8b0ef447587239c4/href">https://medium.com/media/6b4632dfd5d5ee3c8b0ef447587239c4/href</a></iframe><p><strong>Limitations on sharing data</strong></p><p>However, the intent is allowed to share the data to the activities and components, there are few limitations to it. For example, if we share a large amount of data through it it may result in an application crash.</p><p>As the memory for data sharing in the mobile application is limited sharing large data may arise an issue. So it’s better to use another method of data sharing. Like assigning a static variable. API call and other memory handlers.</p><p><em>Originally published at </em><a href="https://www.overflowarchives.com/android/share-data-across-activities-in-android/"><em>https://www.overflowarchives.com</em></a><em> on December 15, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cae01f55fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android SearchView in ActionBar— Androidx and Kotlin]]></title>
            <link>https://prasanthvel.medium.com/android-searchview-in-actionbar-androidx-and-kotlin-3467ca8e6a14?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3467ca8e6a14</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[searchview]]></category>
            <category><![CDATA[actionmode]]></category>
            <category><![CDATA[androidx]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Thu, 12 Dec 2019 11:32:36 GMT</pubDate>
            <atom:updated>2020-10-29T16:33:48.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*fOxdkuy4GOov-7XLqrTKuA.png" /></figure><p><strong>Android SearchView:</strong></p><p>A widget that provides a user interface for the user to enter a search query and submit a request to a search provider. Shows a list of query suggestions or results, if available, and allows the user to pick a suggestion or result to launch into.</p><p>More at the <a href="https://developer.android.com/reference/android/widget/SearchView">Developer site</a></p><p><strong>Creating the menu:</strong></p><p>In order to inflate the search view in the toolbar first need to create a menu item layout in the xml-&gt; menu.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cd0307b32b7e0f6e55deb5d2a42f89f/href">https://medium.com/media/2cd0307b32b7e0f6e55deb5d2a42f89f/href</a></iframe><p>After creating the menu need to add the activity under <em>onCreateOptionsMenu </em>like below</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/260a59e9dc83c99df566fcda50485d53/href">https://medium.com/media/260a59e9dc83c99df566fcda50485d53/href</a></iframe><pre>onQueryTextSubmit</pre><p>the method used will be called after the user clicks the enter/search after inputting the search query.</p><pre>onQueryTextChange</pre><p>the method used when the change occurs in the query field.</p><p><strong>Handling the Back press:</strong></p><p>While clicking the back button the activity will set to close even the search is opened, to prevent this add the following in your code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75ce8d2718207190fd93e24a916f0c54/href">https://medium.com/media/75ce8d2718207190fd93e24a916f0c54/href</a></iframe><p><strong>Styling the SearchView Elements:</strong></p><p>For customization of the searchview can be done by both XML and in programmatic</p><p>By adding the following style into the app theme searchview can be customized.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe6af3ae51ffaa54c7e606654c57a7f0/href">https://medium.com/media/fe6af3ae51ffaa54c7e606654c57a7f0/href</a></iframe><p>In code use the following to change the color of searchview</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/93c8e87586a56460125a73170334f152/href">https://medium.com/media/93c8e87586a56460125a73170334f152/href</a></iframe><p>The final outcome this will be as followed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*j82j2YpB7GUgSCxilfptpg.gif" /></figure><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3467ca8e6a14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android rapid click prevention using  Handler — Kotlin]]></title>
            <link>https://prasanthvel.medium.com/android-rapid-click-prevention-using-handler-kotlin-5a6e0854061e?source=rss-a668b1afa1b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a6e0854061e</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Velmurugan Perumal]]></dc:creator>
            <pubDate>Thu, 05 Dec 2019 11:19:08 GMT</pubDate>
            <atom:updated>2020-10-30T03:03:45.637Z</atom:updated>
            <content:encoded><![CDATA[<h3>Android rapid click prevention using Handler — Kotlin</h3><p>In this read, we will see how to prevent the rapid click in the android mobile application. Rapid click on the function brings a lot of unexpected/undesired output in the functionality of the application.</p><p>Recently I come through with a problem in an Android project, that the end-user facing multiple entries on his application. To provide a solution to this I went through the events log and noticed the user clicking the button rapidly.</p><p>At some point, we can’t expect the user to use the application with normal actions. They may use the application in the way they like to do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*ELEmbDcOgbRLhhwZvU5Lgw.gif" /><figcaption>Rapid click on the button</figcaption></figure><p>To prevent such problems it is important to handle the touch events in the application in order to prevent any unexpected result in data. Here I got a solution for such an issue by using the Handler.</p><p>The handler is used to schedule messages and to be executed at some point, and to enqueue an action to be performed on a different thread. For more please refer below link</p><blockquote><a href="https://developer.android.com/reference/android/os/Handler">https://developer.android.com/reference/android/os/Handler</a></blockquote><p>Use the following in code where the button event is called</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c2a4987fac9049e2830560604a8c1f9/href">https://medium.com/media/4c2a4987fac9049e2830560604a8c1f9/href</a></iframe><p>After disabling the button it is a better way to notify the user that the button is disabled, so assign alpha to 0.5 to the button so the user will identify the button is disabled.</p><p>In this, I have used 1500 as the time interval (1.5 sec) after this time interval the button will be enabled and alpha set to 1.</p><p>Below is the outcome of this method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*I6CcFVANwhfqmMyqwP_Gsg.gif" /></figure><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a6e0854061e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>