Trying Xamarin.Forms Entry Renderer for Corner Radius

I am always amazed by the capability of Xamarin.Forms Custom Renderer. I wanted to try something and thought of extending the Entry Custom Renderer for Windows Phone App initially to try and provide Corner Radius for Textbox.

If you are a Windows Phone developer, then you already know the complexities. Generally, the TextBox element in Windows Phone, doesn’t have the property of CornerRadius. Corner Radius, generally provides the Curved borders, which in this case would provide for the Textbox control. Anyways, in order to provide a separate border, we generally have to nest the TextBox inside a Border element to provide the Corner Radius.

<Border Margin="5" Padding="5" BorderThickness="1" BorderBrush="Red" Background="AntiqueWhite" CornerRadius="10">
    <TextBlock Text="Lorem ipsum"/>
</Border>

Now I have tried to achieve somewhat same in Xamarin.Forms using Custom Renderers for Windows Phone.
The code is currently checked-in here.

Happy Coding!

Speech To Text in Android using Xamarin

On this fine day of Teacher’s Day, my mentor from Aditi asked me if I know any samples on creating a simple app for Speech to Text recognition in Android. I searched on the net but did not find much result. So then I thought, why not I create a sample, push it in Git and send him the link.

So after an hour the sample was done and pushed to Git. Xamarin allows the use of Android APIs to be utilized in a very easy way.

In just few lines of code I was able to use the RecognizerIntent to launch an activity that will prompt the user for speech and send it through a speech recognizer. The results will be returned via activity results in the event handler OnActivityResult.

The sample can be downloaded and used as is from here.