views:

29

answers:

0

Hello, i have tabs in a TabActivity that is being populated by a listview from a method in another Activity. when i click on the listview in the tab, i am trying to delete an item in the listview from onContextItemSelected and let the tab in the tabhost callback the same method in the Activity that populated the listview. please does anyone know how i can identify the tab where the action was performed from the Activity that has the listview method?

There seems to be know method like setTag() on the tabs in other to identify them. i tried this which works if i am in the TabActivity class but if i am in the other Activity, i want it to call fillAllData(). but am getting a warning from eclipse that the line is a dead code and its calling fillShopData() instead. Any ideas on how to go around this?.. i hope i have made myself clear. Thanks.

 /* code in activity class after delete is pressed in onContextItemSelected*/
    if( Categories.SHOP_TAB_TAG == 1) { // tab in categories TabActivity identified as int
        fillShopData(); // fill this data back in tab
        }else {
         fillAllData(); //  Dead Code from Activity
}