0

I am using a TabWidget that contains 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

Taz
  • 1
  • 2
  • Could you be more specific, you have a TabWidget with how many tabs, is the webview in supposed to be in a tab? Is the webview supposed to be in the same tab as the list, or does it open in another tab when a list item is selected? It would be nice if you provided some code. – sgarman Jun 02 '10 at 19:28
  • Is perhaps the solution to float the WebView in the area that the Expandable List takes up? If so, how would you get the area of the screen excluding the tabs? Also how do you define the size and location of the WebView? – Taz Jun 03 '10 at 09:34

1 Answers1

0

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) {

}

Community
  • 1
  • 1
Taz
  • 1
  • 1