<?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 Aravinth Velusamy on Medium]]></title>
        <description><![CDATA[Stories by Aravinth Velusamy on Medium]]></description>
        <link>https://medium.com/@kv_aravinth?source=rss-c5570b5234c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w2jLXEoqeBWtGpey3i8fvA.jpeg</url>
            <title>Stories by Aravinth Velusamy on Medium</title>
            <link>https://medium.com/@kv_aravinth?source=rss-c5570b5234c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 14:07:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kv_aravinth/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[Bottom navigation Bar in Flutter using GetX]]></title>
            <link>https://medium.com/criar-solutions/bottom-navigation-bar-in-flutter-using-getx-e88da21bc126?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e88da21bc126</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[bottomnavigationview]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Mon, 03 May 2021 04:50:14 GMT</pubDate>
            <atom:updated>2021-05-03T04:50:14.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m-OjfJYdV8-XH7NRjr8Hwg.png" /></figure><p>In this blog, I’ll walk you through the steps of creating bottom navigation bar in Flutter using <a href="https://pub.dev/packages/get">GetX</a>.</p><p>I’ll be <a href="https://pub.dev/packages/get">GetX </a>for state management in this tutorial.</p><h4>Step 1 : Project setup</h4><p>Create a New Flutter project. Add the latest version of <a href="https://pub.dev/packages/get">Get </a>in pubspec.yaml file and run flutter pub get</p><h4>Step 2 : Creating the Controller</h4><p>Create your business logic class and place the tabIndex variable inside it. the tabIndex variable is made observable by using a simple .obs. Whenever the value of tabIndex the IndexedStackwidget gets rebuilt. Inside the controller, we got a function to update the value of tabIndex. This function will be passed to the onTapof BottomNavigationBar. So whenever, an item is tapped, this changeTabIndex(int index) will be called.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef75023df6ce87af8e61b7546a092a06/href">https://medium.com/media/ef75023df6ce87af8e61b7546a092a06/href</a></iframe><h4>Step 3 : Creating the Widget</h4><p>Delete the MyApp class if it is present. I’m using LandingPage class as my home widget. Add the following class to the main.dart file</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35643ca477661a883e5ad86898d20a9f/href">https://medium.com/media/35643ca477661a883e5ad86898d20a9f/href</a></iframe><p>Create a Stateless widget and make it as the home page of your app. In the build method, return a SafeArea widget with Scaffold as the child widget.</p><p>Pass the BottomNavigationBar to the Scaffold widget. In the above code sample, I’m adding 4 bottom navigation bar items to the bottom navigation bar. Each item has an icon, text label &amp; a background color. We can customize the bottom navigation bar showUnselectedLabels, showSelectedLabels,<br>backgroundColor, unselectedItemColor, selectedItemColor, unselectedLabelStyle, selectedLabelStyle. The currentIndex value should be 0. 0 here indicates the first widget in the IndexedStackwidget. onTap takes a function as value &amp; this gets called every time an item is tapped. When the tabIndex value changes in the controller, the IndexedStack gets rebuilt every time. We wrapped the IndexedStack widget inside Obx builder, this takes of observing the tabIndex in the controller and rebuilding the stack.</p><p>Below is the working video of the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cn3j1MPxScGaSXwBJipRKw.gif" /><figcaption>Bottom navigation working video</figcaption></figure><p>Thanks for giving a read, That’s it for now! Feels like learnt something interesting ? Share with your friends too. Stay tuned to be notified about my new articles, Follow me on <a href="https://medium.com/@kv_aravinth">Medium</a> &amp; <a href="https://twitter.com/aravinth_kv">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e88da21bc126" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/bottom-navigation-bar-in-flutter-using-getx-e88da21bc126">Bottom navigation Bar in Flutter using GetX</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Displaying Multiple Fragments in a Single Activity — Android]]></title>
            <link>https://medium.com/criar-solutions/displaying-multiple-fragments-in-a-single-activity-android-789774baaefc?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/789774baaefc</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[fragments]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[activity]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Mon, 06 Jul 2020 12:52:17 GMT</pubDate>
            <atom:updated>2020-07-06T12:52:17.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eC3yk8ttCiYvYf51R4Gw5Q.jpeg" /><figcaption>Displaying Multiple Fragments in a Single Activity — Android</figcaption></figure><h3>Displaying Multiple Fragments in a Single Activity — Android</h3><p><a href="https://developer.android.com/guide/components/fragments">Fragments </a>represent a small portion of the screen in an Activity. We can use one to multiple fragments in a single activity. Based on the app requirements, we might use fragments in our app or we might not use and cover the most of the screens using <a href="https://developer.android.com/guide/components/activities">Activity </a>classes. Fragments are now widely used in Android apps after adopting <a href="https://developer.android.com/guide/navigation">Navigation components</a>. When we use a <a href="https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView">bottom navigation menu</a> in our app, each fragment represents a single screen. In this blog, I’m gonna walk you through the steps on How to display multiple fragments in a Single Activity.</p><h4>Step 1 — Create a base activity</h4><p>The first step is to create a base activity which is gonna host the fragments which we need to display. In Android Studio, Right click on main source set folder, click on <strong>New -&gt; Activity -&gt; Empty Activity. </strong>Now you have created the base activity.</p><h4>Step 2 — Edit the activity layout file</h4><p>After creating the activity, we need to edit the xml file. In this blog, I’ll show How to display 2 fragments in the activity. When a fragment is part of the activity, it lives in a <a href="https://developer.android.com/reference/android/view/ViewGroup">ViewGroup</a> inside the activity&#39;s view hierarchy and the fragment defines its own view layout.</p><pre>&lt;FrameLayout<br>    android:id=&quot;@+id/fragment_one&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    tools:layout=&quot;@layout/fragment_search_club&quot; /&gt;<br><br>&lt;FrameLayout<br>    android:id=&quot;@+id/fragment_two&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    tools:layout=&quot;@layout/fragment_search_news&quot; /&gt;</pre><p>In this example, I’m displaying the fragments inside a <a href="https://developer.android.com/reference/android/widget/FrameLayout">FrameLayout</a>.</p><h4>Step 3 — Create Fragments</h4><p>As we’re gonna display 2 fragments, create 2 fragments in your app. Each fragment will have its own layout file, add content to the fragment layout. You can display a simple <a href="https://developer.android.com/reference/android/widget/TextView">TextView </a>for now to keep it simple.</p><h4>Step 4 — Add fragment transaction codes</h4><p>In your activity code, inside the <a href="https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)"><strong>onCreate </strong></a>method after the <strong>setContentView </strong>line, add the following lines</p><pre>val fm: FragmentManager = <em>supportFragmentManager<br></em>fm.beginTransaction().replace(R.id.<em>fragment_one</em>, searchClubFragment).commit()<br>fm.beginTransaction().replace(R.id.<em>fragment_two</em>, searchNewsFragment).commit()</pre><p>We’re getting the <a href="https://developer.android.com/reference/kotlin/androidx/fragment/app/FragmentManager"><strong><em>supportFragmentManager </em></strong></a>using property value syntax.<em> </em>FragmentManager is used to create transactions for adding, removing or replacing fragments. Next, we’re starting a transaction to add the 2 fragments. We’re replacing the Framelayout with the fragments. Now build and run the app, we will see the 2 fragments in the activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZlQhyeJI69J0aDjJd8_Sw.png" /><figcaption>Search screen using 2 fragments in a single activity</figcaption></figure><p>I used the same implementation in one of my project to develop the above displayed screen. The above screen consist of an <a href="https://developer.android.com/reference/android/widget/EditText"><strong>editText </strong></a>which is inside <strong>Activity’s </strong><a href="https://developer.android.com/reference/android/widget/Toolbar"><strong>Toolbar</strong></a>. Two fragments in linear vertical orientation. I use a <strong>shared </strong><a href="https://developer.android.com/topic/libraries/architecture/viewmodel"><strong>viewModel </strong></a>for communicating between the Activity and the Fragments.</p><p>Thanks for giving a read, That’s it for now! Feels like learnt something interesting ? Share with your friends too. Stay tuned to be notified about my new articles, Follow me on <a href="https://medium.com/@kv_aravinth">Medium</a> &amp; <a href="https://twitter.com/aravinth_kv">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=789774baaefc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/displaying-multiple-fragments-in-a-single-activity-android-789774baaefc">Displaying Multiple Fragments in a Single Activity — Android</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending App Feedbacks directly to Slack Channel]]></title>
            <link>https://medium.com/criar-solutions/sending-app-feedbacks-directly-to-slack-channel-73c55711361f?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/73c55711361f</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[retrofit]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Wed, 06 May 2020 12:06:24 GMT</pubDate>
            <atom:updated>2020-06-28T16:59:05.036Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0O7oYCVL66JGAkR-IKZZg.png" /></figure><p>Feedbacks are more important for any product because it helps us make the product better by hearing customer needs. Last week I had to build a feedback feature into an existing project which I’m working. After getting this task, I went to GitHub searched feedback libraries. Most of the libraries were email based, I integrated a library. After integrating the library, I found that to submit a feedback, the user had to navigate to the Mail app (from the mail app, the user has to send the feedback to developer’s email). The time taken to submit a feedback using this method is not user friendly, so I came up with another plan to replace mail with Slack webhooks.</p><p>My requirement was simple, when the user click the ‘Send feedback’ button, the dialog should show up, the user has to enter their feedback and when ‘Send’ button is clicked, the feedback should come straight to Slack channel.</p><p>In this blog, I’ll be explaining How to integrate slack channel and your android app.</p><h4>Step: 1 — Setup Incoming webhook URL for your slack app</h4><p>Follow the link to the setup Incoming webhooks URL for your slack app. We’re going to send the feedback from the app to slack channel via this webhook URL.</p><p><a href="https://slack.com/intl/en-in/help/articles/115005265063-Incoming-webhooks-for-Slack">Incoming webhooks for Slack</a></p><h4>Step: 2 — Test the webhook URL in postman</h4><p>After generating the webhook URL for your app, the next step is to test if it’s working. You can use postman to test this URL. Refer the below image. I’m sending a JSON data in the request body. The feedback should be the value to the key “text”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*Nf5zYa2LLWJi-8aeBIWDoQ.png" /><figcaption>Postman</figcaption></figure><h4>Step: 3 — Android Integration</h4><h4><strong>Set-up Feedback dialog</strong></h4><pre>val view: View = <em>layoutInflater</em>.inflate(R.layout.<em>fragment_feedback</em>, null)<br>MaterialAlertDialogBuilder(<em>context</em>)<br>        .setView(view)<br>        .setTitle(&quot;Compose feedback&quot;)<br>        .setNegativeButton(&quot;CANCEL&quot;) <strong>{ </strong>dialog, _ <strong>-&gt;<br>           </strong>dialog.dismiss()<br>        <strong>}<br>        </strong>.setPositiveButton(&quot;SEND&quot;) <strong>{ </strong>dialog, _ <strong>-&gt;<br>            </strong>hideKeyboard()<br>            dialog.dismiss()<br>            val editText = view.findViewById&lt;TextInputEditText&gt;(R.id.<em>edit_text_feedback</em>)<br>            val feedback = editText.<em>text</em>.<em>toString</em>()<br>            val slackBody = SlackBody(feedback)<br>            val parser =  JsonParser();<br>            val json =  parser.parse(Gson().toJson(slackBody)) as JsonObject<br>            sendFeedbackToSlack(json)<br>        <strong>}<br>        </strong>.show()</pre><h4><strong>XML</strong></h4><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;layout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;<br>    xmlns:tools=&quot;http://schemas.android.com/tools&quot;&gt;<br><br>    &lt;data&gt;<br><br>    &lt;/data&gt;<br><br>    &lt;androidx.constraintlayout.widget.ConstraintLayout<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        tools:context=&quot;.ui.feedback.FeedbackFragment&quot;&gt;<br><br>        &lt;com.google.android.material.textfield.TextInputEditText<br>            android:id=&quot;@+id/edit_text_feedback&quot;<br>            android:layout_width=&quot;match_parent&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            android:hint=&quot;e.g. I found a bug in News section&quot;<br>            app:layout_constraintEnd_toEndOf=&quot;parent&quot;<br>            app:layout_constraintTop_toTopOf=&quot;parent&quot;<br>            app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>            android:layout_marginTop=&quot;16dp&quot;<br>            android:layout_marginStart=&quot;16dp&quot;<br>            android:layout_marginEnd=&quot;16dp&quot;/&gt;<br><br><br>    &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;<br>&lt;/layout&gt;</pre><h4><strong>Sending feedback to slack channel</strong></h4><pre>private fun sendFeedbackToSlack(json: JsonObject) {<br>    if (AppStatus.getInstance(<em>context</em>).<em>isOnline</em>) {<br>        viewModel.uploadFeedback(json).observe(<em>viewLifecycleOwner</em>, <em>Observer </em><strong>{<br>            </strong>when (<strong>it</strong>.status) {<br>                Status.SUCCESS -&gt; {<br>                    if (<strong>it</strong>.data == &quot;ok&quot;) {<br>                        displaySnackBar(&quot;Feedback sent successfully&quot;)<br>                    }<br>                }<br>                Status.ERROR -&gt; {<br>                    displaySnackBar(&quot;Error sending feedback&quot;)<br>                }<br>                Status.LOADING -&gt; {<br><br>                }<br>            }<br>        <strong>}</strong>)<br>    } else {<br>        displaySnackBar(&quot;Not connected to network&quot;)<br>    }<br>}</pre><h4><strong>Repository Code</strong></h4><p><strong>I’m using Retrofit library</strong></p><pre>fun uploadFeedback(body: JsonObject): LiveData&lt;Resource&lt;String&gt;&gt; {<br><br>    return object : NetworkBoundResource&lt;String, String&gt;(appExecutors) {<br>        var result = &quot;&quot;<br>        override fun saveCallResult(item: String) {<br>            Timber.d(item)<br>            result = item<br>        }<br><br>        override fun shouldFetch(data: String?): Boolean {<br>            return true<br>        }<br><br>        override fun loadFromDb(): LiveData&lt;String&gt; {<br>            return object : LiveData&lt;String&gt;() {<br>                override fun onActive() {<br>                    super.onActive()<br>                    <em>value </em>= result<br>                }<br>            }<br>        }<br><br>        override fun createCall(): LiveData&lt;ApiResponse&lt;String&gt;&gt; {<br>            return apiInterface.uploadFeedback(&quot;application/json&quot;,body)<br>        }<br><br>        override fun onFetchFailed(message: String) {<br>            Timber.d(message)<br>            super.onFetchFailed(message)<br>        }<br>    }.asLiveData()<br>}</pre><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*5YRod3JDbNxtkGGJIDmONA.png" /><figcaption>Feedback Dialog</figcaption></figure><h4>Receiving feedback in slack channel</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V8QUC5_deLWT5GBx_SOyIA.jpeg" /><figcaption>Android + Slack</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*sEXVVOgn_-Jfn2jvRcMEGg.png" /><figcaption>Slack</figcaption></figure><p>That’s all! Feels like learnt something interesting ? Share with your friends too. Stay tuned to be notified about my new articles, Follow me on <a href="https://medium.com/@kv_aravinth">Medium</a> &amp; <a href="https://twitter.com/aravinth_kv">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73c55711361f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/sending-app-feedbacks-directly-to-slack-channel-73c55711361f">Sending App Feedbacks directly to Slack Channel</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Form Validation in Android Made Easy]]></title>
            <link>https://medium.com/criar-solutions/form-validation-in-android-made-easy-cc4162e19ded?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc4162e19ded</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[forms]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Thu, 16 Apr 2020 14:36:32 GMT</pubDate>
            <atom:updated>2020-06-28T17:10:41.484Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85YFfieQVm6sys48zjgdNw.jpeg" /></figure><p>If you’re Android Developer and you wrote a large number of lines to validate your forms, then this blog is for you. In this blog, I’ll be explaining How I reduced the form validation codes in an App I’m working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*o0_9Y5en5Zc4OJd8A1YBQw.png" /><figcaption>Add Product Form</figcaption></figure><p>In my previous app, there were forms, but the number of fields will be less than 3 so I was using a long if-else to validate the form. Now I’m working on a shopping app and there is a module where the shop owner has to add a new product and the form will be having more than 6–10 fields. To finish the module quickly, I would’ve used my old codes and made it as long as possible (which will be inefficient), instead I planned to go with another way which will have less no. Of codes compared to previous. My first choice was to explore Github and pick a form validation library, after exploring it, I again found that implementing any library too will be consuming large no. Of codes. And finally I decided to write my own code.</p><h4>Solution</h4><p>In my previous app I was using lengthy if-else, I don’t want to use and planned to go with for-loop through which I will iterate over the editText list and validate each field.</p><h4>Step 1 — Create EditText, Input Layout and Error Message List</h4><pre>// EditText List<br>textInputEditTextList.addAll(<br>    <em>listOf</em>(<br>        dataBinding.editTextProductName,<br>        dataBinding.editTextSku,<br>        dataBinding.editTextSellingPrice,<br>        dataBinding.editTextActualPrice,<br>        dataBinding.editTextDeliveryCharge,<br>        dataBinding.editTextDiscountPrice,<br>        dataBinding.editTextTax<br>    )<br>)</pre><pre>// InputLayoutList<br>textInputLayoutList.addAll(<br>    <em>listOf</em>(<br>        dataBinding.inputLayoutProductName,<br>        dataBinding.inputLayoutSku,<br>        dataBinding.inputLayoutSellingPrice,<br>        dataBinding.inputLayoutActualPrice,<br>        dataBinding.inputLayoutDeliveryCharge,<br>        dataBinding.inputLayoutDiscountPrice,<br>        dataBinding.inputLayoutTax<br>    )<br>)</pre><pre>// Error Msg for all fields<br>errorMsgList.addAll(<br>    <em>listOf</em>(<br>        &quot;Product name cannot be empty&quot;,<br>        &quot;Product SKU code cannot be empty&quot;,<br>        &quot;Product selling price cannot be empty&quot;,<br>        &quot;Product actual price cannot be empty&quot;,<br>        &quot;Product delivery charge cannot be empty&quot;,<br>        &quot;Product discount price cannot be empty&quot;,<br>        &quot;Product tax amount cannot be empty&quot;<br>    )<br>)</pre><p>I’m creating a list for editText, inputLayout and errorMessage so that I can iterate over them to validate. <strong>If you’re implementing this method try creating a Data class with properties — editText, inputLayout and errorMessage. You can create a list of this data class and instantiate it with your views.</strong></p><h4><strong>Step 2 — Validate</strong></h4><p>Next step is to validate. On clicking the submit button, we should invoke a function which does the validation.</p><pre>textInputEditTextList.<em>forEachIndexed </em><strong>{ </strong>i, obj <strong>-&gt;<br>    </strong>if (textInputEditTextList[i].<em>text</em>.<em>isNullOrEmpty</em>()) {<br>            textInputLayoutList[i].<em>error </em>= errorMsgList[i]<br>            isFormFilled = false<br>    } else {<br>        textInputLayoutList[i].<em>isErrorEnabled </em>= false<br>    }<br><strong>}</strong></pre><p>This is the form validation code, what I’m doing is iterating over the editText list and checking if it’s empty. <strong>If the editText is empty, I’m setting error on the corresponding textInputLayout. If the editText is not empty, I’m setting the isErrorEnabled property of textInputLayout to false, so this helps to remove the error on the inputLayout if there is any error.</strong></p><p>That’s all! Feels like learnt something interesting? Share with your friends too. Stay tuned to be notified about my new articles, follow me on <a href="https://medium.com/@kv_aravinth">Medium</a> &amp; <a href="https://twitter.com/aravinth_kv">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc4162e19ded" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/form-validation-in-android-made-easy-cc4162e19ded">Form Validation in Android Made Easy</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things to keep in mind when working for a client]]></title>
            <link>https://medium.com/criar-solutions/things-to-keep-in-mind-when-working-for-a-client-3fe3bd3788b7?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fe3bd3788b7</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[client-relationship]]></category>
            <category><![CDATA[android-developers]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 06:01:00 GMT</pubDate>
            <atom:updated>2020-03-23T06:01:00.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPhc1jLZ0Xf9dKfXm2zR6Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@corinnekutz?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Corinne Kutz</a> on <a href="https://unsplash.com/collections/1030651/work?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I’m an Android Developer working in a Startup Company. We are a service and product based company. Recently I worked on a service project and It was my first service project, after completing the project I came up with a checklist which are kind of essential things to keep in mind when starting the project. I’ll be sharing those things on this blog, If you’re a fresh software developer then this blog is for you.</p><p>In our company, We normally do 2 types of works. Servicing and in house Product development. Recently we took a servicing project. Its a shopping app and we were handling the Android app. After completing the project, I came up with a checklist which every software developer should have when starting a service project with a client.</p><h4><strong>Checklist</strong></h4><ol><li>Gather exact requirements</li><li>Plan ETA</li><li>Mention Availability</li><li>Work Smarter</li><li>Track work hours</li><li>Time management b/w projects.</li></ol><h4>1. Gather exact requirements</h4><p>The first thing we all do before starting the actual work is to gather requirements. Prepare a questionnaire and have a meeting with your client. You need to clear all your doubts and try to grasp what your client needs. Once you’re done start proceeding with workflow or else if you got any doubts, again have a meeting with your client and clear all your doubts and start the work. In my case, my client used to periodically update the works to have done and we used to have a phone call. My client created a Google sheet and updated all the tasks in that sheet. Using Google sheets was one mode of communication, whenever the clients need to assign a task, he/she will update it on the sheet and I too will look into it and update the task status. This made us work seamlessly.</p><p>I use <a href="https://todoist.com/app">Todoist </a>and Google sheets for maintaining task list.</p><h4>2. Plan ETA</h4><p>After getting the task list from the client, the next part is to plan the entire work flow. Get the complete task list for the project and plot a timeline. I made this mistake, I didn’t completely get the entire task list for the project and my client wasn’t clear about the tasks. Get the task list, analyze it and give your ETA to your client.</p><h4>3. Mention Availability</h4><p>When you work on your own project, we don’t have to follow a time slot, you can work whenever you want, but when it comes to working for a client, you should clearly mention your availability slot. In my case, the client I was working for was working all Saturdays, but I don’t work all Saturdays I only work on even Saturdays. I failed to mention this to my client. One Saturday I wasn’t working, but I didn’t mention this with the client. The client started pinging me, so no other go I just finished the task what the client was requesting. You should mandatory mention this prior to starting the work to avoid any clash b/w you and your client.</p><h4>4. Work Smarter</h4><p>Some works may be repetitive, which requires code re-usability. You might want a code snippet to be reused from your previous project so identify where you need to reuse the codes and work smarter. When I did this client project, I identified which modules required codes to be reused and I used codes from my previous projects. This made me to complete the tasks faster. So keep your old codes handy.</p><p>As a developer, we all must be using Git for version control management. The situation when I found using Git was mandatory is, I used to work only in my office computer and I rarely work at home. One day when I was at home, suddenly the client assigned me a task, in this case I had to keep the code in Git, I simply pulled off the code from Git and started working on my home computer.</p><h4>5. Track Work hours</h4><p>Use <a href="https://toggl.com/"><strong>toggl </strong></a>to track the man hours spent on a particular project. You might be billing your client based on No. Of man hours spent on the project, in this case tracking man hours will be helpful to calculate the charges. Not only for this purpose, but also it’ll be useful for self evaluation purpose.</p><h4>6. Time management b/w projects</h4><p>Time management is one of the key skills to do different projects at the same time. Few developers might be working on multiple projects and few might be working on only 1 project. For those who’re all working on multiple projects, learn to manage your time between your projects. You have to prioritize the works and block your time for the tasks. I kinda failed to manage time while doing multiple projects, what I did was I stopped spending time on my company project and concentrated only on client projects. I see this as a mistake and I’ll correct it. Don’t make this mistake guys, learn to manage your time.</p><p>These are all the essentials I learnt while doing a client project, If I had missed any other essential things kindly share it in the comment.</p><p>That’s it for now, stay tuned to be notified about my new articles, follow me on <a href="https://medium.com/@kv_aravinth">Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fe3bd3788b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/things-to-keep-in-mind-when-working-for-a-client-3fe3bd3788b7">Things to keep in mind when working for a client</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[1 line of code which cost me a day]]></title>
            <link>https://medium.com/criar-solutions/1-line-of-code-which-cost-me-a-day-aa5d65115dff?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa5d65115dff</guid>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[bug-fixes]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Tue, 05 Nov 2019 20:33:23 GMT</pubDate>
            <atom:updated>2019-11-05T20:33:23.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*qQDMiVfyAB6FZNR_Gsuvsw.png" /></figure><p>Bugs are mainly due to programming errors and sometimes we may easily figure out the root cause and fix it immediately, sometimes it takes days to figure it out. I’m developing an app and there was a bug in my app too, which took my entire day to figure out.</p><h4>What was the Bug?</h4><p>I’m developing a <a href="https://play.google.com/store/apps/details?id=com.soccersouls.ffo&amp;hl=en">Football News App</a> and there is a feature called <em>Community. </em>It’s like a mini social media community for the in-app users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*7979NdMVmOgN3VywieOTUQ.jpeg" /></figure><p>Users can post Images, Text, Polls and YouTube videos and other users can like, comment on the posts. While testing the Image Upload feature I found an issue. The issue was whenever I tried uploading Image from the Camera folder, the upload operation was failing. When something doesn’t work as expected, we developers used to inspect the logs and try to figure out the root cause. After inspecting the logs, I found that the error was not because of android part.</p><p>I tried the same upload operation in the postman and few images were uploaded as expected and few images weren’t. This made me confirm that the error must be on the server side. On comparing the different images used for upload operation, the images which uploaded were less than 2MB of size and images which failed to upload were greater than 2MB.</p><h4>Solution</h4><p>When a bug arises, we google the issue, go to stack overflow and try out the answers for our issue. I googled and found the cause. To upload the larger file, one needs to change/increase the value of both <strong>post_max_size </strong>and <strong>upload_max_filesize </strong>directives from the php.ini file.</p><p>upload_max_filesize = 200M post_max_size = 201M</p><p>This will increase upload limits on a single file to 200 MB, from the default of 2 MB.</p><p>Finally, I fixed the bug and now it’s working as expected.</p><p><strong>If you like this article, 👏 and share this article with your friends.</strong></p><p><strong>Let’s get connected on Twitter </strong><a href="https://twitter.com/aravinth_kv"><strong>Aravinth Velusamy</strong></a></p><p><strong>Do read my other articles too in medium — </strong><a href="https://medium.com/@kv_aravinth"><strong>Aravinth Velusamy</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa5d65115dff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/1-line-of-code-which-cost-me-a-day-aa5d65115dff">1 line of code which cost me a day</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finally, Profited after consecutive losses]]></title>
            <link>https://medium.com/criar-solutions/finally-profited-after-consecutive-losses-1c0f6522bd90?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c0f6522bd90</guid>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[crude-oil]]></category>
            <category><![CDATA[futures-trading]]></category>
            <category><![CDATA[commodities]]></category>
            <category><![CDATA[market]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Fri, 11 Oct 2019 09:45:43 GMT</pubDate>
            <atom:updated>2019-10-11T09:45:43.489Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey friends, I’m Android Developer and also a Stock trader (trading <a href="https://www.mcxindia.com/products/energy/crude-oil-mini">CRUDEOILM </a>in <a href="https://www.mcxindia.com/">MCX</a>). I started trading in the month of March 2019 and learning a lot through the process. In the blog, I’ll be discussing about my previous losses and my yesterday’s (04/10/2019) profit.</p><h4>Previous Losses</h4><blockquote>Losing is the stepping stone to becoming a profitable trader</blockquote><p>During the initial phase, its common losing the trades. The losses are because of various factors like Psychology, Risk Management, etc., I lost more than 5K until last month. Last month was the most crucial month after losing because I lost 3K in a single month. After losing 1.5K in a single day, I paused the trading for a few days and started analyzing the previous trades. I found that my losses were mainly due to psychology (FOMO -Fear of missing out). After figuring this out, I remained patient</p><h4><strong>Yesterday’s Entry point</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFOkMgtQKLnsqy-tRsl9aA.png" /></figure><p>If you look into the chart, <strong>100 EMA</strong> was acting as resistance on <strong>01/10/2019 06:45 PM</strong> and I took this as my trading strategy and was looking for an opportunity to short because I expected the <strong>100 EMA</strong> will again act as a resistance to the price. As I expected the price started falling down from <strong>100 EMA</strong> and I entered the market at <strong>03/10/2019 01:45 PM (3rd candle from the arrow mark).</strong></p><h4><strong>Position</strong></h4><p>Sell @ 3760<br>Stop loss — 3775<br>Target — 3738</p><p>I <strong>shorted </strong>CRUDEOILM at <strong>3760 </strong>and <strong>Stoploss </strong>was <strong>3775</strong> and <strong>Target </strong>was <strong>3738</strong>. Risk Reward ratio is 1.45. <strong><em>I risked 17% of my capital for a 20 %reward. My total capital was 1K.</em></strong> My Risk Management is poor because I risked 17% of the total capital. Most traders don’t risk more than 2% of the capital. At 4:00 PM my target order was executed and finally <strong>₹200 profit was booked.</strong></p><p>I’ll share about my losses in the next article. Stay tuned.</p><p>If you like this article, do give 👏👏👏, Comment on it and share with your friends.</p><p>Also, to be notified about my new articles, follow me on <a href="https://medium.com/@kv_aravinth">Medium</a>.</p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c0f6522bd90" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/finally-profited-after-consecutive-losses-1c0f6522bd90">Finally, Profited after consecutive losses</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Font Awesome in Android [Tutorial]]]></title>
            <link>https://medium.com/criar-solutions/using-font-awesome-in-android-tutorial-105df7bae43c?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/105df7bae43c</guid>
            <category><![CDATA[fonts]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[font-awesome]]></category>
            <category><![CDATA[android-textview]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Thu, 06 Jun 2019 18:06:24 GMT</pubDate>
            <atom:updated>2019-06-06T18:06:24.456Z</atom:updated>
            <content:encoded><![CDATA[<h4>Tutorial explaining How to use <a href="https://fontawesome.com/">Font Awesome</a> in Android</h4><h4><strong>Downloading and Installation</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*QV74vSC4c1mvv6LYKO5BaQ.png" /><figcaption>Download Page — Font Awesome</figcaption></figure><ol><li>Click <a href="https://fontawesome.com/download">here</a> to go to the download page</li><li>Click the Free for Desktop button to start the download.</li><li>Extract the zip file and install the <a href="https://en.wikipedia.org/wiki/OpenType">otf</a> files found in the otfs folder.</li><li>Now copy the font (Font Awesome 5 Free-Regular-400) to the font <a href="https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml">folder in android</a></li></ol><h4>Let’s make some Magic</h4><pre>&lt;TextView<br>    android:id=&quot;@+id/font_awesome&quot;<br>    android:layout_width=&quot;wrap_content&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    android:text=&quot;Hello World! &amp;#xf118;&quot;<br>    android:textSize=&quot;26sp&quot;<br>    app:layout_constraintBottom_toBottomOf=&quot;parent&quot;<br>    android:fontFamily=&quot;@font/font_awesome&quot;<br>    app:layout_constraintEnd_toEndOf=&quot;parent&quot;<br>    app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>    app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;</pre><ol><li>Add the Font Family to the TextView <strong>(line 8)</strong></li><li>Add the text with hex code for the desired symbol <strong>(line 5)</strong></li></ol><p>Note the line 5 —<strong> android:text=“Hello World! &amp;#xf118;”</strong> Here we’re adding the hex code for the font to display the Smile. The Hex Code for <a href="https://fontawesome.com/icons/smile?style=regular"><strong>Smile </strong></a>is <strong>&amp;#xf118;</strong> as mentioned in the <a href="https://fontawesome.com/v4.7.0/cheatsheet/">cheat sheet</a>. Build and Run the Project to see the result.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*_SzhuINT7Vh-0qxOIOrasQ.jpeg" /><figcaption>Font Awesome Smile Result</figcaption></figure><p>Hope you learned how to use Font Awesome in Android TextView and If you like this article, do give 👏👏👏, Comment on it and share with your friends.</p><p>Also, to be notified about my new articles, follow me on <a href="https://medium.com/@kv_aravinth">Medium</a>.</p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=105df7bae43c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/using-font-awesome-in-android-tutorial-105df7bae43c">Using Font Awesome in Android [Tutorial]</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How did I get into Trading]]></title>
            <link>https://medium.com/criar-solutions/how-did-i-get-into-trading-155620639381?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/155620639381</guid>
            <category><![CDATA[crude-oil]]></category>
            <category><![CDATA[income]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[money]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 08:25:00 GMT</pubDate>
            <atom:updated>2019-06-04T08:25:00.804Z</atom:updated>
            <content:encoded><![CDATA[<p>I had an attraction towards share market and I used to watch the Equity market and mainly I was focused on Companies like Tesla, Facebook, Apple, Snapchat etc., I used to discuss with my friends about the market movements during college days.</p><h4>Sources of Income</h4><p>My New Year Resolutions consist of multiple Goals and One of the Goal is to have multiple streams of income (<a href="https://www.investopedia.com/terms/e/earnedincome.asp">Earned income</a> and <a href="https://www.investopedia.com/terms/n/netincome.asp">Profit Income</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*qDROtOu_F8qCj2bePcj2lA.jpeg" /><figcaption>Image Credits — <a href="https://www.instagram.com/millionaire_mentor/">https://www.instagram.com/millionaire_mentor/</a></figcaption></figure><p>I graduated from college in April 2019 and I joined a <a href="https://en.wikipedia.org/wiki/Startup_company">Startup Company</a> (<a href="http://www.criarsolutions.in/">Criar Solutions</a>) as a Full-time Android Developer, money earned from this full-time job comes under earned income and In addition to that I too opened a <a href="https://www.investopedia.com/investing/commodities-trading-overview/">commodity trading</a> account in <a href="https://www.aliceblueonline.com/">Alice Blue</a> to start trading, money earned from this full-time job comes under profit income.</p><h4>Reason for Commodity Trading</h4><p>The <a href="https://www.quora.com/What-is-margin-trading">margin </a>requirement for Equity trading was high when compared to Commodity Trading. The account opening fee for commodity was ₹200 and for equity it was ₹300 so I preferred to trade commodities. One of my friend was trading <a href="https://www.mcxindia.com/products/metals/zinc-mini">Zinc Mini Futures</a> and He convinced me to join Zinc trading but as I didn’t have enough margin requirement (₹1300) , I decided to trade <a href="https://in.investing.com/commodities/crude-oil?cid=49774">Crude Oil Mini Futures</a>.</p><h4>First Trade</h4><p>Finally I started my 1st trade on 26 April 2019. The day was a downtrend for Crude Oil and I played against the rules and booked a loss of ₹580. It was nervous when placing the order and at the end of the day I learnt a lot and still learning. I’m an Intraday trader and I don’t carry forward my positions and My targets are small ₹50/day.</p><p><strong>If you like this article, do give 👏👏👏, Comment on it and share with your friends.</strong></p><p><strong>Let’s get connected on Twitter </strong><a href="https://twitter.com/aravinth_kv"><strong>Aravinth Velusamy</strong></a></p><p><strong>Also, to be notified about my new articles, follow me on — </strong><a href="https://medium.com/@kv_aravinth"><strong>Aravinth Velusamy</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=155620639381" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/how-did-i-get-into-trading-155620639381">How did I get into Trading</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rounded Corner ImageView in Android [Tutorial]]]></title>
            <link>https://medium.com/criar-solutions/rounded-corner-imageview-in-android-tutorial-1df3c28016cd?source=rss-c5570b5234c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1df3c28016cd</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[cardview-and-recyclerview]]></category>
            <category><![CDATA[imageview]]></category>
            <dc:creator><![CDATA[Aravinth Velusamy]]></dc:creator>
            <pubDate>Tue, 28 May 2019 13:00:46 GMT</pubDate>
            <atom:updated>2019-05-28T13:00:46.421Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re developing a football news app and currently revamping the UI. The Main feature of the app is to display news and I used RecyclerView to display the News feed.</p><h4>News Item View</h4><p>The below display item view consist of five elements and of course image is the major visual representation of the news and this image gets the user’s attention first. To make the image look good, We decided to apply the rounded corner effect to the image view. We want them to be rounded slightly by 2dp. Continue to see the Implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*MnTic5odwbICDXCqyA9YcQ.jpeg" /><figcaption>News Item View</figcaption></figure><h4>How to do it?</h4><p>When the round corner is the requirement, the only view that popped out of my mind was card view. It has inbuilt property of <strong>cardCornerRadius </strong>so I just wrapped the ImageView inside a card view and set the <strong>scaleType </strong>to <strong>centerCrop </strong>and finally<strong> </strong>I got an ImageView with rounded corners.</p><pre>&lt;com.google.android.material.card.MaterialCardView<br>    android:id=&quot;@+id/image_card&quot;<br>    android:layout_width=&quot;100dp&quot;<br>    android:layout_height=&quot;100dp&quot;<br>    android:layout_marginTop=&quot;12dp&quot;<br>    android:layout_marginStart=&quot;16dp&quot;<br>    android:layout_marginBottom=&quot;12dp&quot;<br>    android:visibility=&quot;visible&quot;<br>    app:cardCornerRadius=&quot;2dp&quot;<br>    app:layout_constraintBottom_toBottomOf=&quot;parent&quot;<br>    app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>    app:layout_constraintTop_toTopOf=&quot;parent&quot;&gt;<br><br>    &lt;ImageView<br>        android:id=&quot;@+id/news_image&quot;<br>        android:layout_width=&quot;match_parent&quot;<br>        android:layout_height=&quot;match_parent&quot;<br>        android:scaleType=&quot;centerCrop&quot;<br>        app:layout_constraintBottom_toBottomOf=&quot;parent&quot;<br>        app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>        app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;<br>&lt;/com.google.android.material.card.MaterialCardView&gt;</pre><p>That’s it for now. I hope you got to know about applying Rounded corner effect to image views. If you like this article, do give 👏👏👏, Comment on it and share with your friends.</p><p>Also, to be notified about my new articles, follow me on <a href="https://medium.com/@kv_aravinth">Medium</a>.</p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1df3c28016cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/criar-solutions/rounded-corner-imageview-in-android-tutorial-1df3c28016cd">Rounded Corner ImageView in Android [Tutorial]</a> was originally published in <a href="https://medium.com/criar-solutions">Criar Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>