Friday, November 9, 2012

Android Edittext Seterror

In Some Devices , SetError text will not be visible..Solution For that..



int ecolor = getResources().getColor(R.color.textcolor); 

String errorString = getResources().getString(R.string.ErrorString);

ForegroundColorSpan textSpan = new ForegroundColorSpan(ecolor);

errortext = new SpannableStringBuilder(errorString);

errortext.setSpan(textSpan, 0, errorString.length(), 0);

No comments:

Post a Comment