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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:25:04+00:00 2026-05-25T20:25:04+00:00

I was developed android application. More over i have completed, but i want to

  • 0

I was developed android application. More over i have completed, but i want to minimize option. I have used tab bar. In that i want to minimize tab. When user click minimize tab to minimize whole application.
my tabbar code as..

    public class tabbar extends TabActivity implements OnTabChangeListener {
    private Context mContext;
    TabHost tabHost;
    int tabload=0;
    private AlertDialog alertDialog;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tabbar);
        //mContext=this;

        /** TabHost will have Tabs */
        tabHost = (TabHost)findViewById(android.R.id.tabhost);
        tabHost.setOnTabChangedListener(this);



        /** TabSpec used to create a new tab.
         * By using TabSpec only we can able to setContent to the tab.
         * By using TabSpec setIndicator() we can set name to tab. */

        /** tid1 is firstTabSpec Id. Its used to access outside. */
        TabSpec firstTabSpec = tabHost.newTabSpec("tab_id1");
        TabSpec secondTabSpec = tabHost.newTabSpec("tab_id2");
        TabSpec thirdTabSpec = tabHost.newTabSpec("tab_id3");


        /** TabSpec setIndicator() is used to set name for the tab. */
        /** TabSpec setContent() is used to set content for a particular tab. */
        firstTabSpec.setIndicator("FRIENDS").setContent(new Intent(this,view_friends.class));
        secondTabSpec.setIndicator("GROUPS").setContent(new Intent(this,groups.class));
        thirdTabSpec.setIndicator("SIGN OUT").setContent(new Intent(this,signout.class));


        /** Add tabSpec to the TabHost to display. */
        tabHost.addTab(firstTabSpec);
        tabHost.addTab(secondTabSpec);
        tabHost.addTab(thirdTabSpec);



    }



        @Override
        public void onTabChanged(String tabId) {
        // TODO Auto-generated method stub

         for(int i=0;i<tabHost.getTabWidget().getChildCount();i++)
            {
                     tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.parseColor("#343333")); //unselected
            }
                      tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab()).setBackgroundColor(Color.parseColor("#f1a026"));     // selected
    //         if(tabId.equals("tab_id1")){
    //             LocalActivityManager manager = getLocalActivityManager();
    //             manager.destroyActivity("tab_id1", true);
    //             manager.startActivity("tab_id1", new Intent(this, view_friends.class));
    //         }

    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        tabHost.setCurrentTab(2);
        System.gc();
    }


}

In this code if any correction need please help…

give me a sample code..

  • 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-25T20:25:04+00:00Added an answer on May 25, 2026 at 8:25 pm

    I’m not sure what you mean by minimize. If you want to hide your app and present the user with the homescreen you can use the following intent.

    Intent startMain = new Intent(Intent.ACTION_MAIN);
    startMain.addCategory(Intent.CATEGORY_HOME);
    startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(startMain);
    

    Although the Home button is more than sufficient if a user wants to hide your app

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

Sidebar

Related Questions

I have developed an Android application that has 1 process and 2 services. But
I have developed an Android application targeting Android 2.2 now I want to make
I have developed an application on android.I have used Map overlay class in application.When
Hey i have developed android application . Now at this stage i want to
I developed one simple android application targeting the Mobiles with android 2.0 OS.I want
I have developed the Hello World Android application using Eclipse. I can run the
I have developed a file parsing application on the android platform. How do I
I have two android applications that I have developed. I need to compare the
I developed an android application ( https://market.android.com/details?id=hr.cloudwalk.vg ) that uses Foursquare API and I
I have developed one application in android and now I wish to add one

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.