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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:59:27+00:00 2026-06-03T09:59:27+00:00

I’m writing a recipe book, and I’ve encountered a problem, my screen2 recieves null.null

  • 0

I’m writing a recipe book, and I’ve encountered a problem, my screen2 recieves null.null when I send information from screen1 …

This is my code for recipe_button_list:

public class Recipe_Button_List extends Activity {

    TextView inputMethod;

    TextView inputIngredients;

    @Override
    public void onCreate( Bundle savedInstanceState ) {

        super.onCreate( savedInstanceState );
        setContentView( R.layout.recipe_button_list );

        inputMethod = (TextView) findViewById( R.id.textView2 );
        inputIngredients = (TextView) findViewById( R.id.textView1 );
        //remember when adding more intents to make sure that they are classed as TextView not EditText

        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled( true );

        Button mainNext = (Button) findViewById( R.id.Recipe1 );
        mainNext.setOnClickListener( new OnClickListener() {

            public void onClick( View v ) {

                final TextView mTextView = (TextView) findViewById( R.id.textView1 );
                mTextView.setText( R.string.Test2 );
                final TextView mTextView2 = (TextView) findViewById( R.id.textView2 );
                mTextView2.setText( R.string.Test );
                Intent i = new Intent( getBaseContext(), recipedisplayscreen.class );
                //Sending data to the next screen
                i.putExtra( "textView1", inputIngredients.getText().toString() );
                i.putExtra( "textView2", inputMethod.getText().toString() );

                Log.e( "n", inputMethod.getText() + "." + inputIngredients.getText() );
                startActivity( i );
            }
        } );

        Button mainNext2 = (Button) findViewById( R.id.Recipe2 );
        mainNext2.setOnClickListener( new OnClickListener() {

            public void onClick( View v ) {

                final TextView mTextView = (TextView) findViewById( R.id.textView1 );
                mTextView.setText( R.string.Test );
                Intent i = new Intent( getBaseContext(), recipedisplayscreen.class );
                //Sending data to the next screen
                i.putExtra( "textView1", inputIngredients.getText().toString() );
                i.putExtra( "textView2", inputMethod.getText().toString() );

                Log.e( "n", inputMethod.getText() + "." + inputIngredients.getText() );
                startActivity( i );
            }
        } );
    }

    @Override
    public boolean onCreateOptionsMenu( Menu menu ) {

        MenuInflater inflater = getMenuInflater();
        inflater.inflate( R.menu.recipe_menu1, menu );
        return true;

    }
}

This is my recipe_display_screen:

public class recipedisplayscreen extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.recipedisplayscreen);

        TextView MethodDisplay = (TextView) findViewById(R.id.textView3);
        TextView IngredientsDisplay = (TextView) findViewById(R.id.textView5);

        Intent i = getIntent();
        String Ingredients = i.getStringExtra("TextView1");
        String Method = i.getStringExtra("TextView2");
        Log.e("recipedisplayscreen", Ingredients + "." + Method);

        MethodDisplay.setText(Method);
        IngredientsDisplay.setText(Ingredients);


        ActionBar actionBar = getActionBar();
        setTitle(R.string.title);
        actionBar.setDisplayHomeAsUpEnabled(true);}

        @Override
        public boolean onOptionsItemSelected(MenuItem item) {
            switch (item.getItemId()) {
                case android.R.id.home:
                    // App icon in action bar clicked; go home
                    Intent intent = new Intent(this, MainScreen.class);
                    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                    startActivity(intent);
                    return true;
                default:
                    return super.onOptionsItemSelected(item);
            }
        }




     @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            MenuInflater inflater = getMenuInflater();
            inflater.inflate(R.menu.recipe_menu1, menu);
            return true;

    }

}

Any ideas, solutions ??? Thanks in advance 🙂

P.S. This is my logcat:

05-03 18:55:34.734: E/n(21132): if this is displaying then Intent activity is working correctly.bla bla bla working correctly
05-03 18:55:34.883: D/dalvikvm(21132): GC_FOR_ALLOC freed 101K, 2% free 12815K/12999K, paused 23ms
05-03 18:55:34.883: I/dalvikvm-heap(21132): Grow heap (frag case) to 13.885MB for 1401676-byte allocation
05-03 18:55:34.922: D/dalvikvm(21132): GC_CONCURRENT freed 7K, 2% free 14177K/14407K, paused 4ms+2ms
05-03 18:55:34.945: E/recipedisplayscreen(21132): null.null
  • 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-06-03T09:59:28+00:00Added an answer on June 3, 2026 at 9:59 am
        Intent i = getIntent();
        String Ingredients = i.getStringExtra("textview1"); <--- see diff TextView1
        String Method = i.getStringExtra("textview2"); <--- see diff TextView2
        Log.e("recipedisplayscreen", Ingredients + "." + Method);
    

    when you are passing value you are useig T and V small

    and t and v are in capital where you are getting values

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I am currently running into a problem where an element is coming back from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a view passing on information from a database: def serve_article(request, id): served_article
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.