title: change text color based on value of text
body: <p>I am trying to figure out how to change the color of TextView based on the value of the text.
  TextView has been sent from another activity I have that part working fine. What I want is a way to change the color of the text based on what is in the TextView. So if previous Activity sends a value like "11 Mbps" as TextView then I would like that text color to be yellow, "38 Mbps" green, and 1 Mbps red.  I'm using eclipse if that helps at all. </p>
  
  <p>This is how I'm sending the TextView to another activity. "showmsg" is just username sent to another page.</p>
  
  <pre><code>buttonBack.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v){
              final TextView username =(TextView)findViewById(R.id.showmsg);
              String uname = username.getText().toString();
  
              final TextView wifistrength =(TextView)findViewById(R.id.Speed);
              String data = wifistrength.getText().toString();
  
  
  
                  startActivity(new Intent(CheckWiFiActivity.this,DashboardActivity.class).putExtra("wifi",(CharSequence)data).putExtra("usr",(CharSequence)uname));
  
  
          }
      });
  </code></pre>
  
  <p>And this is how I receive it in the other activity</p>
  
  <pre><code>Intent i = getIntent();
                 if (i.getCharSequenceExtra("wifi") != null) {
                  final TextView setmsg2 = (TextView)findViewById(R.id.Speed);
                  setmsg2.setText(in.getCharSequenceExtra("wifi"));               
                 }
  </code></pre>
  
  <p>This all works fine but I don't have a clue how to change the color of TextView based of the value of the text. Any help would be really appreciated.</p>