I am making a chat applic开发者_JS百科ation. Where i am using tabhost. I have a activity A to show the frndlist and activity B for chat window. Now when an entry in the frndlist clicked a tabwindow opens where i add tab dynamically using the intent of activity B. Now if there are more than one tab when i nevigate through those tab nothing get called(oncreate, onpause,onresume) and the containt remain same for all tabs. Only one instance of activity B is created.
Is there any idea to create chat application with tab(like yahoo mail chat).
thanks in advance Please help Rawcoder
Create this class too in your TabActivity
class PreExistingViewFactory implements TabContentFactory {
private final View preExisting;
protected PreExistingViewFactory(View view) {
preExisting = view;
}
public View createTabContent(String tag) {
return preExisting;
}
}
This works for me.
精彩评论