hello C# developers,
I have problems with a "TabHost" control. I try to run this code, but I cant. I've read the "tabhost" documentation in this link but the problem persist. please help, what I doing wrong?
Somebody have the example "TabHostWalkthrough.zip"? because the link is broke. Thank you.
My code:
protected override void OnCreate(Bundle bundle):
base.OnCreate(bundle);
// Create your application here
SetContentView(Resource.Layout.frmDevice);
CrearTab(typeof(tabDeviceProperties), "properties", "Properties");
private void CrearTab(Type activityType, string tag, string label):
var intent = new Intent(this, activityType);
intent.AddFlags(ActivityFlags.NewTask);
var tab = FindViewById<TabHost>(Resource.Id.tabHost1);
var spec = tab.NewTabSpec(tag);
spec.SetIndicator(label);
spec.SetContent(intent);
tab.AddTab(spec);