[mono-android] Implementing TabChangeListener
    John Murray 
    john at murray.gb.com
       
    Mon Jan  9 10:18:42 EST 2012
    
    
  
Dave 
I have an app which has Tabs and views 
I implemented a tabchanged method thus 
   this.TabHost.TabChanged += (IntentSender, e) =>
Tchanged(TabHost.CurrentTabView);
with 
  public void Tchanged(View currentview)
        {
           
            imm.HideSoftInputFromWindow(TabHost.ApplicationWindowToken, 0);
            switch (this.TabHost.CurrentTab)
            { 
                case 0:    //ops ta
                    if (opload == 0)
                    {
				}
		}
}
   //////////////////////   Etc etc etc 
Works for me  but I'm not sure if it's what you're looking for
I'd also be appalled if anyone followed my example  - I'm pretty much a
newbie ;-)  
John Murray 
-----Original Message-----
From: monodroid-bounces at lists.ximian.com
[mailto:monodroid-bounces at lists.ximian.com] On Behalf Of devbuzz
Sent: 09 January 2012 12:25
To: monodroid at lists.ximian.com
Subject: [mono-android] Implementing TabChangeListener
How can I implement IOnTabChangeListener?
I have a Tab where the setcontent references views not activities.
I have added the interface in the class declaration like this:
public class MainActivity2 : TabActivity,
Android.Widget.TabHost.IOnTabChangeListener
set the following:
TabHost.SetOnTabChangedListener(this);
and then attempted to override the OnTabChanged method like this:
		protected override void OnTabChanged()
		{
			
		}
I get an error stating:
MainActivity2 does not implement interface member
'Android.Widget.TabHost.IOnTabChangeListener.OnTabChanged(string)'.
'MainActivity2.OnTabChanged(string)' cannot implement an interface member
because it is not public.
I am missing something? Any help would be much appreciated.
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Implementing-TabChangeListener
-tp5131214p5131214.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid at lists.ximian.com
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
    
    
More information about the Monodroid
mailing list