android perform action on tab switch
I have got an application which create free sms alerts in one tab and show list of alerts on second tab. List of alerts is fetched from server onc开发者_Python百科e I click refresh button see image below.
What I want to do is that once I create alert in tab 1 then when I switch to tab 2, refresh button is automatically clicked or some technique which allow me to call particular function once tab is switched to 2nd tab. Each tab have separate Activity class and my refresh function is written in activity for 2nd tab.
You should use TabHost.OnTabChangeListener
精彩评论