Android – handling screen rotation and different layouts using Fragments with Xamarin

When I was asked if I could demo how to handle different screen sizes and rotation in Android, I created a small project which I’d like to share here. You can find the complete repo at Github.

The demo uses Xamarin.Android and was built using the Compatibility Lib v4 to support Android’s navigation drawer layout. Fragments are used directly and not via the compatibility packages.

Navigation Drawer on a Nexus 7

Navigation Drawer on a Nexus 7

Continue reading

Change language in Google’s Developer console

If you are (like me) located in Germany but prefer to use the Google Developer Console in English, I encourage you to navigate to now and then try to change your language settings. I’m waiting here…

You’re back? What do you mean, it’s not possible? Turns out you’re almost right. I talked to Google support and indeed there is nothing in the UI that would allow you to switch the language. However there’s a workaround. Just append “&hl=en” to the URL and you’re set!

Visual Studio fails to connect to Xamarin Build Host

Is it one of those rainy days where you sit in front of  your Mac and would like to try out the latest and greatest Xamarin features like Xamarin.Forms and then Visual Studio refuses to connect to the Xamarin Build Host?

Xamarin Build Host

You did not change anything of course. It just stopped working over night. That’s what computers do to keep us busy. Your options: Xamarin support? Takes to long, so let’s resolve this all by ourselves.

Continue reading

Making UITextView’s size exactly fit its content on iOS7

Sometimes you might want to add a UITextView as a subview to your layout, give it a specific width, assign some textual content to it and then make the text view exactly so high that it won’t scroll.

Back in the good old days of iOS6 one would just set the Frame size to the ContentSize of the UITextView. Done. But this does not work any longer on iOS7.

Continue reading

Management of iOS provisioning profiles with Xamarin

Recently I ran into some problems with iOS provisioning profiles while using Visual Studio for Xamarin. Some profiles wouldn’t show up and in the end I got super confused and started to wonder:

  • I’m inside Visual Studio here on a Windows machine and it shows me a list of profiles. Where do they come from?
  • There is Xamarin Studio on the Mac (the build host) and it also has a list of profiles. In addition it allows me to log in to my Apple developer account.
  • And we have Xcode. Guess what: provisioning profiles there, too and also a login dialog.

In the good old days, everything related to profiles was managed in the Xcode Organizer. Then Apple decided to strip Organizer down to the bare minimum and include everything into Xcode’s preferences.

Post has been updated because of changes in Xamarin Studio

Continue reading

Xamarin, your first iOS application and the transition to Android: a Screencast for beginners

These days at school, chances are high that your first contact with programming was with C#, just like it was C, C++ or Java years before. Maybe you made some “Hello World!” application for the text console or used WPF to “design” your UI and then do something on a button’s click. That’s all fascinating but you don’t really see why you would put further effort into this. And so the basic C# knowledge sits there in the back of your head, waiting to be resurrected.


Hello, World! – I am a software developer

Continue reading