Android - show webview in same tab containing a list
I am using a TabWidget that contai开发者_如何学运维ns a List in one tab. What I want to do is when a user selects an item, a webview is shown in that tab.
If the user then wants to go back to the list, they would click on the list tab.
I can get the webview up that replaces the whole tabwidget but don't know how to leave the tabs and show a webview.
Any help greatly appreciated
The trick is to use ActivityGroup!
Launching activities within a tab in Android
The fun bit then becomes how to be able to disable the original view in the tab....
This can be done by adding a OnClickListener for the partciular tab
getTabWidget().getChildAt().setOnClickListener(new OnClickListener() {
public void onClick(View v) {
}
精彩评论