<?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 Sanoop Sashindran on Medium]]></title>
        <description><![CDATA[Stories by Sanoop Sashindran on Medium]]></description>
        <link>https://medium.com/@sanoop.work?source=rss-ea6b90e3871f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*N8nY3_BixCB2FuglPP-gCg.jpeg</url>
            <title>Stories by Sanoop Sashindran on Medium</title>
            <link>https://medium.com/@sanoop.work?source=rss-ea6b90e3871f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 02:43:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanoop.work/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[Single Adapter for any RecyclerView]]></title>
            <link>https://medium.com/finbox/single-adapter-for-any-recyclerview-87ef9739b319?source=rss-ea6b90e3871f------2</link>
            <guid isPermaLink="false">https://medium.com/p/87ef9739b319</guid>
            <category><![CDATA[data-binding]]></category>
            <category><![CDATA[recyclerview]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Sanoop Sashindran]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 12:55:07 GMT</pubDate>
            <atom:updated>2020-02-28T13:36:41.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZrSk9u9AFRMiD7XPfDJRQ.jpeg" /><figcaption>This image has nothing to do with the post. It’s just that this pie looked good !!</figcaption></figure><blockquote>First of all any android app without RecyclerView is not an android app. I’m sorry to say this.</blockquote><p>Since that is out of the way now we can concentrate on what the title is trying to say.</p><p>As android developers, we usually have to deal with a list of data that will show different contents and/or different contents that can have different actions. So for each list, we usually have a different adapter that does the same thing like every other adapter i.e. show the item and perform actions on the item.</p><p>So in one Activity if you have to show 3 different lists. That means you will have to create 3 unique adapter that caters to these lists. What if you could handle any list with just one adapter. That thought sounds cool and made me write this article. I hope you find it useful, any feedback would be a great help.</p><h3>Okay, let’s dive right in!!</h3><p>Before we go ahead you will need to know about <strong>DataBinding</strong> to implement this. Just the basics will be enough to understand this article.</p><p>Let’s note down what we need to create a generic adapter</p><ol><li>Row layout</li><li>List of items</li><li>Event handler (To handle click events from the list)</li></ol><p>Keeping this in mind lets me show you how the generic adapter will look like.</p><p>If we look at the code it looks like just any other RecyclerView Adapter. The only difference is in the <em>layoutId</em> and <em>items. </em>These are the inputs that we need, to inflate any row item.</p><p><em>onCustomClickItemListner</em> is our event handler that will propagate any click events on the list.</p><p>We take a generic list i.e. List&lt;*&gt; as our items array. In Databinding we consider a <strong>Row layout to be mapped to a model</strong>. So any update in the model should change the row attribute by the awesome two way binding feature. So this is how a sample row layout will look like.</p><p>This is a simple row with 2 TextView next to each other. As you can see in the &lt;data&gt; tag we have set 3 variables.</p><p>The first variable is the Model that this row represents. This model object is used to set the text in the TextView.</p><p>The second variable is the ViewHolder that is needed to handle all the events that you have in your row layouts. If I want to handle row item click event I can add this line in the parent layout</p><p><em>android:onClick=”@{(v) -&gt; handler.onCustomClick(v, position)}”</em></p><p>onCustomClick is the function inside the BaseViewHolder that will send the event to the parent activity.</p><p>Third Variable is the position of the list item that is used to let the parent know which item was clicked.</p><p>That’s all you need to set your generic Adapter. This is how you will use it in your activity</p><p>In your onCreate or where you define your view, you can just add the variables that are required by the adapter i.e. <strong>Layout ID </strong>and <strong>Product List</strong></p><p><strong>Handle Events sent from adapter</strong></p><p>With these changes, you can have just one adapter to handle any type of list UI.</p><p>Hope you found this article useful. You can take it to the next level by creating a BindingAdapter that will take the layout and the product list from the XML itself. Which will reduce more code from your activity.</p><p>Thanks for reading. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87ef9739b319" width="1" height="1" alt=""><hr><p><a href="https://medium.com/finbox/single-adapter-for-any-recyclerview-87ef9739b319">Single Adapter for any RecyclerView</a> was originally published in <a href="https://medium.com/finbox">FinBox</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make a fun Chatbot using DialogFlow]]></title>
            <link>https://medium.com/@sanoop.work/how-to-make-a-fun-chatbot-using-dialogflow-ebadb5294380?source=rss-ea6b90e3871f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebadb5294380</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[dialogflow]]></category>
            <category><![CDATA[google-assistant]]></category>
            <dc:creator><![CDATA[Sanoop Sashindran]]></dc:creator>
            <pubDate>Sat, 10 Feb 2018 08:12:14 GMT</pubDate>
            <atom:updated>2018-02-10T08:12:14.779Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vsl5IPpQ6ikOUMfUsBj34A.jpeg" /></figure><p>So the Chatbot thing is quite trending nowadays. Startups and many big companies are using Chatbots, I mean heck there are companies that build Chatbots now for customers. All this AI revolution seems to be mind boggling and seems hard to catch up with. It’s true, I don’t think I can help with that but I am writing this article to let people know the brains behind a bot by giving a full fetched tutorial on how to make a simple conversational bot that will ask your name and age and say whatever you have typed. Obviously you can try any fun exercise, I just ran out of good ideas. :P</p><p><strong>Without wasting any more time let’s dive into it.</strong></p><p>The Chatbot that you are going to make here can be used in your phone just install ‘Google Assistant’ in-case it’s not already on your phone. To get started you need to create an account in ‘DialogFlow’.</p><blockquote><strong>What is DialogFlow?</strong></blockquote><blockquote>DialogFlow is a platform provided by Google that gives users new ways to interact with your product by building engaging voice and text-based conversational interfaces powered by AI.</blockquote><p>The user interface is so friendly that you will get accustomed to it in no time.</p><p>If you don’t already have a Dialogflow account, <a href="https://console.dialogflow.com/api-client/authorize_url_google/nopopup">sign up</a>. If you have an account, <a href="https://console.dialogflow.com/api-client/#/login">login</a>.</p><p>After login you would be directed to the dashboard which will look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f6ee61Okm5okEkMFUVGN9w.png" /></figure><p>There is a very neat documentation on how to use DialogFlow. You can always have a look at it.</p><p>Before we start our DialogFlow journey I would like to point out one thing.</p><p>The only technical knowledge needed is a little bit of NodeJs. Now don’t get startled, when I mean little bit I seriously mean just the very basic. When you understand one you will figure out how to add new features without any problem. I will try to break it down so that even a person who is not very active with programming can make a basic conversational bot without pulling out their hair.</p><blockquote><strong>Enough talking let’s get to it</strong></blockquote><h4><strong>Creating a Agent</strong></h4><p>An Agent is essentially the container or project and it contains certain component that let’s a user communicate and to deliver the responses to your user.</p><p>After opening DialogFlow console you will see a <strong>Create Agent </strong>button.</p><ul><li>Click on <strong>Create Agent</strong> in the left navigation and enter a Agent name.</li><li>Click <strong>Create </strong>button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_G32-k3YxHF9VG_eJ5R0lw.png" /></figure><p>Now that your agent is ready you have to create the components needed. Let’s start with the first component <strong>Intent</strong>.</p><h4><strong>Creating an Intent</strong></h4><p>An Intent maps what a user says with what your agent does. What it means is that for everything you say there needs to be a certain action that needs to be carried out by the Chatbot. The component that handles that is called an <strong>Intent</strong>.</p><p>In our example we are making a Chatbot that tells us ice-breaking quotes</p><p>To create an intent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ao175TDpVbwWuprHoMgzbQ.png" /></figure><ol><li>Click on the plus icon add next to <strong>Intents</strong>. You will notice some default intents are already in your agent. Just leave them be for now.</li><li>Enter a name for your intent. This can be whatever you’d like, but it should be intuitive for what the intent is going to accomplish. In our case it would be ‘conversation’.</li><li>In the <strong>User Says</strong> section, enter examples of what you might expect a user to ask for. Since you are asking the user for his/her name and age. Have few relevant user utterances. The more examples you provide, the more ways a user can ask a question and the agent will understand.</li></ol><p>Enter these examples:</p><ul><li>My name is xyz and I am 23 years old</li><li>My age is 23</li><li>23</li><li>My name is Maggie</li><li>Maggie here</li><li>Maggie</li></ul><p>Now whenever a user types/speaks any of these user utterances our ‘conversation’ intent will be triggered.</p><blockquote>We need to show the user something if the bot is unable to perform certain action. This is basically a fallback that ensures that the bot doesn’t stop working when the user types/says something that was not handled. So under the Responses section add some common fallback messages for the user.</blockquote><blockquote>You need to give a name to the action this name will be used later when we jump into the technical section. Here I have used ‘conversation’.</blockquote><p>Now there are 2 variables <strong>Name </strong>and <strong>Age</strong>. We need to define these variables under the action section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_uWz8FrkExtn_KgxSdSrCA.png" /></figure><p>Since we want the name and age to be mandatory we want to define actions and prompt the user if he/she misses these fields.</p><p>Click on Define Prompts and add what the bot should say if the user skips to enter what is asked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pW9WTS7kZez1oNM9BQRCRQ.png" /></figure><p><strong>Do the same thing for age.</strong></p><p>This completes your setting up of intent. There is a try it now section on the right hand side. If you type any of the user utterance you typed you will get the fallback message that you have given. That is because we haven’t configured your Intent completely. There is one final step remaining. Adding something known as a Fulfillment (Webhook).</p><h4>Basic Fulfillment and Conversation Setup</h4><p>There are two ways of doing this setup. I am going to show the easiest one here as I am hoping that people who are not very involved with coding haven’t left the page yet.</p><p>This is the only technical section in the flow. So what we are doing here is basically write down logic to what the bot should do with the data it has gathered so far. So for each <strong>Intent</strong> you will have a corresponding function that will construct a message that the bot will tell the user.</p><p>To explain with example for our case here.</p><p><em>Bot: What is your name?</em></p><p><em>User: Arnold here</em></p><p><em>Bot: What is your age?</em></p><p><em>User: 23</em></p><p>So here when the user give 2 inputs we need someone to make sense of this information and return result to the user. We can add any logic here based on your requirements. In my example I am just printing back the value in a sentence back.</p><p>When you open the Fulfillment page you need to do following changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_0YInPjQVvYVxHDqBaT9w.png" /></figure><p>Select the inline editor. It will have lots of default code. You don’t need to worry about that. Just delete all and use the code I have provided below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2071708ed377288de0aacfa66e818bf/href">https://medium.com/media/c2071708ed377288de0aacfa66e818bf/href</a></iframe><p>I have added comments for each use case. It is pretty easy to understand. Use the above code and deploy your project.</p><p>Once the project is deployed there is one final change that needs to be done. You need to enable Fulfillment in your intent.</p><p>Go to your ‘conversation’ Intent. At the bottom you will find Fulfillment section. This tells Dialogflow to call your fulfillment to generate a response to the user instead of using Dialogflow’s response feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*clmA3ifFwUwFHxWT.png" /></figure><p>Once your Intent is hooked. We need to make one final change.</p><p>Go to the Intent section and you will see a default intent. This is the first thing that is called when we talk to our bot. We need to add a custom message pertaining to what kinda information is relevant to the bot. Change the ‘Text Response’ section to something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KcRTKl6CYUEmcUBqqHGuYw.png" /></figure><p>Now this will be the first message that the bot will speak when we trigger it.</p><h3><strong>That’s it!! It’s Done</strong></h3><p>Now all you need to do is start testing on a google assistant simulator.</p><p>Go to the <strong>Integrations </strong>section in the console and click on google assistant. Add the intent that you have written and click on ‘Manage Assistant App’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hzq-CuIv5rd0HJVX3QQ-2A.png" /></figure><p>This will open actions on google console where you can test your Chatbot in simulator. Accept the policies and click the simulator. The first time you run you will get a message to activate something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xEM-CBEkD60PMmeWBbozsg.png" /></figure><p>It is asking to activate certain features needed for the project to work. Go ahead and turn on Voice &amp; Audio Activity, Web &amp; App Activity (and check the box for Chrome browsing history), and Device Information permissions for your Google Account.</p><p>Once that is done just type ’Talk to my test app’ in the chat window and you will see your app live. You can even test it on your device.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebadb5294380" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Want to find out how to write validations like a lazy person?]]></title>
            <link>https://medium.com/@sanoop.work/want-to-find-out-how-to-write-validations-like-a-lazy-person-2fcef5774432?source=rss-ea6b90e3871f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fcef5774432</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[data-binding]]></category>
            <category><![CDATA[validation]]></category>
            <dc:creator><![CDATA[Sanoop Sashindran]]></dc:creator>
            <pubDate>Sat, 09 Dec 2017 19:48:17 GMT</pubDate>
            <atom:updated>2017-12-10T04:58:11.641Z</atom:updated>
            <content:encoded><![CDATA[<p>From the title I think you know me a little bit that I am “LAZY”. Getting stuff done with little effort as long as it works is what drives the laziness in me.</p><blockquote>I am writing this blog post to encourage people to be lazy and make world a better place. :)</blockquote><p>Please check out the basic concepts of DataBinding before reading the article as it would make more sense then.</p><p>SO LETS GET STARTED!!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1uQg9WE9JLuX6%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1uQg9WE9JLuX6%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F1uQg9WE9JLuX6%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="181" frameborder="0" scrolling="no"><a href="https://medium.com/media/f42c5361bbc4f271f7c53e9365d69c95/href">https://medium.com/media/f42c5361bbc4f271f7c53e9365d69c95/href</a></iframe><p>Every Android Developer finds adding validations to a Form a tiresome (kill me already) process. This usually involves checking if any field is empty and adding a message which is specific to the empty field. This may sound like a easy task, but imagine doing the same thing for a large form.</p><p>Repeating similar pattern of code is usually done by copy pasting and then renaming(Not a big fan of), even if you managed to do that without any mistakes imagine how many lines of code your files is gonna end up having. So when I saw my colleagues struggling with this task I was just surfing the net and found a very handy library that was doing just what I wanted.</p><p>Major credit in writing this article goes to <strong><em>Ilhasoft </em></strong>for making such a handy tool. Here is her github link.</p><p><a href="https://github.com/Ilhasoft/data-binding-validator">Ilhasoft/data-binding-validator</a></p><blockquote>I have modified the library files to add validations on new View components. You can find the link at the bottom.</blockquote><p>This library makes the entire validation logic reside in the XML file itself without increasing the size of activity/fragment file. The library was majorly written to handle validations for TextInputLayout and works perfectly for this scenario. But in my application I had a very complex form and there were elements other than a simple TextInputLayout.</p><p>Here are the steps by which you an add validations to any custom view, here I will give examples of how to add validations to Spinner, RadioGroup and Seekbar. The same can be done to any view just add logic accordingly ;).</p><p><strong>Adding validations to Spinner</strong></p><p>First add <strong><em>Ilhasoft databinding library </em></strong>to your project then navigate to</p><pre>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library">library</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src">src</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main">main</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java">java</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java/br">br</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java/br/com">com</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java/br/com/ilhasoft">ilhasoft</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java/br/com/ilhasoft/support">support</a>/<a href="https://github.com/Ilhasoft/data-binding-validator/tree/master/library/src/main/java/br/com/ilhasoft/support/validation">validation</a>/binding/</pre><p>and create a class called <strong>BindingUtils.java</strong></p><p>All our binding adapter for different custom views will reside in this class. If you are new to binding adapter please refer to <a href="https://developer.android.com/reference/android/databinding/BindingAdapter.html">Binding Adapter</a>.</p><p>In your binding utils add the name of XML attributes that you will be using to trigger validations. As done below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/315947fd545b5b86507f1edbec6112ef/href">https://medium.com/media/315947fd545b5b86507f1edbec6112ef/href</a></iframe><p><strong>validateSelected: </strong>This attribute will point to the TextView that will display the error message below the spinner</p><p><strong>validateSelectedMessage: </strong>This attribute will display respective error message when validation error occurs</p><p><strong>validateSpinnerAutoDismiss: </strong>This attribute will cause the error message to disappear when we change value of spinner.</p><p>That’s it. Once we get all the required variables in our binding adapter all we need to do is make the `textview` with the error message visible when it fails a set of rules that need to satisfy the validation.</p><blockquote><em>We will get back to what we wrote inside the binding adapter later lets see some other classes first.</em></blockquote><p>In order to do this we need two classes. One class to handle the error message and another class to define the rule for the validation. Let’s start with how to handle the error message if the defined rule fails.</p><p>Create a class called <strong>SpinnerHandler:</strong></p><p>There will be 3 main functions in any view handler.</p><ol><li>Remove error</li><li>Set error message</li><li>Write logic to disable error message on performing certain action of the view.</li></ol><p>The class that I wrote was as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de91e074920c128fa82eab69da4dfd5b/href">https://medium.com/media/de91e074920c128fa82eab69da4dfd5b/href</a></iframe><p>The functions written are pretty straight forward. The class is written to interact with the UI, if the validation rules are not met then <em>setError </em>function is called with the textview and the error message as parameters. If the rules are successfully validated then the TextView is hidden from the UI.</p><p>Now let’s move to the main class where we define the rules that need to be followed.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oKIPrFjHhxtcnEi5i%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oKIPrFjHhxtcnEi5i%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oKIPrFjHhxtcnEi5i%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="277" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4b226dd843c1b51dee8de11178b2c5d/href">https://medium.com/media/b4b226dd843c1b51dee8de11178b2c5d/href</a></iframe><p>Create a class called <strong>SpinnerSelectedRule:</strong></p><p>The class will extend a base Rule class which has 3 main functions:</p><ol><li>To add main rule logic — <em>isValid</em></li><li>Callback when rule validation is met — <em>onValidationSucceeded</em></li><li>Callback when rule validation is failed — <em>onValidationFailed</em></li></ol><p>Below is how we will go about adding a custom validation rule.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4af37c4d39f68787f23ebeee7b57b79/href">https://medium.com/media/c4af37c4d39f68787f23ebeee7b57b79/href</a></iframe><p>As you can see the class extends a Base <strong><em>Rule</em></strong><em> </em>class<strong> </strong>which needs the Error label view and the view where you are adding validation in this case the Spinner.</p><p>It needs these two arguments to let the error handler decide what should be shown to the UI.</p><p>The function <em>isValid </em>is the main brains of this class. This is where the validation rule is defined. If the user input does not match the rule then a error will be thrown.</p><p><strong><em>Pretty neat right !!?</em></strong></p><p>Now let us jump back to what was written inside the binding adapter in the first part. The following line might seem to be confusing:</p><pre>String handledErrorMessage = ErrorMessageHelper.<em>getStringOrDefault</em>(errorLabel, errorMessage, R.string.<em>error_message_empty_validation</em>);</pre><pre>ViewTagHelper.<em>appendValue</em>(R.id.<em>validator_rule</em>, view, <strong>new </strong>SpinnerSelectedRule(view, errorLabel, handledErrorMessage));</pre><p>Here <em>handleErrorMessage </em>is used to return the error message that was provided or a sample error message is shown if custom error message is not provided.</p><p><em>ViewTagHelper </em>is used to set a tag to the list of Views that are passed to it.</p><p>This is how you would go about using the validation for any spinner item</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/907418ca8f9d5ffab52af92b96a02c10/href">https://medium.com/media/907418ca8f9d5ffab52af92b96a02c10/href</a></iframe><p>And that’s it. You have successfully created a custom view validation for Spinner using DataBinding Validator library.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FBi6FcO7UoutWM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FBi6FcO7UoutWM%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FBi6FcO7UoutWM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e1cdfdbc672965d1bfe38654329775d/href">https://medium.com/media/3e1cdfdbc672965d1bfe38654329775d/href</a></iframe><p>You can add similar validation to RadioGroup all you need to do is tweak the rule a bit.</p><p>You can refer the github link for reference. But I would urge you to give it a try first. :)</p><p><a href="https://github.com/sanoopsandy/validator-library">sanoopsandy/validator-library</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fcef5774432" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>