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

  • SEARCH
  • Home
  • 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 8419837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:43:30+00:00 2026-06-10T02:43:30+00:00

I have a TabView with multiple layouts in each view. I thought I could

  • 0

I have a TabView with multiple layouts in each view. I thought I could just copy my layout XML file (foo.xml), rename it (bar.xml), and use the new layout (bar.xml) in a new Class. eg: Tab1 is foo.java which does a setContentView (R.layout.foo) and Tab2 is bar.java doing a setContentView (R.layout.bar).

This seems to be a problem though, because when I change the text of a button in Tab1, it seems to change it in Tab2 as well. I was expecting each class to be limited to only the widgets contained in the xml implemented in setContentView(). Is the scope of the widget ID really this broad?

  • 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-06-10T02:43:32+00:00Added an answer on June 10, 2026 at 2:43 am

    No the scope isn’t that broad. If you have an element with id “fizz” in foo.xml you cannot get a handle to the element fizz from your activity unless you’re setting the contentview to foo.xml in that same activity.

    When creating the TabView, are you sure you’re not adding Tab1 twice?

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

Sidebar

Related Questions

I have a Tabview with 3 tabs (each having their own activity). I have
I have tabview based project. how can I make a view connected to a
I have a view which contains some tabs (TabView). Initially some tabs are disabled
I have one tabview which contain two different tab(subject and chapter) and i need
I have a flash app embedded in a yui TabView tab div, the problem
I have a UITableView that I am placing inside a TabView. I am trying
I have a tab view which has a listview in one of these tabs.
I am using jQuery UI 's tab view. I have included my HTML below,
Have deployed numerous report parts which reference the same view however one of them
I have a situation where I must copy one NSManagedObject from the main context

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.