Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 453005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:07:44+00:00 2026-05-12T22:07:44+00:00

I have a TabActivity with a tab, which shows a list. I’d like to

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:07:45+00:00Added an answer on May 12, 2026 at 10:07 pm

    I don’t know if I’d trust the guy you got your update from. He’s…he’s…he’s…he’s balding!

    😉

    The most common pattern on Android is for clicking a list item to bring up another activity. If for some reason you don’t want that, then the advice I gave in your update is still valid — you can achieve your effect by hiding the ListView and showing the WebView by one means or another.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is, that I have got a TabActivity, which has 4 Tabs right
I have a TabActivity with several tabs. Each tab corresponds to a specific view,
In android, I have a TabActivity with 2 tabs and each tab has it
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
Here's the problem. In my app, I have 5 tabs which contains activities. In
I have an android activity in which I'm using tabs. public class UnitActivity extends
As per the android developer docs for creating tab UI you need to have
i have an application that has a tabActivity and 3 tabs. all off the
I have a normal notification system that looks like this: Notification notification new Notification(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.