2016-06-09 2 views
0

Android Studio 2.1.2에서 기본값 Navigation Drawer Activity을 사용자 정의하고 색상을 지정하려고합니다. 내가기본 탐색 창 작업 벡터 아이콘 사용자 정의

그러나 enter image description here

below- 스크린 샷에 따라 미리보기 창에서 way--

<vector xmlns:android="http://schemas.android.com/apk/res/android" 
    android:width="24dp" 
    android:height="24dp" 
    android:viewportHeight="24.0" 
    android:viewportWidth="24.0"> 
    <path 
     android:fillColor="#f73a3a" //changed colour 
     android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" /> 
    <path 
     android:fillColor="#f73a3a" //changed colour 
     android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" /> 
</vector> 

색상 변경 다음의 ic_menu_camera.xml 파일의 색상을 변경했습니다, 색상은 기본값으로 다시 변경 블랙/다크 그레이 앱은 launched-- 때

enter image description here

방법 여기에 변경된 색상을 구현할 수 있습니까?

+0

내 스타일링 파일이 드로어 블 색보다 우선합니다. 어느 것을 알아낼 수는 없습니다. – envyM6

+0

내 자신의 JPEG 이미지로 아이콘을 변경하는 방법에 대한 아이디어가 있으십니까? – hyperfkcb

답변

0

당신은 이제 당신이 직접 벡터 자산을 편집 할 수 있습니다 onCreate

YourView.setItemIconTintList(null); 

동안 null로 setItemIconTintList을 설정해야 변경 사항이 표시됩니다.

관련 문제