android - can't change layout
<p>I make a condition when the client receives the word "login success" then the first layout will be changed to the second layout. </p>

<p>The first layout is controlled by <strong>Client_layoutActivity class</strong> and</p>

<p>The second layout is controlled by <strong>chat_wall class</strong> class</p>

<p>I think this method is 100% correct because I've successfully tried before but when the conditions are met (received "login success"), the layout still does not change. I am looking for a solution on google but still not get the appropriate answers.
I use the method as shown below:</p>

<pre><code>if (line.contentEquals("login success")){

        Toast.makeText(this, "login success", Toast.LENGTH_SHORT).show();

        Intent i = new Intent(Client_layoutActivity.this, chat_wall.class);
        startActivity(i);
        chat_wall cw = new chat_wall();
        cw.send(out, in);

    }
</code></pre>
