2
我使用Holo light主题。当我们测试Nexus 5(4.4)时,togglebutton的背景颜色是白色,而不是浅灰色。但是,对于Nexus 7(4.4),togglebutton没有白色背景。除Nexus 5上的togglebutton外,其他所有常规按钮均为浅灰色。Nexus 5 togglebutton背景
问题是什么?我该如何解决它?它现在看起来像一个禁用的togglebutton。
只要定义activity_main.xml中切换按钮,并设定项目生成目标到4.3,targetSdkVersion = 18。
<!-- NEXUS 5(4.4): WHITE BG, NEXUS 7(4.4): GREY BG //-->
<ToggleButton
android:id="@+id/toggleTest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="ON"
android:textOff="OFF" />
<!-- NEXUS 5(4.4): GREY BG, NEXUS 7(4.4): GREY BG //-->
<Button
android:id="@+id/btnOK"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
/>
的Nexus 7(任何其他Android装置)切换按钮
Nexus 5的切换按钮
表现出一定的代码 –
我刚刚创建了一个新的Android应用程序与Eclipse的一个空白的活动,我不希望它会表现不同为不同的设备。我怎样才能使所有设备是否一致? – paul