I've tried dozens of different combinations, and I have no idea why this won't work - the logic in it makes complete sense.
I'm passing a bundle from a previous activity which has stored the value from a spinner into a string. I'm then reading the string and if it's equivilent to whatever I specify - acting on that.
I've printed the string directly to a TextView just to make sure I'm getting the expected result, and I am - but it still won't register.
TextView tv; Bundle extras = getIntent().getExtras(); tv = (TextView) findViewById(R.id.textView2); tv.append(extras.getString("pageNumber")); tv = (TextView) findViewById(R.id.textView3); int base = Integer.parseInt(extras.getString("pageNumber")) * 70; tv.append(Integer.toString(base)); /* Here is where I'm editing */ tv = (TextView) findViewById(R.id.textView4); String plat = extras.getString("platform"); if (plat == "Wordpress") tv.append("900");
My array for the spinner is defined in my strings.xml and is as follows:
<string-array name="platform_array"> <item>None</item> <item>Joomla</item> <item>Wordpress</item> <item>Drupal</item> </string-array>