<?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 Logesh Palani on Medium]]></title>
        <description><![CDATA[Stories by Logesh Palani on Medium]]></description>
        <link>https://medium.com/@logeshpalani98?source=rss-8039d43b860a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*5Do99bymRPsuOsQy7Sh4Zw.jpeg</url>
            <title>Stories by Logesh Palani on Medium</title>
            <link>https://medium.com/@logeshpalani98?source=rss-8039d43b860a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:09:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@logeshpalani98/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[Xamarin iOS PayUMoney Payment Integration]]></title>
            <link>https://medium.com/@logeshpalani98/xamarin-ios-payumoney-payment-integration-d130f859a268?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d130f859a268</guid>
            <category><![CDATA[xamarin-ios]]></category>
            <category><![CDATA[xamarinpayumoney]]></category>
            <category><![CDATA[payumoney]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Tue, 21 Jul 2020 08:58:44 GMT</pubDate>
            <atom:updated>2020-07-21T08:58:44.591Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>This article we are going to see, how to implement PayUMoney payment integration in Xamarin iOS. Before we start, I’ll do this payment gateway through WebView, I’ve tried to bind native library to Xamarin iOS Library, but my bad luck, it was a failure, so I have moved into WebView.</p><p><strong>Prerequisites</strong></p><ul><li>Visual Studio or Visual Studio for Mac</li><li>PayUMoney Production or Test Key and Salt</li></ul><p><strong>Let’s Start</strong></p><p>Create a new Xamarin iOS project in Visual Studio, for this sample I used Visual Studio for Mac. For that, Open Visual Studio for Mac and click New, in the left plane select App under iOS section and then click Create. In the new dialog window, give the project name, solution name, and location, then click Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*l1CKceUiuUFIqRcp.png" /><figcaption>New Xamarin iOS Project</figcaption></figure><p>Open ViewController.cs file and create new UIWebView inside ViewDidLoad method and set the WebView frame equal to base view frame size, implement the IWebViewDelegate interface and override the ShouldLoad method and set this interface the WebView we already created.</p><p>Create NSMutableUrlRequest class and set request method as POST and set Header type as “application/json”</p><p>GetPostString method used for append all parameters as given below and set this returned string into the body of NSMutableUrlRequest class.</p><p>GetHash method used to convert the string into SHA512 format. And full source code is given below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ba18c257a56f35e17fa302a5b289936/href">https://medium.com/media/1ba18c257a56f35e17fa302a5b289936/href</a></iframe><p>Run the application and get the output like the below video.</p><p><strong>Conclusion</strong></p><p>If, you any issue to getKey and Salt, just command below. This demo inspired by <a href="https://twitter.com/Anbu_Mani27">@anbumani27</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/113/0*Y16f5gw0kE3ey4yk.jpg" /></figure><p><strong>Logesh Palani</strong><br> I’m .Net Developer and my choice are mine. Profession is Xamarin Dev and passion are blogger. I’m always thinking about, how to done things in short and smart way</p><p><em>Originally published at </em><a href="https://logeshpalani.blogspot.com/2020/07/xxamarin-ios-payumoney-payment.html"><em>https://logeshpalani.blogspot.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d130f859a268" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin.Android — Gesture Detector]]></title>
            <link>https://medium.com/@logeshpalani98/xamarin-android-gesture-detector-a4cc1c07008f?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4cc1c07008f</guid>
            <category><![CDATA[xamarin-development]]></category>
            <category><![CDATA[gesture-recognition]]></category>
            <category><![CDATA[gestures]]></category>
            <category><![CDATA[xamarin-android]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Sat, 16 May 2020 18:53:49 GMT</pubDate>
            <atom:updated>2020-05-16T18:56:22.555Z</atom:updated>
            <content:encoded><![CDATA[<h3>Xamarin.Android — Gesture Detector</h3><h3>Introduction</h3><p>The gesture detector means finger movement in the touchscreen interface. The gesture types are Tab, Drag, Flick, Swipe, Double Tab, Pinch, Three Finger Pinch, Three Finger Swipe , Touch, Hold, Rotate and Shake. In this article, we are going to learn how to implement these gestures in our application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*H5Y7-6MtW2IChH6DyxyMEA.gif" /></figure><h3>Let’s start the story</h3><p>Create a Xamarin Android project in Visual Studio 201.Go to the Visual Studio &gt;&gt; Create new project &gt;&gt; select Android App (Xamarin) and click Next. In the Next dialog box, give Project Name, Location Name and Location, then click the Create button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*AvjOmW_w9Oz10rK5ua3MDA.png" /></figure><p>After the project creation, open content_main.xml file and add TextView widget in the UI and set width and height as match_parent. The code is given below.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;RelativeLayout 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;<br>                android:layout_width=&quot;match_parent&quot;<br>                android:layout_height=&quot;match_parent&quot;<br>                tools:showIn=&quot;@layout/activity_main&quot;&gt;<br><br>             &lt;TextView<br>                android:id=&quot;@+id/imageView&quot;<br>                android:layout_width=&quot;match_parent&quot;<br>                android:text=&quot;Gesture&quot;<br>                android:textSize=&quot;35dp&quot;<br>                android:gravity=&quot;center&quot;<br>                android:layout_centerInParent=&quot;true&quot;<br>                android:textColor=&quot;@android:color/black&quot;<br>                android:layout_height=&quot;match_parent&quot;/&gt;<br><br>&lt;/RelativeLayout&gt;</pre><p>Next, open MainActivity.cs class by double-clicking it. The gesture interfaces are going to implement in this MainActivity.This interface will create following gesture methods:</p><ul><li>OnDown</li><li>OnScroll</li><li>OnSingleTabUp</li><li>OnLongPress</li><li>OnFling</li><li>OnShowPress</li></ul><p>Methods with definitions here:</p><ul><li><strong><em>OnDown(MotionEvent e)</em> </strong>— Down MotionEvent will get triggers, once touch or tab the UI.</li><li><strong><em>OnFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)</em></strong><em> </em>— Notifies of swipe occurs in the start and end of MotionEvent or threshold of swipe.</li><li><strong><em>OnLongPress(MotionEvent e)</em></strong><em> </em>— This event will trigger, once long touch or tab of UI</li><li><strong><em>OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)</em></strong> — while scrolling this event will get trigger.</li><li><strong><em>OnShowPress(MotionEvent e)</em></strong> — performed a done MotionEvent and not above performed a moment.</li><li><strong><em>OnSingleTabTabUp(MotionEvent e) </em></strong>— On single tab the widget or layout this event.</li></ul><p>Based on the Fling start and end velocity, we can set the following swipe directions:</p><ol><li>Top to Bottom</li><li>Bottom to Top</li><li>Right to Left</li><li>Left to Right</li></ol><p>Velocity has two types</p><ol><li>Swipe threshold — the difference between the initial position and final position of touch in the any four directions, we already seen before.</li><li>Velocity threshold — how quickly swiped gesture.</li></ol><p>Finally set this interface to that TextView, we already designed in content_main.xml and this page code is give below.</p><pre>using System;<br>using Android.App;<br>using Android.OS;<br>using Android.Runtime;<br>using Android.Support.Design.Widget;<br>using Android.Support.V7.App;<br>using Android.Views;<br>using Android.Widget;<br>using static Android.Views.GestureDetector;<br>using static Android.Views.View;<br><br>namespace TVS_Demo<br>{<br>    [Activity(Theme = &quot;@style/AppTheme.NoActionBar&quot;, MainLauncher = true, ScreenOrientation = Android.Content.PM.ScreenOrientation.Portrait)]<br>    public class MainActivity : AppCompatActivity, IOnTouchListener, IOnGestureListener<br>    {<br>        private TextView txtGestureView;<br>        private readonly int SWIPE_MIN_DISTANCE = 120;<br>        private static int SWIPE_MAX_OFF_PATH = 250;<br>        private static int SWIPE_THRESHOLD_VELOCITY = 200;<br><br>        private int imageIndex = 0;<br><br>        private GestureDetector gestureDetector;<br><br>        protected override void OnCreate(Bundle savedInstanceState)<br>        {<br>            base.OnCreate(savedInstanceState);<br>            Xamarin.Essentials.Platform.Init(this, savedInstanceState);<br>            SetContentView(Resource.Layout.activity_main);<br><br>            txtGestureView = FindViewById&lt;TextView&gt;(Resource.Id.imageView);<br><br>            gestureDetector = new GestureDetector(this);<br><br>            txtGestureView.SetOnTouchListener(this);<br><br>        }<br><br>        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)<br>        {<br>            Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);<br><br>            base.OnRequestPermissionsResult(requestCode, permissions, grantResults);<br>        }<br><br>        public bool OnTouch(View v, MotionEvent e)<br>        {<br>            Toast.MakeText(this, &quot;On Touch&quot;, ToastLength.Short).Show();<br><br>            return gestureDetector.OnTouchEvent(e);<br>        }<br><br>        public bool OnDown(MotionEvent e)<br>        {<br>            Toast.MakeText(this, &quot;On Down&quot;, ToastLength.Short).Show();<br><br>            return true;<br>        }<br><br>        public bool OnFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)<br>        {<br>            bool result = false;<br><br>            try<br>            {<br>                float diffY = e2.GetY() - e1.GetY();<br><br>                float diffX = e2.GetX() - e1.GetX();<br><br>                if (Math.Abs(diffX) &gt; Math.Abs(diffY))<br>                {<br>                    if (Math.Abs(diffX) &gt; SWIPE_THRESHOLD_VELOCITY &amp;&amp; Math.Abs(velocityX) &gt; SWIPE_THRESHOLD_VELOCITY)<br>                    {<br>                        if (diffX &gt; 0)<br>                        {<br>                            //onSwipeRight();<br>                            if (imageIndex &gt; 0)<br>                            {<br>                                imageIndex--;<br>                            }<br>                            txtGestureView.Text = &quot;Swiped Right&quot;;<br>                        }<br>                        else<br>                        {<br>                            if (imageIndex &lt; 28)<br>                            {<br>                                imageIndex++;<br>                            }<br><br>                            //onSwipeLeft();<br>                            txtGestureView.Text = &quot;Swiped Left&quot;;<br>                        }<br><br><br>                        result = true;<br>                    }<br>                }<br>                else<br>                if (Math.Abs(diffY) &gt; SWIPE_THRESHOLD_VELOCITY &amp;&amp; Math.Abs(velocityY) &gt; SWIPE_THRESHOLD_VELOCITY)<br>                {<br>                    if (diffY &gt; 0)<br>                    {<br>                        //onSwipeBottom();<br>                        txtGestureView.Text = &quot;Swiped Bottom&quot;;<br>                    }<br>                    else<br>                    {<br>                        //onSwipeTop();<br>                        txtGestureView.Text = &quot;Swiped Top&quot;;<br><br>                    }<br>                    result = true;<br>                }<br>            }<br>            catch (Exception exception)<br>            {<br>                Console.WriteLine(exception.Message);<br>            }<br>            return result;<br>        }<br><br>        public void OnLongPress(MotionEvent e)<br>        {<br>            Toast.MakeText(this, &quot;On Long Press&quot;, ToastLength.Short).Show();<br>        }<br><br>        public bool OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)<br>        {<br>            Toast.MakeText(this, &quot;On Scroll&quot;, ToastLength.Short).Show();<br><br>            return true;<br>        }<br><br>        public void OnShowPress(MotionEvent e)<br>        {<br>            Toast.MakeText(this, &quot;On Show Press&quot;, ToastLength.Short).Show();<br><br>        }<br><br>        public bool OnSingleTapUp(MotionEvent e)<br>        {<br>            Toast.MakeText(this, &quot;On Single Tab Up&quot;, ToastLength.Short).Show();<br><br>            return true;<br>        }<br>    }<br>}</pre><p>Run your application and get output like below gif</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*H5Y7-6MtW2IChH6DyxyMEA.gif" /></figure><p>The full source code is here — <a href="https://github.com/logeshpalani98/Xamarin.Android-Samples/tree/master/Xamarin.Android-Gestures">GitHub</a></p><p><strong>Conclusion</strong></p><p>I hope you all, understand the gestures and how to implement our application, Thank for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4cc1c07008f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin.Forms — DataGrid]]></title>
            <link>https://medium.com/@logeshpalani98/xamarin-forms-datagrid-2c60ab3842a9?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c60ab3842a9</guid>
            <category><![CDATA[datagrid]]></category>
            <category><![CDATA[xamarin-mobile-dev]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[xamarin-forms]]></category>
            <category><![CDATA[xamarin-data-grid]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Thu, 14 May 2020 18:02:48 GMT</pubDate>
            <atom:updated>2020-05-14T18:02:48.649Z</atom:updated>
            <content:encoded><![CDATA[<h3>Xamarin.Forms — DataGrid</h3><p><strong>Introduction</strong></p><p>The DataGrid is format or architecture to show a set of data in the user interface. In Xamarin Forms there is no default DataGrid control, so we need to install “Xamarin.Forms.DataGrid” dependency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*mdU-lPJfsCpSCmOcrReD7w.jpeg" /><figcaption>Xamarin Forms Data Grid</figcaption></figure><p><strong>Let’s start :)</strong></p><p>create new Xamarin.Forms application in Visual Studio for Mac</p><figure><img alt="New Xamarin Forms" src="https://cdn-images-1.medium.com/max/907/1*OkRmq7QE9FdR-wWMVCbhIw.png" /><figcaption>New Xamarin.Forms Project</figcaption></figure><p>Once Project created, install “Xamarin.Forms.DataGrid” dependency by going, the Solution Explorer &gt;&gt; right-click and select “Manage NuGet Packages” &gt;&gt; in the new dialog, top right corner search “Xamarin.Forms.DataGrid” and Install it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*Pa3JvIOMdMw9EHgTM79wjQ.png" /><figcaption>NuGet install</figcaption></figure><p>Create an MVVM folder structure, create a Professional.cs model class under the Model folder. For that, open Solution Explorer &gt;&gt; right-click the Model folder and select Add &gt; new class and give name as Professional.cs. The class code is given below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/294a7fa0d6017029ab1558af5c38297f/href">https://medium.com/media/294a7fa0d6017029ab1558af5c38297f/href</a></iframe><p>Now, create another DummyProfessionalData.cs class under the Utils folder for dummy data. This class used for creating dummy data and code is given here.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d77e2fce2e909e0dabf20fe1f246663/href">https://medium.com/media/9d77e2fce2e909e0dabf20fe1f246663/href</a></iframe><p>Next, Create MainPageViewModel.cs class under ViewModel folder and write given below code. Here, List and IsRefreshing properties and refresh commend are written, and when the user swipe top to bottom, the refresh command will execute and refresh the UI with updated data. INotifyPropertyChanged property also implemented to invoke the UI with new Data. The Professional Property for single data selection.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31c9d60d9312c52465d4686aca278098/href">https://medium.com/media/31c9d60d9312c52465d4686aca278098/href</a></iframe><p>After that open MainPage.xaml page and start our UI design. First, we call DataGrid namespace as dg and design our columns with Title, bind the PropertyName, width size. Bind ItemSource, SelectedItem, refershCommand. This page design code is given below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fac5247f52564b0f2270f8e7eff8a9a9/href">https://medium.com/media/fac5247f52564b0f2270f8e7eff8a9a9/href</a></iframe><p>Next open MainPage.xaml.cs and set BindingContext is MainPageViewModel as we done already. The source code here.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e397b0bf28b907234b56cc9be481ece/href">https://medium.com/media/3e397b0bf28b907234b56cc9be481ece/href</a></iframe><p>Finally, initialize DataComponent in App Startup of App.xaml.cs class as below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a99265e50c334550dcf70229c4763fe/href">https://medium.com/media/5a99265e50c334550dcf70229c4763fe/href</a></iframe><p>Now, run your application and output like the below screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*mdU-lPJfsCpSCmOcrReD7w.jpeg" /><figcaption>Output</figcaption></figure><p>The Full Source Code is here — <a href="https://github.com/logeshpalani98/Xamarin.Forms-Samples">GitHub</a></p><p><strong>Conclusion</strong></p><p>I hope you all understand how to use DataGrid in Xamarin.Forms and this is helpful for all and thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c60ab3842a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HotReload With Wi-Fi Debugging Gives More Power To Xamarin Forms]]></title>
            <link>https://medium.com/@logeshpalani98/hotreload-with-wi-fi-debugging-gives-more-power-to-xamarin-forms-4a5f949bd92d?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a5f949bd92d</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[xamarin-forms]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Fri, 28 Feb 2020 17:31:25 GMT</pubDate>
            <atom:updated>2020-02-28T17:31:25.714Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Vjg_B7GvU8Qxz9Z8n73MVQ.png" /></figure><p>Wi-Fi debugging is another way to deploy and debug your application in Android and iOS devices. A couple of months back Microsoft released Xamarin HotReload for continuous changing of the values in the editor. It will instantly reflect in your running device without the need to rebuild and restart the application. Now, we going to check how HotReload and Wi-Fi deployment work at the same time. Before starting this, we need to configure our IDE and mobile for Wi-Fi debugging.</p><h3>Configure iOS</h3><p>Open XCode and navigate to Window menu &gt;&gt; select Device and Simulator &gt;&gt; check to Connect via Network checkbox as shown in the below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/194/1*loSoXrIYQKXT7k5L1ikvRw.png" /></figure><p><strong><em>Note: </em></strong><em>Your iPhone and Mac must be in the same network connection.</em></p><p>Go back to Visual Studio and select the dropdown device list. Wi-Fi connected devices will be shown with a small Wi-Fi icon in front of the device name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*R6VBTyTRnv1SejK6-xm7Ag.png" /></figure><p>Now select the iPhone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*rw0DoBy2N9L7eI6-N1t3vg.png" /></figure><h3>Configure Android</h3><p>Open Terminal in Mac and run the following commands for adding the <em>adb </em>path.</p><pre>echo ‘export PATH=$PATH:/Users/*thisismyaccount*/Library/Android/sdk/platform-tools/’ &gt;&gt; ~/.bash_profile</pre><pre>source ~/.bash_profile</pre><p>Note: first connect your android device via USB.</p><p>After adding the path, enter the below command.</p><pre>adb devices</pre><p>Next, execute the <em>TCP </em>command to have the adb listen to the network port to connect a device.</p><pre>adb tcpip 5555</pre><p>Copy your Wi-Fi IP from your Android device by doing&gt;&gt; Settings &gt;&gt; Wi-Fi &gt;&gt; Connected Wi-Fi settings &gt;&gt; note the IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*K3OcvDA9L4e5pOjsH_DMgA.jpeg" /></figure><p>Next, connect your <em>adb </em>to an IP address by running the below command.</p><pre>adb connect 192.165.12.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*C09trZXvJynvthRgZh1NLw.png" /></figure><p>The device connection is established successfully. Unplug your USB and deploy your application over the Wi-Fi. After unplugging the USB this IP device will be shown your ide drop-down list, and select and deploy it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*WqfZ35yiRlUg-_Lr7nrwNQ.png" /></figure><p>After debugging change the adb listen port to USB mode by executing the below command.</p><pre>adb usb</pre><h3>HotReload</h3><p>Enable your HotReload by going to Visual Studio Preferences &gt;&gt; Xamarin Hot Reload left menu and check the Enable Hot Reload checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*UqJLyoT4mnLP_SpQ3G5XSg.png" /></figure><p>Now check your HotReload, set your startup project and run the application. You can edit the values and <em>Save it, </em>instantly your application will flash and load into a newly changed design.</p><p>That was awesome, thanks to the Xamarin Forms Team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a5f949bd92d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Use Oxyplot Chart in Xamarin iOS]]></title>
            <link>https://medium.com/@logeshpalani98/how-to-use-oxyplot-chart-in-xamarin-ios-afedd19c9f67?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/afedd19c9f67</guid>
            <category><![CDATA[charts]]></category>
            <category><![CDATA[xamarin-ios]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[xamarin-ios-development]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Sat, 22 Feb 2020 18:09:16 GMT</pubDate>
            <atom:updated>2020-02-27T05:01:15.532Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tzu2NKHLxILlWHMB_GbS1g.png" /></figure><h3>Introduction</h3><p>Showing data in a chart/graph is much easier to understand. In Xamarin iOS no default option to show the chart. We must use a third-party plugin to show charts. A lot of third-party plugins are paid like Syncfusion, Telerik. I recommend using Oxyplot charts because it’s full of open-source and easy to use this in your project. In this article, we are going to learn how to use and understand the Oxyplot chart in Xamarin.iOS Project.</p><h3>Let’s start,</h3><p>Create<em> Xamarin iOS Single View Application</em> in Visual Studio for Mac</p><p>Before start designing, we must install an<em> Oxyplot</em> chart plugin from<em> NuGet Manager </em>in your project<em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*oL0WBAuTM91Pixp1mwkYQA.png" /></figure><p>Now, open Main.Storyboard in Visual Studio designer, and drag the View from Toolbox and place as per your requirement and apply class as <em>PlotView</em> in the properties window and set identity Name [Eg — plotview]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*WQNjdIu-EEmepzgsHIgKOQ.png" /></figure><p>Next, write your code in ViewController.cs file. Here the many different types of chart API will be available for use like Bar, Stack, Function, Pie Chart and etc,. Create PlotModel and set required properties as per your requirement and create the X, Y-axis, position, labels, zoom, angle, Max, Min, and other properties. The Zoom property for the zoom level of the chart. The Max, Min properties for avoiding more scrolling in the non-data representation in the chart, I mean you set min level is a zero, it will avoid minus(-) side-scrolling, because, we don’t have data representation on minus side. Position property used to set the position of chart in the top, bottom, left or right side. Afterward, create Axis and Data Column Series. In the Column series also have different properties like color, width and etc,. Apply this X, Y-Axis and Column series to this PlotModel as we created first. Finally set this plotModel to PlotView as we designed in the Storyboard scene. Here is the full source code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ffbf7f5b379a70811505e1a7edccff5/href">https://medium.com/media/7ffbf7f5b379a70811505e1a7edccff5/href</a></iframe><p>Now, you can execute the project and the output like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*yX4ueo2kXDG6diomfhOw2w.png" /></figure><p>Next, create another type of chart. Create a new Model named item.cs and write the below-given code.</p><p>namespace chartsDemo<br>{<br> internal class Item<br> {<br> public string Label { get; set; }<br> public int Value1 { get; set; }<br> public int Value2 { get; set; }<br> public int Value3 { get; set; }<br> }<br>}</p><p>As usual use bar Charts and apply item model values to this plot chart. The code is given below.</p><p>using System;<br>using System.Collections.ObjectModel;<br>using CoreGraphics;<br>using OxyPlot;<br>using OxyPlot.Axes;<br>using OxyPlot.Series;<br>using UIKit;</p><p>namespace chartsDemo<br>{<br> public partial class ViewController : UIViewController<br> {<br> public ViewController(IntPtr handle) : base(handle)<br> {<br> }</p><p>public override void ViewDidLoad()<br> {<br> base.ViewDidLoad();<br> // Perform any additional setup after loading the view, typically from a nib.</p><p>var model = new PlotModel()<br> {<br> Title = “Column”,<br> PlotType = PlotType.XY,<br> LegendSymbolLength = 5,<br> LegendPlacement = LegendPlacement.Outside,<br> LegendOrientation = LegendOrientation.Vertical,<br> };</p><p>CategoryAxis xaxis = new CategoryAxis();<br> xaxis.Position = AxisPosition.Bottom;<br> xaxis.Labels.Add(“Mon, 4/24”);<br> xaxis.Labels.Add(“Tue, 4/25”);<br> xaxis.Labels.Add(“Wed, 4/26”);<br> xaxis.Labels.Add(“Thu, 4/27”);<br> xaxis.Labels.Add(“Mon, 4/24”);<br> xaxis.Labels.Add(“Tue, 4/25”);<br> xaxis.AbsoluteMinimum = -.5;<br> xaxis.AbsoluteMaximum = 6;<br> xaxis.Zoom(0, 4.5);<br> xaxis.Angle = 45;</p><p>LinearAxis yaxis = new LinearAxis();<br> yaxis.Position = AxisPosition.Left;<br> yaxis.AbsoluteMinimum = 0;<br> yaxis.MinimumPadding = 0;<br> yaxis.AbsoluteMaximum = 100;</p><p>ColumnSeries s1 = new ColumnSeries();<br> s1.IsStacked = true;<br> s1.Items.Add(new ColumnItem(20));<br> s1.Items.Add(new ColumnItem(60));<br> s1.Items.Add(new ColumnItem(40));<br> s1.Items.Add(new ColumnItem(50));<br> s1.Items.Add(new ColumnItem(20));<br> s1.Items.Add(new ColumnItem(60));<br> <br> s1.ColumnWidth = 20;<br> s1.FillColor = OxyColor.FromRgb(255, 0, 0);</p><p>ColumnSeries s2 = new ColumnSeries();<br> s2.IsStacked = true;<br> s2.Items.Add(new ColumnItem(50));<br> s2.Items.Add(new ColumnItem(30));<br> s2.Items.Add(new ColumnItem(10));<br> s2.Items.Add(new ColumnItem(20));<br> s2.ColumnWidth = 20;</p><p>var Items = new Collection&lt;Item&gt;<br> {<br> new Item {Label = “Apples”, Value1 = 37, Value2 = 12},<br> new Item {Label = “Pears”, Value1 = 7, Value2 = 21},<br> new Item {Label = “Bananas”, Value1 = 23, Value2 = 2}<br> };</p><p>model.Axes.Add(new CategoryAxis { ItemsSource = Items, LabelField = “Label”, AbsoluteMinimum = -0.5 });<br> model.Axes.Add(new LinearAxis { Position = AxisPosition.Left, MinimumPadding = 0, AbsoluteMinimum = 0 });<br> model.Series.Add(new ColumnSeries { Title = “2009”, ItemsSource = Items, ValueField = “Value1”, ColumnWidth = 20 });<br> model.Series.Add(new ColumnSeries { Title = “2010”, ItemsSource = Items, ValueField = “Value2”, ColumnWidth = 20 });<br> model.Series.Add(new ColumnSeries { Title = “2011”, ItemsSource = Items, ValueField = “Value3” });</p><p>this.plotview.Model = model;<br> plotview.Frame = new CGRect(0, 0, this.View.Frame.Width + 20, this.View.Frame.Height);</p><p>}</p><p>public override void DidReceiveMemoryWarning()<br> {<br> base.DidReceiveMemoryWarning();<br> // Release any cached data, images, etc that aren’t in use.<br> }<br> }<br>}</p><p>Run your project by pressing F5, you will get output like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*L-fyM6-emgFxdpU7vgxCEA.png" /></figure><p>The Full source code in <a href="https://github.com/logeshpalani98/Xamarin.iOS-Samples/blob/master/chartsDemo"><strong><em>Github</em></strong></a></p><p>Summary</p><ol><li>Install Xamarin.iOS.Oxtplot Plugin</li><li>Place View and apply PlotView class</li><li>Create PlotModel, Column Series, X and Y-Axis</li><li>Apply to PlotView</li></ol><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afedd19c9f67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Popup Dialog In Xamarin Android]]></title>
            <link>https://medium.com/@logeshpalani98/custom-popup-dialog-in-xamarin-android-c644e39e5906?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c644e39e5906</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[xamarin-android]]></category>
            <category><![CDATA[visual-studio]]></category>
            <category><![CDATA[dialog]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Wed, 19 Feb 2020 19:42:32 GMT</pubDate>
            <atom:updated>2020-02-19T19:42:32.914Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In this article, we go step by step to build a custom popup dialog for Xamarin Android. The popup dialog is just a window that prompts to enter additional details. Where we can use the popup dialog means, in some cases, we want some decision from the user without changing the activity or screen.</p><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*feuweUVTpZDNrfZTybE9bg.gif" /></figure><p>Let’s start.</p><p><strong>Step 1</strong></p><p>First, create a simple Xamarin Android Application by going to New &gt;&gt; Select Android &gt;&gt; followed by clicking Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*oweZj0CSdK8LmMwBQxfc_Q.jpeg" /></figure><p><strong>Step 2</strong></p><p>Here give the project name, organization name, app compatibility, and app theme, then click Create project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*0A0iWNMYDGqdbJXojhuJ5A.png" /></figure><p><strong>Step 3</strong></p><p>After the project creation, double click to open Main.axml. For that, Solution Explorer &gt;&gt; expand the Resources folder and Layout folder, double click to open Main.axml. Now, drag and drop to place one button, this page code is given below.</p><ol><li>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;</li><li>&lt;LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android&quot;</li><li>android:orientation=”vertical”</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”match_parent”&gt;</li><li>&lt;Button</li><li>android:text=”Show Popup”</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”wrap_content”</li><li>android:textAllCaps=”false”</li><li>android:id=”@+id/btnPopup” /&gt;</li><li>&lt;/LinearLayout&gt;</li></ol><p><strong>Step 4</strong></p><p>Now, add a new Layout named Popup.axml. For that, right-click the Layout Folder and select Add &gt;&gt; New and the new popup window will appear, select Layout and name as Popup.axml and click Add.</p><ol><li>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;</li><li>&lt;FrameLayout</li><li>xmlns:android=”http://schemas.android.com/apk/res/android&quot;</li><li>xmlns:app=”http://schemas.android.com/apk/res-auto&quot;</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”wrap_content”&gt;</li><li>&lt;android.support.constraint.ConstraintLayout</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”wrap_content”</li><li>android:layout_marginLeft=”10dp”</li><li>android:layout_marginRight=”10dp”</li><li>android:background=”@android:color/white”&gt;</li><li>&lt;TextView</li><li>android:id=”@+id/allocate_collector”</li><li>app:layout_constraintTop_toTopOf=”parent”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>android:layout_width=”wrap_content”</li><li>android:layout_height=”18dp”</li><li>android:layout_marginTop=”15dp”</li><li>android:layout_marginLeft=”10dp”</li><li>android:text=”Custom Title”</li><li>android:textStyle=”bold”</li><li>android:textSize=”16dp”</li><li>android:maxLines=”1&quot;</li><li>android:textColor=”@android:color/black”/&gt;</li><li>&lt;TextView</li><li>android:id=”@+id/patient”</li><li>app:layout_constraintTop_toBottomOf=”@+id/allocate_collector”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>android:layout_marginTop=”20dp”</li><li>android:layout_marginLeft=”10dp”</li><li>android:layout_width=”wrap_content”</li><li>android:layout_height=”14dp”</li><li>android:text=”My Name”</li><li>android:textSize=”12dp”/&gt;</li><li>&lt;android.support.design.widget.TextInputLayout</li><li>android:id=”@+id/collector_name_txt_lyt”</li><li>app:layout_constraintTop_toBottomOf=”@+id/patient”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”51dp”</li><li>android:layout_marginTop=”15dp”</li><li>android:layout_marginLeft=”10dp”</li><li>android:layout_marginRight=”10dp”&gt;</li><li>&lt;AutoCompleteTextView</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”wrap_content”</li><li>android:id=”@+id/autocomplete”</li><li>android:inputType=”textAutoComplete”</li><li>android:completionThreshold=”1&quot;</li><li>android:singleLine=”true”</li><li>android:gravity=”bottom”</li><li>android:hint=”Name”</li><li>android:textSize=”14dp”</li><li>android:paddingRight=”20dp”</li><li>android:textColor=”@android:color/black”/&gt;</li><li>&lt;/android.support.design.widget.TextInputLayout&gt;</li><li>&lt;View</li><li>android:id=”@+id/topview_of_logout”</li><li>app:layout_constraintTop_toBottomOf=”@+id/collector_name_txt_lyt”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>app:layout_constraintEnd_toEndOf=”parent”</li><li>android:layout_width=”match_parent”</li><li>android:layout_height=”1dp”</li><li>android:background=”#000000&quot;</li><li>android:layout_marginTop=”30dp”/&gt;</li><li>&lt;View</li><li>android:id=”@+id/midview_of_logout”</li><li>app:layout_constraintTop_toBottomOf=”@+id/topview_of_logout”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>app:layout_constraintEnd_toEndOf=”parent”</li><li>android:layout_width=”1dp”</li><li>android:layout_height=”37dp”</li><li>android:layout_marginLeft=”1dp”</li><li>android:layout_marginRight=”1dp”</li><li>android:background=”@android:color/black”/&gt;</li><li>&lt;Button</li><li>android:id=”@+id/btnCancel”</li><li>app:layout_constraintTop_toBottomOf=”@+id/topview_of_logout”</li><li>app:layout_constraintStart_toStartOf=”parent”</li><li>app:layout_constraintEnd_toStartOf=”@+id/midview_of_logout”</li><li>android:layout_width=”0dp”</li><li>android:layout_height=”43dp”</li><li>android:background=”@null”</li><li>android:text=”Cancel”</li><li>android:textAllCaps=”false”</li><li>android:textSize=”12dp”/&gt;</li><li>&lt;Button</li><li>android:id=”@+id/btnOk”</li><li>app:layout_constraintTop_toBottomOf=”@+id/topview_of_logout”</li><li>app:layout_constraintStart_toEndOf=”@+id/midview_of_logout”</li><li>app:layout_constraintEnd_toEndOf=”parent”</li><li>android:layout_width=”0dp”</li><li>android:layout_height=”43dp”</li><li>android:text=”Submit”</li><li>android:textSize=”12dp”</li><li>android:textColor=”@android:color/black”</li><li>android:textAllCaps=”false”</li><li>android:background=”@android:color/white”/&gt;</li><li>&lt;/android.support.constraint.ConstraintLayout&gt;</li><li>&lt;/FrameLayout&gt;</li></ol><p><strong>Step 5</strong></p><p>Next, open MainActivity.cs and add the following code to Invoke the popup dialog in the UI. For that, open Solution Explorer &gt;&gt; MainActivity.cs. This page code is given below. In that code, we are initializing the Alert Dialog object and set up the layout. We can access the layout widget properties by using the “window.FindViewById&lt;TextView&gt;(Resource.Id.widgetId)”, otherwise you’re trying to access directly, NullException will be thrown.</p><ol><li><strong>using</strong> Android.App;</li><li><strong>using</strong> Android.OS;</li><li><strong>using</strong> Android.Support.V7.App;</li><li><strong>using</strong> Android.Views;</li><li><strong>using</strong> Android.Widget;</li><li><strong>using</strong> <strong>static</strong> Android.App.ActionBar;</li><li><strong>namespace</strong> CustomPopupLayout</li><li>{</li><li>[Activity(Label = “@string/app_name”, Theme = “@style/AppTheme”, MainLauncher = <strong>true</strong>)]</li><li><strong>public</strong> <strong>class</strong> MainActivity : AppCompatActivity</li><li>{</li><li><strong>private</strong> Button btnshowPopup;</li><li><strong>private</strong> Button btnPopupCancel;</li><li><strong>private</strong> Button btnPopOk;</li><li><strong>private</strong> Dialog popupDialog;</li><li><strong>protected</strong> <strong>override</strong> <strong>void</strong> OnCreate(Bundle savedInstanceState)</li><li>{</li><li><strong>base</strong>.OnCreate(savedInstanceState);</li><li>// Set our view from the “main” layout resource</li><li>SetContentView(Resource.Layout.Main);</li><li>btnshowPopup = FindViewById&lt;Button&gt;(Resource.Id.btnPopup);</li><li>btnshowPopup.Click += BtnshowPopup_Click;</li><li>}</li><li><strong>private</strong> <strong>void</strong> BtnshowPopup_Click(<strong>object</strong> sender, System.EventArgs e)</li><li>{</li><li>popupDialog = <strong>new</strong> Dialog(<strong>this</strong>);</li><li>popupDialog.SetContentView(Resource.Layout.activity_main);</li><li>popupDialog.Window.SetSoftInputMode(SoftInput.AdjustResize);</li><li>popupDialog.Show();</li><li>// Some Time Layout width not fit with windows size</li><li>// but Below lines are not necessery</li><li>popupDialog.Window.SetLayout(LayoutParams.MatchParent, LayoutParams.WrapContent);</li><li>popupDialog.Window.SetBackgroundDrawableResource(Android.Resource.Color.Transparent);</li><li>// Access Popup layout fields like below</li><li>btnPopupCancel = popupDialog.FindViewById&lt;Button&gt;(Resource.Id.btnCancel);</li><li>btnPopOk = popupDialog.FindViewById&lt;Button&gt;(Resource.Id.btnOk);</li><li>// Events for that popup layout</li><li>btnPopupCancel.Click += BtnPopupCancel_Click;</li><li>btnPopOk.Click += BtnPopOk_Click;</li><li>// Some Additional Tips</li><li>// Set the dialog Title Property — popupDialog.Window.SetTitle(“Alert Title”);</li><li>}</li><li><strong>private</strong> <strong>void</strong> BtnPopOk_Click(<strong>object</strong> sender, System.EventArgs e)</li><li>{</li><li>popupDialog.Dismiss();</li><li>popupDialog.Hide();</li><li>}</li><li><strong>private</strong> <strong>void</strong> BtnPopupCancel_Click(<strong>object</strong> sender, System.EventArgs e)</li><li>{</li><li>popupDialog.Dismiss();</li><li>popupDialog.Hide();</li><li>}</li><li>}</li><li>}</li></ol><p><strong>Additional Tip</strong></p><p>In here, you can easily set alert dialog Title by using “AlertDialog.SetTitle” property.</p><p><strong>Step 6</strong></p><p>Now run your Xamarin Android, your output will look like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*feuweUVTpZDNrfZTybE9bg.gif" /></figure><p>Download Source <a href="https://github.com/logeshpalani98/XamarinAndroid-CustomPopUpLayout">Github</a></p><h3>Conclusion</h3><p>Finally, we have successfully created a custom dialog, I hope it’s helpful. If you have any suggestions feel free to write in the comments section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c644e39e5906" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple Table View in Xamarin iOS]]></title>
            <link>https://medium.com/@logeshpalani98/simple-table-view-in-xamarin-ios-90c57aa45d4?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/90c57aa45d4</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[xamarin-ios-development]]></category>
            <category><![CDATA[xamarin-app-development]]></category>
            <category><![CDATA[xamarin-ios]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Tue, 18 Feb 2020 10:38:22 GMT</pubDate>
            <atom:updated>2020-02-18T10:38:22.702Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello guys, in this article, we will learn to create a simple table view in Xamarin iOS. Table View is a view for displaying the list of data in the scroll function. But, Xamarin iOS doesn’t have an option to directly display the data, so we need to create a custom table view Source class and configure row cell view or layout.</p><h3>iOS output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*Zc5Gs4w4wQA07o7uGTlPog.gif" /></figure><h3>Prerequisites</h3><ul><li>Visual Studio 2017 or above</li><li>XCode 10.0 or above</li><li>IOS Device or Simulator</li><li>This project created in Visual Studio 2019 with Mac Machine</li></ul><h3>Let’s Start</h3><p><strong>Step 1</strong></p><p>Open Visual Studio and create Xamarin iOS<strong> Single View Application</strong> by going to Visual Studio &gt;&gt; New Solution &gt;&gt; In the dialog left side, select iOS under App &gt;&gt; forward by select Single View Application and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*UxUpveURNUOLv_9wrNSSJQ.png" /></figure><p><strong>Step 2:</strong></p><p>In the next dialog window, give your app name, organization name, and target version, choose devices then click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*bFQ05q4H8wfcMHSKjxuJ2A.png" /></figure><p>After a few seconds, the project is created and you get the solution folder structure like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/1*OpMCe196l1ZgwLb4TDWFng.png" /></figure><p><strong>Step 3:</strong></p><p>Now, open Main.storyboard by going to Solution Pad &gt;&gt; Main.StoryBoard &gt;&gt; right-click to select Choose iOS Designer or XCode Interface Builder &gt;&gt; Afterwards, the storyboard will be opened. Here, drag and drop UITableView and set Constraints. Top, Bottom, Leading and Trailing Constraints are Zero.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*r_fBHia-IuBUJukoCcD0kw.png" /></figure><p>Setting up constraints, you get a view like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*zL_YUJYOkWPZAYhW25aY6A.png" /></figure><p>Now, you can set the UITableView identifier as tableviewId and View Controller as ViewController.Cs. We should set Source and all other properties for this layouttableviewId. Otherwise, we can’t have access to this Table View.</p><p><strong>Step 4:</strong></p><p>Next, create a new class named ListTableViewSource.cs. By going to the right-click Solution and Add &gt;&gt; New File &gt;&gt; Class and give name ListTableViewSource.cs. This class inherits from UITableViewSource and extracts the Abstract Class. The page code is given below.</p><p><strong>Step 5:</strong></p><p>Now, open ViewController.cs file and set the Table View Source Class to Table View. The code is given below.</p><ol><li><strong>class</strong> TableViewSimpleSource: UITableViewSource {</li><li><strong>private</strong> List &lt; <strong>string</strong> &gt; listItems = <strong>new</strong> List &lt; <strong>string</strong> &gt; () {</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”,</li><li>“List Item”</li><li>};</li><li><strong>public</strong> <strong>override</strong> UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) {</li><li>var cell = <strong>new</strong> UITableViewCell(CGRect.Empty);</li><li>cell.TextLabel.Text = listItems[indexPath.Row];</li><li><strong>return</strong> cell;</li><li>}</li><li><strong>public</strong> <strong>override</strong> nint RowsInSection(UITableView tableview, nint section) {</li><li><strong>return</strong> listItems.Count;</li><li>}</li><li>}</li></ol><p>Now, run your Xamarin iOS application and we get output like below.</p><ol><li><strong>using</strong> System;</li><li><strong>using</strong> System.Collections.Generic;</li><li><strong>using</strong> CoreGraphics;</li><li><strong>using</strong> Foundation;</li><li><strong>using</strong> UIKit;</li><li><strong>namespace</strong> TableViewDemo {</li><li><strong>public</strong> partial <strong>class</strong> ViewController: UIViewController {</li><li><strong>public</strong> ViewController(IntPtr handle): <strong>base</strong>(handle) {}</li><li><strong>public</strong> <strong>override</strong> <strong>void</strong> ViewDidLoad() {</li><li><strong>base</strong>.ViewDidLoad();</li><li>tableviewId.Source = <strong>new</strong> TableViewSimpleSource();</li><li>}</li><li><strong>public</strong> <strong>override</strong> <strong>void</strong> DidReceiveMemoryWarning() {</li><li><strong>base</strong>.DidReceiveMemoryWarning();</li><li>}</li><li>}</li><li>}</li></ol><p>Now, run your Xamarin iOS application and we get output like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*Zc5Gs4w4wQA07o7uGTlPog.gif" /></figure><p>Get Source From <a href="https://github.com/logeshpalani98/XamariniOS-TableView">Github</a></p><p>Thank you for reading this, if you have any suggestions, feel free to write in the comments section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90c57aa45d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Windows Bug Bash]]></title>
            <link>https://medium.com/@logeshpalani98/microsoft-windows-bug-bash-4a5de091f62e?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a5de091f62e</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[windows-10]]></category>
            <category><![CDATA[windows-insider-program]]></category>
            <category><![CDATA[windows-insider]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Mon, 23 Sep 2019 16:27:39 GMT</pubDate>
            <atom:updated>2019-09-23T16:27:39.297Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*FcLXb8oKinGdkwj1Xk65Aw.png" /></figure><p>The Bug Bash main goal is to improve the user experience of windows, by pulling issues and suggestions from windows insiders and windows users. This webcast creates a quest and forums to announce the features and new tasks to report the bug, problem and gives some better ideas to improve the windows.</p><p><strong>Why you should participate in Bug Bush?</strong></p><p>If you facing any problem like a performance or driver installation problem in your windows, you can directly report to the Windows Engineer Team to fix the problem and improve the window experience.</p><p><strong>How to Participate in Bug Bash?</strong></p><ul><li>Ensure your PC is running the Latest Preview Build in the fast ring (Build 18985).</li><li>Clear the quests to know what is the new features in Feedback Hub windows at the end of Quest.</li><li>When you click windows + F it will take to another window, there you can give feedback with screenshots.</li></ul><p><strong>Link to Join Bug Bash — </strong><a href="https://mixer.com/WindowsInsider">https://mixer.com/WindowsInsider</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a5de091f62e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate Barcode and QR Code in Xamarin Android]]></title>
            <link>https://medium.com/@logeshpalani98/generate-barcode-and-qr-code-in-xamarin-android-7e30c4725fbb?source=rss-8039d43b860a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e30c4725fbb</guid>
            <category><![CDATA[barcode]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[qr-code]]></category>
            <category><![CDATA[xamarin-android]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Logesh Palani]]></dc:creator>
            <pubDate>Thu, 22 Aug 2019 17:09:28 GMT</pubDate>
            <atom:updated>2019-08-22T17:09:28.643Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction</p><p>In this article, we can discuss how to generate 1D and 2D Barcode in Xamarin Android application. Here basic requirement to generate Barcode or QR Code, we need to get some information form user like what message you want to convert, Code format, size of the bitmap. There is no default library for this. so, we need to install a plugin for this. Just write a few lines of code to generate 1D and 2D Code. The Barcode has a different format but I demonstrate some few code formats — Code 39, Code 128, AZTEC and QR Code.</p><p>Android Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*kwR7YRQvWLbTvT6mVE102Q.gif" /></figure><p>Let’s start 😊</p><p>Step 1:</p><p>Create can create Xamarin.Android Application by going to Visual Studio New Project &gt;&gt; Android App click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*mjq__37roOEEGcyeVd9hiQ.png" /></figure><p>Here gives a project name, organization name, app compatibility, and app theme, then click Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*pGs_DqWXsCZmdnooZqYwFg.png" /></figure><p>Step 2:</p><p>After project creation, first we need to install a plugin for this by going to Solution Explorer &gt;&gt; right-click Packages and select Add packages, then new windows will appear, here right-side top search ZXing.Net plugin and add this package.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*xhZqcVSorr6Xym_TYJ20NQ.png" /></figure><p>Step 3:</p><p>Now, let’s coding. First open content_main.xml. For that, go to Solution Explorer &gt;&gt; Resource &gt;&gt; Layout &gt;&gt; double click to open content_main.xml. add the following given code to this file.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;RelativeLayout<br>    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;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;<br>    app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;<br>    tools:showIn=&quot;@layout/activity_main&quot;&gt;<br>    &lt;TextView<br>        android:id=&quot;@+id/txtChooseStatic&quot;<br>       android:layout_width=&quot;fill_parent&quot;  <br>       android:layout_height=&quot;wrap_content&quot;  <br>       android:layout_marginTop=&quot;10dp&quot;<br>       android:layout_alignParentTop=&quot;true&quot;<br>       android:text=&quot;Choose Encoding Method&quot; /&gt;  <br>    &lt;Spinner  <br>       android:id=&quot;@+id/spinner&quot;  <br>       android:layout_width=&quot;fill_parent&quot;<br>        android:layout_marginTop=&quot;10dp&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>       android:layout_below=&quot;@+id/txtChooseStatic&quot;<br>       android:prompt=&quot;@string/action_choose&quot;/&gt;<br>    &lt;EditText<br>         android:id=&quot;@+id/plain_text_input&quot;<br>         android:layout_height=&quot;wrap_content&quot;<br>         android:layout_width=&quot;match_parent&quot;<br>         android:layout_margin=&quot;10dp&quot;<br>         android:layout_below=&quot;@+id/spinner&quot;<br>         android:hint=&quot;Type Message to Convert&quot;<br>         android:inputType=&quot;text&quot;/&gt;<br>    &lt;ImageView<br>        android:layout_centerHorizontal=&quot;true&quot;<br>        android:layout_marginTop=&quot;10dp&quot;<br>        android:id=&quot;@+id/barcodeImage&quot;<br>        android:layout_below=&quot;@+id/plain_text_input&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;/&gt;<br>    &lt;Button<br>        android:id=&quot;@+id/generate&quot;<br>        android:background=&quot;#000000&quot;<br>        android:textColor=&quot;#ffffff&quot;<br>        android:layout_centerHorizontal=&quot;true&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:padding=&quot;10dp&quot;<br>        android:layout_marginTop=&quot;10dp&quot;<br>        android:layout_below=&quot;@+id/barcodeImage&quot;<br>        android:layout_height=&quot;wrap_content&quot;<br>        android:textSize=&quot;15dp&quot;<br>        android:text=&quot;Generate Code&quot;/&gt;<br><br>&lt;/RelativeLayout&gt;</pre><p>Step 4:</p><p>Next open, MainActivity.cs and add the following code to generate bar code. For that, open Solution Explorer &gt;&gt; MainActivity.cs. This page code gives below.</p><pre>using System;<br>using System.IO;<br>using Android.App;<br>using Android.Content.PM;<br>using Android.Graphics;<br>using Android.OS;<br>using Android.Runtime;<br>using Android.Support.Design.Widget;<br>using Android.Support.V4.App;<br>using Android.Support.V4.Content;<br>using Android.Support.V7.App;<br>using Android.Views;<br>using Android.Widget;<br>using ZXing;<br>using ZXing.Common;<br><br>namespace BarCodeGenerator<br>{<br>    [Activity(Label = &quot;@string/app_name&quot;, Theme = &quot;@style/AppTheme.NoActionBar&quot;, MainLauncher = true)]<br>    public class MainActivity : AppCompatActivity<br>    {<br>        private TextView txtMessage;<br>        private string message;<br>        private static int size = 660;<br>        private static int small_size = 264;<br>        private Spinner spinnerValue;<br>        private string CodeType;<br><br>        protected override void OnCreate(Bundle savedInstanceState)<br>        {<br>            base.OnCreate(savedInstanceState);<br>            Xamarin.Essentials.Platform.Init(this, savedInstanceState);<br>            SetContentView(Resource.Layout.activity_main);<br><br>            Android.Support.V7.Widget.Toolbar toolbar = FindViewById&lt;Android.Support.V7.Widget.Toolbar&gt;(Resource.Id.toolbar);<br>            SetSupportActionBar(toolbar);<br><br>            ImageView image = FindViewById&lt;ImageView&gt;(Resource.Id.barcodeImage);<br>            Button btnGenerate = FindViewById&lt;Button&gt;(Resource.Id.generate);<br>            txtMessage = FindViewById&lt;TextView&gt;(Resource.Id.plain_text_input);<br>            spinnerValue = FindViewById&lt;Spinner&gt;(Resource.Id.spinner);<br>            FloatingActionButton fab = FindViewById&lt;FloatingActionButton&gt;(Resource.Id.fab);<br><br>            var adapter = ArrayAdapter.CreateFromResource(this, Resource.Array.selected_Code, Android.Resource.Layout.SimpleSpinnerItem);<br>            adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);<br>            spinnerValue.Adapter = adapter;<br>            spinnerValue.ItemSelected += new EventHandler&lt;AdapterView.ItemSelectedEventArgs&gt;(SpinnerItemSelect);<br>            fab.Click += FabOnClick;<br><br>            btnGenerate.Click += delegate<br>            {<br>                string[] PERMISSIONS =<br>                {<br>                    &quot;android.permission.READ_EXTERNAL_STORAGE&quot;,<br>                    &quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;<br>                };<br><br>                var permission = ContextCompat.CheckSelfPermission(this, &quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;);<br>                var permissionread = ContextCompat.CheckSelfPermission(this, &quot;android.permission.READ_EXTERNAL_STORAGE&quot;);<br><br>                if (permission != Permission.Granted &amp;&amp; permissionread != Permission.Granted)<br>                    ActivityCompat.RequestPermissions(this, PERMISSIONS, 1);<br><br>                try<br>                {<br>                    if (permission == Permission.Granted &amp;&amp; permissionread == Permission.Granted)<br>                    {<br>                        BitMatrix bitmapMatrix = null;<br>                        message = txtMessage.Text.ToString();<br><br>                        switch (CodeType)<br>                        {<br>                            case &quot;QR Code&quot;:<br>                                bitmapMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.QR_CODE, size, size);<br>                                break;<br>                            case &quot;PDF 417&quot;:<br>                                bitmapMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.PDF_417, size, small_size);<br>                                break;<br>                            case &quot;CODE 128&quot;:<br>                                bitmapMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.CODE_128, size, small_size);<br>                                break;<br>                            case &quot;CODE 39&quot;:<br>                                bitmapMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.CODE_39, size, small_size);<br>                                break;<br>                            case &quot;AZTEC&quot;:<br>                                bitmapMatrix = new MultiFormatWriter().encode(message, BarcodeFormat.AZTEC, size, small_size);<br>                                break;<br>                        }<br><br>                        var width = bitmapMatrix.Width;<br>                        var height = bitmapMatrix.Height;<br>                        int[] pixelsImage = new int[width * height];<br><br>                        for (int i = 0; i &lt; height; i++)<br>                        {<br>                            for (int j = 0; j &lt; width; j++)<br>                            {<br>                                if (bitmapMatrix[j, i])<br>                                    pixelsImage[i * width + j] = (int)Convert.ToInt64(0xff000000);<br>                                else<br>                                    pixelsImage[i * width + j] = (int)Convert.ToInt64(0xffffffff);<br><br>                            }<br>                        }<br><br>                        Bitmap bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888);<br>                        bitmap.SetPixels(pixelsImage, 0, width, 0, 0, width, height);<br><br>                        var sdpath = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath;<br>                        var path = System.IO.Path.Combine(sdpath, &quot;logeshbarcode.jpg&quot;);<br>                        var stream = new FileStream(path, FileMode.Create);<br>                        bitmap.Compress(Bitmap.CompressFormat.Jpeg, 100, stream);<br>                        stream.Close();<br><br>                        image.SetImageBitmap(bitmap);<br>                    }<br>                    else<br>                    {<br>                        Console.WriteLine(&quot;No Permission&quot;);<br>                    }<br>                }<br>                catch (Exception ex)<br>                {<br>                    Console.WriteLine($&quot;Exception {ex} &quot;);<br>                }<br>            };<br>        }<br><br>        private void SpinnerItemSelect(object sender, AdapterView.ItemSelectedEventArgs e)<br>        {<br>            Spinner spinner = (Spinner)sender;<br>            CodeType = (string)spinner.GetItemAtPosition(e.Position);<br>        }<br><br>        public override bool OnCreateOptionsMenu(IMenu menu)<br>        {<br>            MenuInflater.Inflate(Resource.Menu.menu_main, menu);<br>            return true;<br>        }<br><br>        public override bool OnOptionsItemSelected(IMenuItem item)<br>        {<br>            int id = item.ItemId;<br>            if (id == Resource.Id.action_settings)<br>            {<br>                return true;<br>            }<br><br>            return base.OnOptionsItemSelected(item);<br>        }<br><br>        private void FabOnClick(object sender, EventArgs eventArgs)<br>        {<br>            View view = (View)sender;<br>            Snackbar.Make(view, &quot;Replace with your own action&quot;, Snackbar.LengthLong)<br>                .SetAction(&quot;Action&quot;, (Android.Views.View.IOnClickListener)null).Show();<br>        }<br>        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)<br>        {<br>            Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);<br><br>            base.OnRequestPermissionsResult(requestCode, permissions, grantResults);<br>        }<br>    }<br>}</pre><p>Step 5:</p><p>Finally, the application required storage read and write permission. For that, go to Solution Explorer &gt;&gt; Properties &gt;&gt; Open AndroidManifest.xml file. Check the Permissions of External Storage Read and Write Permission.</p><pre><strong>&lt;uses-permission</strong> android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; <strong>/&gt;</strong><br><strong>&lt;uses-permission</strong> android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; <strong>/&gt;</strong></pre><p>Step 6:</p><p>Now, press F5 to run the application. The Output like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*kwR7YRQvWLbTvT6mVE102Q.gif" /></figure><p>Full Source Code <a href="https://github.com/logeshpalani98/QRCode-BarCodeGenerator">Here</a></p><p>Thank you. Suggestion to the command below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e30c4725fbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>