Android - How to get ListView text?
<p>I'm a complete newbie to Android, and this may actually be more of a Java question...</p>

<p>I'm trying to set up an if statement based on the item clicked in a ListView. In my onItemClick method I have the following:</p>

<pre><code>Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show();

if(((TextView) view).getText() == "Page 1"){
     Toast.makeText(getApplicationContext(), "Page 1 clicked", Toast.LENGTH_SHORT).show();
}
</code></pre>

<p>The string populating my ListView has "Page 1"; I see the first Toast saying "Page 1", but I never get the "Page 1 clicked" Toast, so obviously something about my if statement is wonky. Suggestions?</p>

<p>Thanks!</p>

<p>Bill</p>
