res/values/color.xml파일에 등록된 색상 값 가져오는 방법.
| 
1 
2 
3 | 
int colorRed = getResources().getColor(R.color.blue); 
TextView txtTest = (TextView)findViewById(R.id.txt1); 
txtTest.setTextColor(colorRed); | 
| 
1 
2 
3 | 
int colorRed = getResources().getColor(R.color.blue); 
TextView txtTest = (TextView)findViewById(R.id.txt1); 
txtTest.setTextColor(colorRed); | 
댓글
댓글 쓰기