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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:35:23+00:00 2026-05-29T18:35:23+00:00

I trying to get the tabview app to work, its working fine in the

  • 0

I trying to get the tabview app to work, its working fine in the eclipse emulator, but when trying to install in the device its creating four application each of different activity, that is used in the tab application, did this kind of problem ever occurred to anyone.

some of the code from main activity:

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res = getResources(); // Resource object to get Drawables   
TabHost tabHost = getTabHost(); // The activity TabHost   
TabHost.TabSpec spec;  // Reusable TabSpec for each tab  
Intent intent; // Reusable Intent for each tab   
// Create an Intent to launch an Activity for the tab (to be reused)   
intent = new Intent().setClass(this, ArtistActivity.class);   
spec = tabHost.newTabSpec("main").setIndicator("Main", res.getDrawable(R.drawable.ic_tab_main)).setContent(intent);   
tabHost.addTab(spec);    
intent = new Intent().setClass(this, AlbumActivity.class);   
spec = tabHost.newTabSpec("camera").setIndicator("Camera", res.getDrawable(R.drawable.ic_tab_camera)).setContent(intent);   
tabHost.addTab(spec);   
intent = new Intent().setClass(this, SongsActivity.class);   
spec = tabHost.newTabSpec("livemap").setIndicator("Live Map", res.getDrawable(R.drawable.ic_tab_livemap)).setContent(intent);   
tabHost.addTab(spec);   
tabHost.setCurrentTab(0);

xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.tablayout.testing"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
   <application android:icon="@drawable/ic_launcher" android:label="@string/app_name">
        <activity android:name=".TabLayoutDemoActivity"
                   android:theme="@android:style/Theme.NoTitleBar"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
              <activity android:name=".mainActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".cameraActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".mapActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
  • 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-29T18:35:25+00:00Added an answer on May 29, 2026 at 6:35 pm

    I am sure there is an issue (not an issue, but a mistake) inside the AndroidManifest.xml file. Mistake is that you have defined all 4 activity as a Launcher activity, instead of that you just have to define only one activity as a Launcher activity.

    For example:

    <activity android:name=".MainActivity">
    
              <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
       </activity>
    

    And remove MAIN and LAUNCHER from other activities.

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

Sidebar

Related Questions

I'm trying get some licensing code from AndroidPit.com working, but I get Unable to
Trying to get an ASP application deployed; it worked for a while but then
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
Trying to get a JSON output to work with jqGrid 'userdata' option. The example
Hi am trying get GPS using network provider and GPS provider. but am getting
I'm trying get only the Saturdays and Sundays between two dates, but I don't
I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES.
Im trying get all my maingroups with its related entities. And i would also
I am trying get Javascript popup calendar control to work which doesnt work. I

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.