2014-03-26 2 views
0

Android 코드의 단위 테스트를 시작했습니다. 그러나 ActionBar의 배경을 테스트하는 방법에 문제가 있습니다. 다음을 사용하여 작업 표시 줄의 색을 설정합니다.ActionBar 배경색 테스트

<style name="AppBaseTheme" parent="android:Theme.Light"> 
    <item name="android:actionBarStyle">@style/ActionBarTheme</item> 
</style> 

<!-- Application theme. --> 
<style name="AppTheme" parent="AppBaseTheme"> 
    <!-- All customizations that are NOT specific to a particular API-level can go here. --> 
</style> 

<style name="ActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar"> 
    <item name="android:background">@color/dark_green</item> 
</style> 

코드에서 스타일을로드하고 테스트하여 테스트 할 수있는 방법은 무엇입니까?

답변

0

응용 프로그램 매니페스트에서 android : theme = "@ style/AppBaseTheme" 또는 사용자 지정 테마의 이름을 지정하기로 결정한 항목이 무엇인지 확인하십시오.

+0

설정 방법이 아닌 테스트를 요청합니다. –

+0

로드하는 방법입니다. 매니페스트에 정의하고 앱을 실행합니다. 나는 그 질문을 이해하지 못한다고 생각한다. –

+0

"단위 테스트"를 의미합니다. TDD 벨소리? –