onCreate method not getting called
I have following method inside a ActionBar.TabListener method and when I
am calling the setContentView I am expecting it to call onCreate method
for that view: But that method is not called here.
so, how can I create an activity outside of the onCreate method?
public void onTabSelected(Tab tab, FragmentTransaction arg1) {
int tabPosition = tab.getPosition();
switch (tabPosition) {
case 0:
setContentView(R.layout.class_view);
break;
case 1:
setContentView(R.layout.detail_view);
break;
case 2:
setContentView(R.layout.class_view);
break;
}
}
No comments:
Post a Comment