savedInstanceState = getIntent().getExtras();
    String type = savedInstanceState.getString(TYPE);
    if(type == "tree")
    {
        setContentView(R.layout.activity_sound_tree);
    }
    else
    {
        TextView tv = (TextView) findViewById(R.id.heading_sound);
        tv.setText("'"+type+"'");
    }
I have used this code in the second activity. I know for sure that type == tree. So I do not understand why the first "if" block fails. It always goes to the "else" block, even though I am 100% sure that type == "tree". Can someone point me in the right direction?
 
     
     
     
    