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>
那么,如何加载代码中的样式并检查背景颜色,以便我可以测试它?
我在问测试不怎么设置! –
这是你将如何加载它。在清单中定义它并运行应用程序。我想我不明白这个问题。 –
我的意思是“单元测试”它。 TDD响铃? –