2015-01-12 2 views
0

, 안드로이드가 이노 numberPickerStyle를 찾을 수 없습니다 현재 테마에 스타일을 찾는 데 실패하고 난이 오류를 얻을 :안드로이드는이 간단한 디자인 테마에

Failed to find 'numberPickerStyle' style in current theme 

내 주제는 :

<?xml version="1.0" encoding="utf-8"?> 
<resources> 

    <style name="Theme.Tsms" parent="@style/Theme.AppCompat.Light"> 
     <item name="numberPickerStyle">@style/SampleTheme.Tsms</item> 
    </style> 

    <style name="SampleTheme.Tsms" parent="@style/Theme.AppCompat"> 
     <item name="numberPickerStyle">@style/NPWidget.Holo.Light.NumberPicker</item> 
    </style> 

</resources> 

방법을 이 문제를 수정하고 해결 하시겠습니까?

답변

0

this StackOverflow answer에서 코드를 복사했다고 가정합니다. numberPickerStyle은 앱에 정의 된 속성입니다. 대답에서 복사 한 코드가 작동하지 않습니다. 오류를 없애기 위해 XML에 속성을 정의해야하지만 여전히 아무 일도하지 않습니다.


NumberPicker의 스타일을 지정할 수 없습니다. android:numberPickerStyle은 비공개입니다 (issue 참조).

Unfortunately, you can't style it. The styles and styling attributes for NumberPicker are not present in the public API, therefore you can't set them and change the default look. You can only select between light and dark theme. source

+0

안녕하세요, 님이 내 소개 링크를 읽고 있지만 내 코드를 변경할 수 없습니다. 내 테마는 관례이며'AppTheme','AppCompat' 그게 내 스타일로 정의하는 것을 어떻게 바꿀까요? 내 코드를 고칠 수 있습니까? –

+0

'numberPickerStyle' 줄은 아무 것도하지 않기 때문에 제거해야합니다. –

+0

OH 선생님. 나는 그것을 스타일로 정의 할 필요가있다. –