나는 drawable을 xml을 사용하여 텍스트의 색으로 설정하는 방법을 알고 있지만 Java에서 어떻게 수행되는지는 모른다.android : textColor 드로어 블을 프로그래밍 방식으로 사용 하시겠습니까?
android:textColor="@drawable/selected_color"
JAVA의 : XML로
이 같은 것입니다?
StringBuilder text = new StringBuilder();
text.append("<font color='").append(selectedColor).append("'>") .append("your text here").append("</font>");
textView.setText(Html.fromHtml(text.toString()), BufferType.SPANNABLE);
thnx, 이것은 그 것이었다 : 당신은 선택이있는 경우 D – bytebiscuit