public View createTabContent(String tag) { SfsContentView view = null; if (mTaskVisitEntity != null) { if (tag == TABS_TAG_TASK) { view = new VisitTypeTab(getContext(), mTaskVisitEntity); } else if (tag == TABS_TAG_TARGET) { view = new VisitTargetTab(getContext(), mTaskVisitEntity); } else if (tag == TABS_TAG_ORDERS) { view = new OrdersView(getContext(), true); } else if (tag == TABS_TAG_STORECHECK) { view = new GoldenMeasureView(getContext(), true); } else if (tag == TABS_TAG_TPR) { view = new TprMeasuresView(getContext(), true); } else if (tag == TABS_TAG_PAYMENT) { view = new BalanceView(getContext()); } else if (tag == TABS_TAG_OUTLET) { view = new OutletView(getContext(), mTaskVisitEntity.Outlet.Id); } if (view != null) { view.inflate(); _tabs.put(tag, view); } refresh(); } return view; }
@Override public void refresh() { View v = mTabHost.getCurrentView(); if (v instanceof SfsContentView) { ((SfsContentView) v).refresh(); } }
public void refreshTab(String tag) { SfsContentView v = _tabs.get(tag); if (v != null) { v.refresh(); } }