Monday, 15 March 2010

android activity - Get activities instances which are hosted within TabHost -



android activity - Get activities instances which are hosted within TabHost -

i want place activities within tabhost tabs , access them later.

protected override void oncreate(bundle bundle) { base.oncreate(bundle); setcontentview(resource.layout.firstview); tabhost.tabspec spec; sspec = tabhost.newtabspec ("tab1"); spec.setindicator ("tab1"); spec.setcontent (new intent (this, typeof(liveview))); tabhost.addtab (spec); spec = tabhost.newtabspec ("tab2"); spec.setindicator ("tab2"); spec.setcontent (new intent (this, typeof(detailsview))); tabhost.addtab (spec); } public void show(fragment frag) { var activityfromtab = ... // activity tab widget }

any ideas?

i've solved using

tabrootview currentrootview = (tabrootview)this.localactivitymanager.getactivity (currentroottag);

i add together clid's intent tabhost of parent activity , mark intent tag (string constant). utilize tag , localactivitymanager property of parent fing target.

android-activity monodroid

No comments:

Post a Comment