[mono-android] Implementing TabChangeListener

devbuzz derek at fieldmetrix.com
Mon Jan 9 07:45:41 EST 2012


Thanks Greg!

For anyone else looking for this here are the pertinent steps:

1) implement the interface on your activity

	public class MainActivity2 : TabActivity,
Android.Widget.TabHost.IOnTabChangeListener

2) important: set the OnTabChangeListener

	TabHost.SetOnTabChangedListener(this);

3) implement the correct method signature as per Greg's info:

	public void OnTabChanged(string tabID)
	{
		Toast.MakeText(this, tabID, ToastLength.Short).Show();
	}

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Implementing-TabChangeListener-tp5131214p5131241.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list