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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:56:43+00:00 2026-05-24T07:56:43+00:00

I’m trying to write a little Android application to store recipes as practice. To

  • 0

I’m trying to write a little Android application to store recipes as practice. To add a new recipe, I’m trying to use tabs. There are three tabs,

  1. Ingredients
  2. Steps
  3. Media

I’d like “Ingredients” to have a ListView, “Steps” to have a ListView, and “Media” to have a gallery of images. I’m going to add new ingredients, steps, and media through some option in the options menu. When finished, I’d like to write everything to an SQLite database.

I’m wondering if I should use different activities or just different views for each tab?

If I use different activities, would it be hard to pass information between the activities?

If I use different views, do the views all have to be part of the same layout file? For example, the tutorial on TabWidgets does the following:

<FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TextView 
            android:id="@+id/textview1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:text="this is a tab" />
        <TextView 
            android:id="@+id/textview2"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:text="this is another tab" />
        <TextView 
            android:id="@+id/textview3"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:text="this is a third tab" />
</FrameLayout>

So all the TextViews are within the same FrameLayout, with each TextView being used for only one tab. I think this would be a little confusing if the views were more complex, e.g. something nested within something else, which is again nested within something else. Using different activities for each tab, I can specify a different layout file for each tab.

  • 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-24T07:56:44+00:00Added an answer on May 24, 2026 at 7:56 am

    I’m wondering if I should use different activities or just different views for each tab?

    Using Activities as Tab content has been deprecated. You can still do it but if you’re just starting out with this project then using Views instead would be a better approach.

    If I use different activities, would it be hard to pass information between the activities?

    Yes and no, but it depends on your level of expertise – passing information between Activities generally involves using Intents (although there are other ways). Although this is the same whether they’re stand-alone or part of a tabbed environment doesn’t make any difference but it does take some thinking about.

    If I use different views, do the views all have to be part of the same layout file?

    No but you might want to experiment with the approach in that tutorial when using a TabActivity to get started.

    It’s possible to have different layouts (for any type of Activity) and inflate them yourself as necessary but that’s a more complex topic.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put

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.