Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I believe I see the problem. You are trying to access your <code>Array</code> but it is an instance variable instead of static so it is being killed off when you exit your <code>Activity</code>. You can either put them in a static class and access them that way or pass a <code>String</code> variable through your <code>Intent</code>, depending on what you need.</p> <p>If you have the value of the <code>String</code> you need when you leave <code>MainActivity</code> then I would probably just pass it through your <code>Intent</code>. If the value depended on something in one of your other <code>Activities</code> then I would consider putting it in a separate class but it doesn't look like that's what you need here</p> <p><strong>Edit</strong></p> <p>You are already doing it here, kind of</p> <pre><code>Intent i = new Intent(MainActivity.this, resultScreen.class); i.putExtra("display" , displayChoice); Intent intent = new Intent(MainActivity.this,loadingScreen.class); </code></pre> <p>But you aren't starting the <code>Activity</code> that would get the <code>String</code></p> <pre><code>i.putExtra("display" , displayChoice); </code></pre> <p>that line would pass a <code>String</code> with <code>key "displpay"</code> and value of <code>displayChoice</code>, although I think that value is an empty <code>String</code> at that point, but you don't start that <code>Activity</code>. I'm lost on how your flow is suppose to work but basically you would do something like this</p> <pre><code>String displayChoice = "testValue"; // some arbitrary value--whatever you need to send Intent i = new Intent(MainActivity.this, resultScreen.class); // create the Intent i.putExtra("display" , displayChoice); // add the extra startActivity(i); //start the Activity </code></pre> <p>then to get the value inside <code>resultScreen</code> in <code>onCreate()</code></p> <pre><code>Intent recIntent = getIntent(); // get the Intent that started this Activity String value = recIntent.getStringExtra("display"); // get the value using the key // value now equals "testValue" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload