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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:23:53+00:00 2026-06-12T11:23:53+00:00

I have a tabView in android which is created as follows : Intent intentAndroid

  • 0

I have a tabView in android which is created as follows :

            Intent intentAndroid = new Intent().setClass(this, AndroidActivity.class);
        TabSpec tabSpecAndroid = tabHost.newTabSpec("Android");
        tabSpecAndroid.setIndicator("", ressources.getDrawable(R.drawable.icon_android_config));
        tabSpecAndroid.setContent(intentAndroid);

        // Apple tab
        Intent intentApple = new Intent().setClass(this, AppleActivity.class);
        TabSpec tabSpecApple = tabHost.newTabSpec("Apple");
        tabSpecApple.setIndicator("", ressources.getDrawable(R.drawable.icon_apple_config));
        tabSpecApple.setContent(intentApple); 

AppleActivity.class is as defined :

public class AppleActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.apple_layout);

        TextView textview = (TextView)findViewById(R.id.apple_textView);
        textview.setText("This is Apple tab");

    }
}

But I clicked in tab named “Apple” the String “This is Apple tab” in the TextView is not shown . What is wrong here ? Please help me with a solution . The picture is as follows :

enter image description here

But I when I clicked the others tab such as “Android” the picture is as follows :

enter image description here

Why the textView in android tab is working wee and why not in Apple tab ?

The alyout for AppleLayout.xml is as follows :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

    <ListView
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      android:id="@+id/listView1">
    </ListView>

    <TextView
      android:text="TextView"
      android:id="@+id/apple_textView"
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content">
    </TextView>

</LinearLayout>
  • 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-12T11:23:54+00:00Added an answer on June 12, 2026 at 11:23 am

    add android:orientation=”vertical” to LinearLayout. It looks that default is horizontal so your text is at right but not visible because list matches parent.
    Or just try put textview above listview to see if it will be visible

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

Sidebar

Related Questions

have written this little class, which generates a UUID every time an object of
I have a class which extends Application in an Android tabHost app. In the
I have one tabview which contain two different tab(subject and chapter) and i need
I have a customized TabView which displays a ListActivity , but everytime I click
I have a TabView in android. The first tab has an Image and a
i need to implement this layout in android..the view must be have two list
I currently have a tabview with 3 tabs. 1 tab loads an ActivityGroup which
I have a tabview in my android app with 3 tabs. The tabs are
In my app initially I created one class abc.java which extends Activity and do
I have created a new Xcode project using Storyboards (tab view template). I added

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.