예 가능합니다. TabActivity
의 하위 활동에 액세스 할 수 있습니다. 당신은 이런 식으로 같은 현재 활성 Activity
를 얻을 수 있습니다 :
새로 고침 또는 하위 활동 내용을 변경하기 위해
onClick()
에
doSomeAction()
를 호출하는 곳
TabActivity
에서 당신이
Button
(
TabIndicators
에 비해 일반적으로 다른)가 말한다. 이렇게하면됩니다 :
//this method is in TabActivity
public void doSomeAction(View button)
{
Activity currentAct = this.getLocalActivityManager().getCurrentActivity();
int index = getTabHost().getCurrentTab();
if(index == 0)
{
MyListAct listAct = (MyListAct)currentAct; //MyListAct or any other Sub Activity
listAct.refreshList(); // refreshList() may be a method to refresh Activity
}
//else you can check for the other Activity
}
현재 활성 탭을 확인할 수 없다는 문제가 있습니까? 또는 데이터를 전혀 교환 할 수 없습니까? – superM