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 8167515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:12:57+00:00 2026-06-06T20:12:57+00:00

I have a TabInterface.java which hosts five tabs. In one of the tab, I

  • 0

I have a TabInterface.java which hosts five tabs.
In one of the tab, I am using subactivities.When I click on the AddBook tab (which extends ActivityGroup) the search book page loads properly. When I click on search button a list of books is generated. When I click on the book, a new page must open but its program is running properly but not displaying any thing on the screen.

TabInterface.java

public class TabInterface extends TabActivity
{
  super.onCreate(savedInstanceState);
  setContentView(R.layout.tablayout);
  Resources res = getResources();
  TabHost tabHost = getTabHost();
  LocalActivityManager mlam = new LocalActivityManager(this, false);
  mlam.dispatchCreate(savedInstanceState);
  ............................................
  intent = new Intent().setClass(this, AddBook.class);
  spec = tabHost.newTabSpec("AddBook").setIndicator("Add Book", res.getDrawable(R.drawable.tab_icons)).setContent(intent);
  tabHost.addTab(spec);
  ..............................................`   

AddBook.java

...........
Intent i = new Intent(this.getBaseContext(), BookList.class);
replaceContentView("blist", i, getApplicationContext());
........
public void replaceContentView(String id, Intent newIntent, Context c)
{
  View view = getLocalActivityManager().startActivity(id, newIntent.addFlags(Intent.FLAG_ACTIVITY_CLE AR_TOP)).getDecorView();
  this.setContentView(view);
}
..........

BookList.java

 ......................

 private class BookAdapter extends ArrayAdapter < Books > //my custom adater
 ...................
 public View getView(final int position, View convertView, ViewGroup parent)
 ...................

 //in getView function
 v.setOnClickListener(new View.OnClickListener()
 {
   public void onClick(View v)
   {
     Intent k = new Intent(getBaseContext(), BookNew.class);
     AddBook ab = (AddBook) getParent();
     ab.replaceContentView("bnew", k, getApplicationContext());
   }
 }

 ................... 

The third sub activity BookNew.java is running properly but the output is not getting displayed. It works fine when displayed without tabs. May I know where I am wrong?

  • 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-06T20:12:59+00:00Added an answer on June 6, 2026 at 8:12 pm

    Strange No one could answer my question.
    After spending around 5-6 days i cam to a solution.
    The reason why it was not displaying because I have used notfyDataSetChanged() so it was not drawing the next fragment.

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

Sidebar

Related Questions

Have deployed numerous report parts which reference the same view however one of them
Have a simple one-off tasks which needs a progress bar. OpenSSL has a useful
Have any one tried to activate fancybox thumbnail gallery using a button or an
I have a page that is set up using a tab interface. When a
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have created a custom Magento module which extends the core sales order functionality
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
we have a delphi application which contains a TXTextControl (v. 13.0). This application uses
Have some code: using (var ctx = new testDataContext()) { var options = new

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.