...nasıl textColor kullanarak SetTextColor (ColorsStateList renkler)
Nasıl ColorsStateList kullanarak bir TextView metin rengini ayarlamak için kurulur? çözüldü
düzenleme:
textView.setTextColor (new ColorStateList (
new int [] [] {
new int [] {android.R.attr.state_pressed},
new int [] {android.R.attr.state_focused},
new int [] {}
},
new int [] {
Color.rgb (255, 128, 192),
Color.rgb (100, 200, 192),
Color.White
}
));
Change Background Color of TextView on Click
Bunu okudun mu bir renk durumları listesine yüklemek için ContextCompat kullanabilir? http://stackoverflow.com/questions/3506319/android-linearlayout-with-color-resource-what-am-i-doing-wrong –
Sorunuz sadece bir öğretici arıyor ambiguous- olduğunu ColorStateList kullanımı? Hiç aradınız mı? http://stackoverflow.com/questions/3827416/how-to-define-colorstatelist-for-textview –
Evet, ancak XML kullanamıyorum. Bunu programlı olarak yapmalıyım – Rodrigo