Hello,
I am building an app that has a TabActivity with a TabHost that
includes 2 TabSpecs (Maps, List). When the user moves, I want to
update the items shown on the map / in the list. I built a service
that sends the relevant data (an ArrayList) onLocationChanged().
The TabActivity can use the service just fine, however, it seems not
possible to bind Activities inside of tabs to a service (http://
code.google.com/p/android/issues/detail?id=2665).
How can I access the Activities inside the tabs to update their
content from the TabActivity?
I have tried converting everything to static attributes and methods,
but have failed when non-static methods had to be called eventually.
Can I somehow refer to the instance of the class inside the tab to set
a variable in it? (coming from a Flash background this seems to make
sense)
Like:
TabSpec tspec1 = tabs.newTabSpec("map");
tspec1.setIndicator(getString(R.string.map));
tspec1.setContent(mapsintent);
tabs.addTab(tspec1);
and then to update something like:
tspec1.getContent().setMyOwnVar();
(which unfortunately does not exist)
Thanks a lot for your help!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en