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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:34:46+00:00 2026-05-29T06:34:46+00:00

I would like to use tabs in my Android application and since TabActivity is

  • 0

I would like to use tabs in my Android application and since TabActivity is deprecated, I want to do it the Fragment way.

I already constructed the skeleton of the app, and I have 3 tabs, and each the tab has its own seperate Fragment.

My questions are:

  1. I ended up having 1 Activity for the whole app and a lot of fragments. Is this normal?
  2. In the fragments I have buttons. Each onClick method of these buttons expect to has its handler in the Activity. I’ve found this post: Handling onClick events with fragments. Seriously?? The Activity will catch all the onclick’s events from all the fragments and call the appropriate method of the relevant fragment?? Can’t I handle the onclick event of a button that located inside a fragment in the fragment’s code?? If I can’t, Google should get some spanks!

Thanks in advance!

  • 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-29T06:34:47+00:00Added an answer on May 29, 2026 at 6:34 am

    The answer to question number 2 is to implement onClick in the code of the Fragment… No way of doing this in the XML?

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

Sidebar

Related Questions

In my Android Honeycomb application I use Tabs as the navigation style. I would
I use tabs for indentation in my python programs, but I would like to
I am using AdoNetAppender (SQL server) in my asp.net application and would like use
I would like to use my existing Jquery UI tabs to shoot my users
I would like to use spaces instead of tabs when editing Perl scripts with
I would like to use the JQuery UI tabs in my Django app but
I would like to use sed to replace newlines, tabs, quotes and backslashes in
I would like to use jQuery UI tabs but I need the tabs aligned
I would like to implement Aero Peek of tabs in my desktop application (as
I'm trying to implement tabs for navigation in an Android app. Since TabActivity and

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.