Android .split not working correctly
<p>Hi the code below doesn't seem to be working correctly is there something I'm doing wrong? </p>

<p>Basically what happens is I receive the string prd|50126057|12bars|5 and I'm trying to split it up into three different textViews; when I run it it only shows prd in the first textView and the others don't change. Why does this happen?</p>

<p>I can see it working in the logs it is just not displaying it in the other textviews.</p>

<p>Any help is much appreciated and thanks in advance.</p>

<p>Also I'm sorry if this has already been answered i did do some searching on here but couldn't find anything.</p>

<pre><code>                public void messageReceived(String message) {

                String response = message;
                String[] words = response.split("\\|");
                TextView tv1 = (TextView) findViewById(R.id.textView1);
                TextView tv2 = (TextView) findViewById(R.id.textView2);
                TextView tv3 = (TextView) findViewById(R.id.textView3);

                tv1.setText(words[0]);
                tv2.setText(words[1]);
                tv3.setText(words[2]);
Log.e("items--&gt;", "" + words[0] + " " + words[1] + " " + words[2]+ " " + words[3]);

                publishProgress(message);
            }
        });
</code></pre>
