开发者

android perform action on tab switch

开发者 https://www.devze.com 2023-02-03 09:43 出处:网络
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 be

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.

android perform action on tab switch

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号