Payday Loan Payday Loan

How to switch tabs from within an Activity

Here is a simple and efficient mode to switch tabs from inside a Activity that is in a tab.

//this code need to be inserted in your Activity from where you want to switch tab
//MyTabActivity is your class that extends TabActivity
MyTabActivity myTabActivity = (MyTabActivity) this.getParent();
TabHost tabHost = myTabActivity.getTabHost();
tabHost.setCurrentTab(0); //0 may be any tab you want to set
||||| 0 I Like It! |||||

One Response so far.

  1. harsha says:

    add the events to particular date and time selected by the date and time pickers and save in to database.

    After fetch the date and time from data base and how can i raise alaram manager for particular all dates and times.

    Please help me……


Search

Popular

Sponsors