user1461428
user1461428

Reputation: 11

setTextColor error

I just began using eclipse and have no experience with java but I am following a tutorial and got stuck with this text color problem. The error that I am getting says RED cannot be resolved or is not a field. Here's the code, all help is appreciated.

case R.id.myRadioButtonRed: myMessage.setTextColor(Color.RED); break;

Upvotes: 0

Views: 588

Answers (1)

Scott Faria
Scott Faria

Reputation: 270

Going by the R.id.myRadioButtonRed it looks like this is an Android project. In the Android SDK java.awt.Color does not exist. You need to use android.graphics.Color

Upvotes: 1

Related Questions