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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:29:11+00:00 2026-05-27T04:29:11+00:00

im a noob so please give detailed answers:) This is the class for get

  • 0

im a noob so please give detailed answers:)

This is the class for get extra wherein i want to display the string

package kfc.project;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class productdetail extends Activity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.productdetail);

        Intent intent = getIntent();
        String str = intent.getStringExtra("name");

    }




}

This is where i want the string to be displayed

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  android:scrollbarAlwaysDrawVerticalTrack="true"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="wrap_content" android:gravity="top|center"
  android:background="@drawable/bg">

    <TableLayout
        android:id="@+id/tableLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" 
        >

        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >


        </TableRow>

        <TableRow
            android:id="@+id/tableRow2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:gravity="right">

            <Button
                android:id="@+id/button1"      
                android:background="@drawable/button2"
                android:textColor="#FFFFFF"   
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:text="ADD TO MENU" android:gravity="right" android:paddingRight="4sp" android:paddingTop="10sp"/>

            <Button
                android:id="@+id/button2"
                android:background="@drawable/button2"
                android:textColor="#FFFFFF"   
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:text="GET TOTAL" android:gravity="right" android:paddingRight="15sp" android:paddingTop="10sp"/>

        </TableRow>

        <TableRow
            android:id="@+id/tableRow4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Serving Size: "
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="100"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>
          <ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@android:drawable/divider_horizontal_dark"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scaleType="fitXY"
    android:paddingLeft="5dp"
    android:paddingRight="5dp"
    android:paddingBottom="2dp"
    android:paddingTop="2dp" />

    </TableLayout>

    <TableRow
        android:id="@+id/tableRow3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:gravity="left">

    </TableRow>

    <TableLayout
        android:id="@+id/tableLayout2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <TableRow
            android:id="@+id/tableRow5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

        </TableRow>

        <TableRow
            android:id="@+id/tableRow6"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="left"
                android:text="Amount Per Serving: "
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView7"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="20"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow7"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView5"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Calories:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView17"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="30"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@android:drawable/divider_horizontal_dark"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scaleType="fitXY"
    android:paddingLeft="5dp"
    android:paddingRight="5dp"
    android:paddingBottom="2dp"
    android:paddingTop="2dp" />

        <TableRow
            android:id="@+id/tableRow8"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TableRow
                android:id="@+id/tableRow14"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >

                <TextView
                    android:id="@+id/textView3"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="right"
                    android:text="% Daily Value:          "
                    android:textAppearance="?android:attr/textAppearanceMedium" />

                <TextView
                    android:id="@+id/textView21"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="35"
                    android:textAppearance="?android:attr/textAppearanceMedium" />
            </TableRow>
        </TableRow>

    </TableLayout>

    <TableLayout
        android:id="@+id/tableLayout3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <TableRow
            android:id="@+id/tableRow9"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView8"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Total Fat:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView22"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="60"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow10"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView9"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="       Saturated Fat:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView23"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="34"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow11"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView10"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="       Trans Fat:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView24"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="53"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow12"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView11"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Cholesterol:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView25"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="25"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow13"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView12"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Sodium:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView26"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="10"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow15"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView13"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Total Carbohydrate:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView27"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="200"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow16"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView14"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="       Dietary Fiber:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView28"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="34"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow17"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView15"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="       Sugars:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView29"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="16"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow18"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView16"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Protein:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView30"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="40"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>
<ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@android:drawable/divider_horizontal_dark"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scaleType="fitXY"
    android:paddingLeft="5dp"
    android:paddingRight="5dp"
    android:paddingBottom="2dp"
    android:paddingTop="2dp" />
<TableRow
    android:id="@+id/tableRow24"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >
</TableRow>

        <TableRow
            android:id="@+id/tableRow19"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

        </TableRow>

    </TableLayout>

    <TableLayout
        android:id="@+id/tableLayout4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <TableRow
            android:id="@+id/tableRow20"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

        </TableRow>

        <TableRow
            android:id="@+id/tableRow21"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

        </TableRow>

        <TableRow
            android:id="@+id/tableRow22"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView19"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Vitamin A: "
                android:textAppearance="?android:attr/textAppearanceMedium" />
                        <TextView
                android:id="@+id/textView31"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="40"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView20"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="   Vitamin C: "
                android:textAppearance="?android:attr/textAppearanceMedium" />
                        <TextView
                android:id="@+id/textView32"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="30"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow23"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView6"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Calcium: "
                android:textAppearance="?android:attr/textAppearanceMedium" />
                        <TextView
                android:id="@+id/textView33"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="35"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@+id/textView18"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="   Iron: "
                android:textAppearance="?android:attr/textAppearanceMedium" />
                        <TextView
                android:id="@+id/textView34"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="40"
                android:textAppearance="?android:attr/textAppearanceMedium" />

        </TableRow>

        <TableRow
            android:id="@+id/tableRow25"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

        </TableRow>

    </TableLayout>

</LinearLayout>

thank you your answers will be much appreciated

  • 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-27T04:29:12+00:00Added an answer on May 27, 2026 at 4:29 am

    Depending on where you want it to be displayed, you will need to do this at runtime.

    //Assign textview and call it tv
    TextView tv = (TextView)findViewById(R.id.textView1);
    
    
    Intent intent = getIntent();
        String str = intent.getStringExtra("name");
    
    //set tv text to str
    tv.setText(str);
    

    Hope that helps

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

Sidebar

Related Questions

Please forgive my noob-ness on this, but how do I package LAME.exe w/ a
I'm noob with this stuff, so can someone please give me some example how
I want to preface this with, I'm a total noob so please explain like
Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can
Please excuse the noob-ish nature of this question. I have a project in which
I'm a noob; please help me understand this authentication config / bindings stuff that
Sorry if this is a stupid noob question please be gentle with me I'm
Please excuse my noob-iness! I have a $string, and would like to see if
please forgive me if this is a noob question, but i'm a beginner at
Pardon me, this really is a noob question but please understand that I do

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.