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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:11:45+00:00 2026-05-26T04:11:45+00:00

I have an info tab, which should have a listview, imageview and textview. For

  • 0

I have an info tab, which should have a listview, imageview and textview. For some reason the content is not showing.
Here is the code I use to set the tab up.

tabHost.addTab(tabHost.newTabSpec("tab4")


    .setContent(R.id.layout_tab_four).setIndicator(tabname4,res.getDrawable(R.drawable.information)));

Here is the layout file:

<ViewFlipper android:id="@+id/layout_tab_four"

                android:layout_width="fill_parent" android:layout_height="fill_parent">

                <ImageView android:layout_width="wrap_content" android:id="@+id/infologo"
                    android:layout_alignParentTop="true"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentRight="true" android:layout_height="wrap_content" />
                <ListView android:layout_width="match_parent" android:id="@+id/infolistview"
                    android:layout_height="20dp" android:layout_weight="1"
                    android:layout_alignParentLeft="true" />
                <TextView android:layout_width="wrap_content" android:text="General"
                    android:id="@+id/textView1" android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentRight="true" />



            </ViewFlipper>

Thanks in advance

EDIT:

List View Code:

infoList = (ListView) findViewById(R.id.infolistview);
infoListAdapter = new ArrayAdapter(this, R.layout.item,
                this.fetchInfoList());
        infoList.setAdapter(infoListAdapter);

Fetch Info List Method:

public ArrayList<String> fetchInfoList() {
        ArrayList<String> listItems = new ArrayList<String>();



        String listItem9 = "Visit Our Website";


        listItems.add(listItem9);


        return listItems;
    }
  • 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-26T04:11:46+00:00Added an answer on May 26, 2026 at 4:11 am

    use for select your tab this (after setting the content like you did):

    tabHost.setCurrentTab(X);
    

    Where -1 < X < (numberoftabs -1) //Do you like maths? 😀

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

Sidebar

Related Questions

you have some info on an item and you got a list of comment
I have found some info on the subject ( like this link) , but
I see an application have used Log.info = some info where are these logs
datetime.datetime.utcnow() Why does this datetime not have any timezone info given that it is
Please help! Background info I have a WPF application which accesses a SQL Server
I have a custom tab control, which displays a frame inside the TabItem, and
have a really annoying time developing some code for a set of UserControls that
Fellow Overflowers, I have a tab delimited csv file which contains dates in this
i have an application which uses CoreData/.sqlite to store my data, a tab bar
does any of you have any info/idea on how can I test my application

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.