2017-12-20 1 views
0

나는 모든 국가에 대한 배경 색조를 변경하는 방법을 알고 싶습니다.모든 주에서 배경 색조를 변경하는 방법은 무엇입니까?

int[][] states = new int[][] { 
      new int[] {android.R.attr.state_empty, reminderColor.getMeasuredState()}}; 
    int[] colors = new int[] {color}; 
    ColorStateList myList = new ColorStateList(states, colors); 
    reminderColor.setBackgroundTintList(myList); 

실제로이 코드를 사용하면 내 ImageView가 사라집니다. 내가 뭘 잘못하고 있는지 모르겠다.

나는 해결책을 찾을 사실

답변

0

, 나는 빈 상태로 기본 색상을 설정했다, 지금은 작동이 코드가 있습니다

int[][] states = new int[][] { 
      new int[] {}}; 
    int[] colors = new int[] {color}; 
    ColorStateList myList = new ColorStateList(states, colors); 
    reminderColor.setBackgroundTintList(myList); 
관련 문제