title: Controlling tabs from java code
body: <p>I have a project with 4tabs in it. All four tabs are within the activity_main xml file. The MainActivity Java file uses the tabhost to set the content of the tabs. One of my tabs has a list view and the other a map. Do I carry out all these events(loading the map,setting the list view) in the MainActivity class or I can implement a class for each layout so that the class is called when the focus changes to that tab? Kind of a newbie need some serious help. Not very familiar with tabs as well. Thanx. Dont know what sample code to attach as I havent tried much except implement some things in a different class and that never worked.</p>