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

  • Home
  • SEARCH
  • 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 8997883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:56:57+00:00 2026-06-15T23:56:57+00:00

I am getting started with android and want to have an application that has

  • 0

I am getting started with android and want to have an application that has several tabs. I want to use the actionbar with the SherlockActionBar library to support devices running pre honeycomb versions of android. I have seen so many examples of creating and using tabs that I have no idea now what is the best or preferred method of doing so.

I have read that the best way is to have a fragment for each tab and have one activity which controls the switching of fragments in an out as well as coordinating communication between fragments. If this is the proper way of handling tabs is it best to have each fragments layout defined in its own layout.xml.

It seems that when an button is clicked that is defined in a fragments layout the onclick is triggered in the parent activity. If the best way to handle that to do the processing in the parent activity or to pass the event on to the correct fragment for processing.

In summary I want to know what the best practice is for creating an app with actionbar tabs, where the code should be and how the layouts should be separated.

Thank You,
Nathan

  • 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-15T23:56:58+00:00Added an answer on June 15, 2026 at 11:56 pm

    You are in the right direction from what I can read. Google has a lot of the best material on this subject. Also look at Googles apps for reference, the Play app features simple tab navigation and defines how we should and should not try to make tabs. One very important lesson is that we should only have 1 fragment in each tab and we shouldn’t try to make back navigation inside tabs (though it is possible by hacking a little).

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

Sidebar

Related Questions

I have just started Android Development, I want to make thread in my application
I have just started with android in Eclipse and now i want to do
I just started with Android and I'm doing a simple app that I want
I'm just getting started with android programming, and want to see if there is
I want to use SmartThreadPool in a Mono for Android Application. Unfortunatley I am
I'm just getting started with adding admob to my android app and have started
Im getting started with android development and i have a few questions about supporting
I'm getting started with Android development, and I would like to have an interface
I am just getting started developing my first Android app, and one function that
I have started to working with phoneGap application for android. I followed the steps

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.