Using Tabs Inside a Layout in Mono for Android

In recent months I’ve had the opportunity to play with Mono for Android from the guys at Xamarin studio, and I have to say that I’m a big fan. It removes a lot of the pain I had felt when playing around with the Android sdk using Java years ago, and it makes cross-platform developement a reality.

While using theFancy app on my Nexus 7, I was curious as to how they were able to fit together a tabhost within what appeared to me as a LinearLayout. Here’s might be how.

Let’s say I have a simple layout with an ImageView, a TextView and the TabHost:

My activity class would look something like this

Voila!

Advertisements
Using Tabs Inside a Layout in Mono for Android

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s