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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:04:03+00:00 2026-05-17T23:04:03+00:00

I am on my first Android application and I am on a timeline so

  • 0

I am on my first Android application and I am on a timeline so details and examples will be useful since my knowledge is still minimal.

I want my first screen to present the user with a list of activities to choose from. In my situation it is a recipe app where the user first chooses the type of food, such as, Beef, Chicken, or Pork. I want the application to launch an activity depending on the list item that the user clicked on.

I am not sure if I should use a list view, a text view, a scroll view, a list activity, an activity group… I need help please.

Thank you 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-17T23:04:03+00:00Added an answer on May 17, 2026 at 11:04 pm

    I would suggest you use a ListActivity as your base class. As your class extends ListActivity you can use the event onListItemClick() to interpret the item the user clicks on and launch the appropriate intent.

    You can bind your list to an Array of your foods. There are plenty of examples to be found how to construct the activity, just google for ‘listactivity’

    I was about to reply to your other post on using the arrays but it seems to have now disappeared.. so my reply to that post is below also

    Create a second array that contains just your activity class names, So where you have

    <string-array name="food_array">
        <item> Beef</item>
        <item>Chicken</item>
        <item>Fish</item>
        <item>Pork</item>
    </string-array>
    

    Also have a mirroring array that you can access e.g.

    <string-array name="food_array_activities">
        <item>BeefActivity.class</item>
        <item>ChickenActivity.class</item>
        <item>FishActivity.class</item>
        <item>PorkActivity.class</item>
    </string-array>
    

    as your onItemClick gives you the position in the list that was clicked you can directly reference the second array to determine the activity name you should use.

    Rgds

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

Sidebar

Related Questions

I'm developing my first Android application, and I'd like to create a settings screen.
I am working on a fairly basic screen layout for my first Android application
I'm creating my first android application but it does not start at all. In
I'm writing my first Android application and trying to get my head around communication
i have completed my First android application and i have deployed that application to
I'm developing my first Android application and it is based partly on displaying some
I am trying to design my first Android application with the use of GPS.
As a goal for my first Android application to learn the Android SDK, I
I am currently developing my first Android application by reading Dev Documentation at Android
I have just started working on my first Android application and am going ok.

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.