I have a TabActivity with a tab, which shows a list. I'd like to display a WebView whenever a list item is clicked. I tried calling listSpec.setContent(R.id.details); but it would not find the resource.
Any clues what I am doing wrong?
UPDATE: I found the following clue from Mark in the mailing list
You don't change the View inside of a tab. You cause the existing View to show something else (e.g., use FrameLayout and make one layer VISIBLE and another layer GONE, or use ViewFlipper to swap between contents).
You might be able to get setContent() to replace the current View by passing in another layout ID or TabContentFactory, but I'm skeptical this will work.
The tab widget framework in Android is designed for simple stuff. You may wish to grab the source code for the relevant classes out of Android and make your own version that handles your own scenario.
-- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy