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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:18:47+00:00 2026-05-25T11:18:47+00:00

I am new to android field. i am developing restaurant menu application, i have

  • 0

I am new to android field. i am developing restaurant menu application, i have created list view which shows names of items in restaurant. when i select any one item in list view it will launch another activity, it contains text view field showing detail description of selected item. similarly when i select other items, it should launch same activity but data should be of that selected item, how to achieve this ? if i use sqlite database for data source.

  • 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-25T11:18:47+00:00Added an answer on May 25, 2026 at 11:18 am

    You need to pass the values onItemClick:

    Intent intent = new Intent(context, CalledActivity.class);
            intent.putExtra(key, value);
            startActivity(intent);
    

    If you want some data back from called Activity then you can use startActivityForResult() as:

    Intent intent = new Intent(context, CalledActivity.class);
            intent.putExtra(key, value);
            startActivityForResult(intent, requestCode);
    

    In called activity you can set data as:

    setResult(RESULT_OK, intent);
    

    Note: Here you set the value in intent and pass it to setResult().

    On returning back to calling Activity you can get data by overriding:

    @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
            if(resultCode == RESULT_OK){
                //Get data from Intent "data" and do your task here....
            }
        }
    

    Note: You can pass primitive data type values thru Intent and if you want to pass other types then you have to use Bundle like this.

    Bundle data = new Bundle();
            data.putIntArray(key, value);
    
    //same way you can set other values.......
    //Now set this Bundle value to Intent as you do for primitive type....
    
    Intent intent = new Intent(context, CalledActivity.class);
            intent.putExtra(data);
            startActivity(intent);
    

    Receiving data in Activity:

    //For primitive values:
    DataType var_name = getIntent().getExtras().get(key);
    
    //For Bundle values:
    Bundle var_name = getIntent().getExtras().getBundle(key);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing one Android application having the list view of items. Those listview
I am new to android, I have a code in which I have placed
I am developing for a tablet using Android 2.2. I have a form which
I am new in this field. I am working on Android application development. I
I am completely new to android, and pretty much a Java newb. I have
i'm new at Android world, and i have a doubt, is there any method
Good evening. I'm developing an android application that uses Facebook SDK. I've no problem
I created a field of buttons in my XML file: <RelativeLayout...> <Button android:id=@+id/button_1 ...
I am new to android development and now i am developing an e commerce
I am new starter android. I have simple question. When I choose date through

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.