<?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 Hemant Patel on Medium]]></title>
        <description><![CDATA[Stories by Hemant Patel on Medium]]></description>
        <link>https://medium.com/@hemant-patel?source=rss-365e04368b68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*N8ClXHnpHGkgSyQpJR5m_w.png</url>
            <title>Stories by Hemant Patel on Medium</title>
            <link>https://medium.com/@hemant-patel?source=rss-365e04368b68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:59:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hemant-patel/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[Learn to make a Paint Application by using this PaintView library for Android]]></title>
            <link>https://hemant-patel.medium.com/learn-to-make-a-paint-application-by-using-this-paintview-library-for-android-e29d4c6244f4?source=rss-365e04368b68------2</link>
            <guid isPermaLink="false">https://medium.com/p/e29d4c6244f4</guid>
            <category><![CDATA[android-libraries]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[drawing]]></category>
            <category><![CDATA[canvas]]></category>
            <dc:creator><![CDATA[Hemant Patel]]></dc:creator>
            <pubDate>Fri, 19 Mar 2021 10:38:53 GMT</pubDate>
            <atom:updated>2021-03-19T10:41:15.663Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!</p><p>if you want to make an application or required Drawing in your project then this the best place for you.</p><p>today we will learn how to implement <a href="https://github.com/GURUDATTDAHARE/PaintView/">PaintView</a> in your app.</p><p>I found an amazing library for it which is PaintView. We should say thanks to <a href="https://github.com/GURUDATTDAHARE">GURUDATT DAHARE</a> for making this library for us.</p><p>So this is the Official link for Github Libary Repository: <a href="https://github.com/GURUDATTDAHARE/PaintView/">Click here</a></p><h3>How to implement :</h3><h3>Step 1: Add it to your root build.gradle at the end of repositories</h3><pre>allprojects {<br>		repositories {<br>			...<br>			maven { url &#39;https://jitpack.io&#39; }<br>		}<br>	}</pre><h3>Step 2: Add dependencies</h3><pre>dependencies {<br>          implementation &#39;com.github.GURUDATTDAHARE:PaintView:&lt;<a href="https://github.com/GURUDATTDAHARE/PaintView/releases/">latest version</a>&gt;&#39;<br>  }</pre><h3>Step 3: Add PaintView tag in your .xml file where you want drawing</h3><pre>&lt;com.gurudattdahare.paint.PaintView<br>     android:id=&quot;@+id/paintview&quot;<br>     android:layout_width=&quot;match_parent&quot;<br>     android:layout_height=&quot;match_parent&quot;&gt; <br>        &lt;/com.gurudattdahare.paint.PaintView&gt;</pre><h3>Step 4 (optional): implement OnEventListener</h3><p>if you want to do some extra things when buttons are clicked then you need to implement OnEventListener.</p><pre>mPaintView.setEvantListenar(new OnEventsListener() {<br>         @Override<br>         public void OnRedClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;red is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnBlueClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;blue is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnYellowClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;yellow is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnGreenClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;green is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnBlackClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;black is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnBrownClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;brown is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnEraserClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;eraser is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnClearClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;clear screen is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnBrushSizeClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;brush size button is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }<br><br>         @Override<br>         public void OnUndoClicked() {<br>             Toast.makeText(getApplicationContext(),&quot;undo button is clicked.&quot;,Toast.LENGTH_SHORT).show();<br>         }</pre><h3>This is the final output :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/0*k8wb3ZSxW57b82_b" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/0*3naB9Lr0TaoK98w9" /></figure><p>I hope you like this implementation. please share this with your friends and don’t forget to follow me for useful content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*hBJoH7b6GVkcD6gg.png" /></figure><h3>Hemant Patel</h3><p>Android App Developer | UI Designer | Competitive Programmer</p><p><a href="https://github.com/Hemu43362">Github</a> | <a href="https://www.linkedin.com/in/hemant-patel-android-app-developer/">Linkedin</a> | <a href="https://hemant-patel.medium.com/">Medium</a> | <a href="https://stackoverflow.com/users/14763057/hemant-patel">StackOverflow</a> | <a href="https://auth.geeksforgeeks.org/user/hemu4462/profile">GeeksforGeeks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e29d4c6244f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate a Random Color on Button Click — Android Studio]]></title>
            <link>https://hemant-patel.medium.com/generate-a-random-color-on-button-click-android-studio-7f4e23e2879f?source=rss-365e04368b68------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f4e23e2879f</guid>
            <category><![CDATA[random]]></category>
            <category><![CDATA[colour-generator]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Hemant Patel]]></dc:creator>
            <pubDate>Fri, 12 Mar 2021 14:33:21 GMT</pubDate>
            <atom:updated>2021-03-14T15:06:52.296Z</atom:updated>
            <content:encoded><![CDATA[<h3>Generate a Random Color on Button Click — Android Studio</h3><p>Sometimes we need to generate random colors every time in our project.it is very easy but tricky.</p><p>we know there are lots of types of color codes. one of them RGB where the value of each color (Red, Green, Blue ) should be 0–255.</p><p>we generate a number between 0 to 255 for each color (RGB) by using the Random() function and create a color object using these numbers which are different every time.</p><p><strong>Step by Step Implementation :</strong></p><p><strong>Step 1: Create a New Project</strong></p><p>To create a new project in Android Studio please refer to <a href="https://www.geeksforgeeks.org/android-how-to-create-start-a-new-project-in-android-studio/">How to Create/Start a New Project in Android Studio</a>. Note that select Java as the programming language.</p><p><strong>Step 2: Working with the activity_main.xml file</strong></p><p>Go to the activity_main.xml file and refer to the following code.</p><p><strong>activity_main.xml</strong></p><p>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;&lt;android.support.constraint.ConstraintLayout xmlns:android=”http://schemas.android.com/apk/res/android&quot; xmlns:app=”http://schemas.android.com/apk/res-auto&quot; xmlns:tools=”http://schemas.android.com/tools&quot; android:id=”@+id/layout” android:layout_width=”match_parent” android:layout_height=”match_parent” tools:context=”.MainActivity”&gt;</p><p>&lt;Button android:id=”@+id/button” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”generate random color” app:layout_constraintBottom_toBottomOf=”parent” app:layout_constraintLeft_toLeftOf=”parent” app:layout_constraintRight_toRightOf=”parent” app:layout_constraintTop_toTopOf=”parent” /&gt;</p><p>&lt;/android.support.constraint.ConstraintLayout&gt;</p><p><strong>Step 3: Working with the MainActivity.java file</strong></p><p>Go to the MainActivity.java file and refer to the following code.</p><p><strong>MainActivity.java</strong></p><p>package com.hemant.patel;</p><p>import android.graphics.Color;<br>import android.support.constraint.ConstraintLayout;<br>import android.support.v7.app.AppCompatActivity;<br>import android.os.Bundle;<br>import android.view.View;<br>import android.widget.Button;</p><p>import java.util.Random;</p><p>public class MainActivity extends AppCompatActivity {<br> private ConstraintLayout layout;<br> private Button button;</p><p><a href="http://twitter.com/Override">@Override</a><br> protected void onCreate(Bundle savedInstanceState) {<br> super.onCreate(savedInstanceState);<br> setContentView(R.layout.activity_main);</p><p>layout = findViewById(R.id.layout);<br> button = findViewById(R.id.button);</p><p>button.setOnClickListener(new View.OnClickListener() {<br> <a href="http://twitter.com/Override">@Override</a><br> public void onClick(View v) {<br> Random random = new Random();</p><p>int color = Color.argb(255, random.nextInt(256), random.nextInt(256), random.nextInt(256));</p><p>layout.setBackgroundColor(color);<br> }<br> });<br> }<br>}</p><p><strong>Output :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*Xw-XTBmyPSXos0gNL9-qoA.gif" /></figure><p>You can <a href="https://github.com/Hemu43362/Random-color-generator-app">DOWNLOAD</a> all source codes of this implementation.</p><p>I hope you like this implementation. please share this with your friends and don’t forget to follow me for useful content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*wSB4eZqFUwmDAk2YKc1JFQ.png" /></figure><h3>Hemant Patel</h3><p>Android App Developer | UI Designer | Competitive Programmer</p><p><a href="https://github.com/Hemu43362">Github</a> | <a href="https://www.linkedin.com/in/hemant-patel-android-app-developer/">Linkedin</a> | <a href="https://hemant-patel.medium.com/">Medium</a> | <a href="https://stackoverflow.com/users/14763057/hemant-patel">StackOverflow</a> | <a href="https://auth.geeksforgeeks.org/user/hemu4462/profile">GeeksforGeeks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f4e23e2879f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to implement Splash Screen Activity in Android Studio Using JAVA]]></title>
            <link>https://hemant-patel.medium.com/how-to-implement-splash-screen-activity-in-android-studio-using-java-463d53b7d143?source=rss-365e04368b68------2</link>
            <guid isPermaLink="false">https://medium.com/p/463d53b7d143</guid>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[splash-screen]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Hemant Patel]]></dc:creator>
            <pubDate>Thu, 11 Mar 2021 14:01:57 GMT</pubDate>
            <atom:updated>2022-04-19T10:57:31.644Z</atom:updated>
            <content:encoded><![CDATA[<p>Android Splash Screen is the first screen visible to the user when the application’s launched. The splash screen is one of the most vital screens in the application since it’s the user’s first experience with the application.</p><p>Splash screens are used to display some animations (typically of the application logo) and illustrations while some data for the next screens are fetched</p><h3><strong>Step 1: Create New Project</strong></h3><p>Click on the Create New Project button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*uKzmvCnUnaczc4cSv-3B3A.png" /></figure><h3><strong>Step 2: Choose empty Activity</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pa16uu-14iaKIJxxAe-9pQ.png" /></figure><h3><strong>Step 3: Write App Name and Choose Language.</strong></h3><p>write your app name whatever you want. in this implementation, I am writing “Splash Screen Demo”. choose the JAVA language in the language section.</p><p>after that click the Finish button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGJqz0sjLiKZfTelTJnzEw.png" /></figure><h3><strong>Step 4: Add new Activity for Splash Screen.</strong></h3><p>Right-click on App then follow this<em> New → Activity → Empty Activity</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SZZQMh4uSBLn-B8Kqm9nOA.png" /></figure><h3><strong>Step 5: Write the name of Splash Screen Activity.</strong></h3><p>you can write whatever, It is fully on you. after that click on the Finish button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmGQ5a7M_rBCaZ18fqRsJg.png" /></figure><h3><strong>Step 6: Make Splash Screen Activity as Launcher Activity.</strong></h3><p>By default Main Activity is Launcher Activity. It means When we launch our app then Main Activity opens first. But we want that splash screen activity to show first.</p><p>For making this we will change some lines of code in the AndroidManifext.xml file. like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*LAhy9qtKp12MpmZAjhOa3A.png" /></figure><h3><strong>Code :</strong></h3><pre>&lt;activity android:name=&quot;.SplashScreenActivity&quot;&gt;<br>    &lt;intent-filter&gt;<br>        &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;<br><br>        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;<br>    &lt;/intent-filter&gt;<br>&lt;/activity&gt;</pre><h3><strong>Step 7: Write Logic in SplashScreenActivity.java</strong></h3><p>we want that when we launch our splash screen, It shows for 4 Sec after that redirect to our Main Activity. it is possible by using Runnable Handler Methods. It triggers after wanted Sec (in here 4 sec ).</p><p>you can read all official documentation of <a href="https://developer.android.com/reference/android/os/Handler"><strong>Handler</strong></a><strong> </strong>and <a href="https://developer.android.com/reference/java/lang/Runnable#:~:text=A%20task%20that%20can%20be,of%20no%20arguments%20called%20run%20."><strong>Runnable</strong></a><strong> </strong>for more knowledge.</p><p>we are using Intent for go main activity from the splash screen activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*WU7D7K4ZoTcTpNgNOst6Vw.png" /></figure><h3><strong>Code:</strong></h3><pre>Handler mHandler;<br><em>Runnable </em>mRunnable;<br><br>@Override<br>protected void onCreate(Bundle <em>savedInstanceState</em>) {<br>    <em>super</em>.onCreate(<em>savedInstanceState</em>);<br>    setContentView(R.layout.<em>activity_splash_screen</em>);<br><br>    mHandler = new Handler();<br>    mRunnable = new <em>Runnable</em>() {<br>        @Override<br>        public void run() {<br>            Intent intent = new Intent(SplashScreenActivity.<em>this</em>,MainActivity.class);<br>            startActivity(intent);<br>            finish();<br>        }<br>    };<br><br>    <em>// its trigger runnable after 4000 millisecond.<br>    </em>mHandler.postDelayed(mRunnable,4000);<br><br>}</pre><h3><strong>Final Output :</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*RaLj0bgxoqNv-1klY_9Lww.gif" /></figure><p>I hope you like this implementation. please share this with your friends and don’t forget to follow me for useful content.</p><p>You can <a href="https://github.com/Hemu43362/Splash-Screen-Demo">DOWNLOAD</a> all source codes of this implementation.</p><h3><strong>You can connect with me :</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N8ClXHnpHGkgSyQpJR5m_w.png" /></figure><h3>Hemant Patel</h3><p>Android App Developer | UI Designer | Competitive Programmer</p><p><a href="https://github.com/Hemu43362">Github</a> | <a href="https://www.linkedin.com/in/hemant-patel-android-app-developer/">Linkedin</a> | <a href="https://hemant-patel.medium.com/">Medium</a> | <a href="https://stackoverflow.com/users/14763057/hemant-patel">StackOverflow</a> | <a href="https://auth.geeksforgeeks.org/user/hemu4462/profile">GeeksforGeeks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=463d53b7d143" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>