没有 Theme.Light.Dialog 可用于我正在使用 Theme.Light 的项目的其余部分.
There is no Theme.Light.Dialog to use with the rest of my project that is using Theme.Light.
如何将 Theme.Dialog 更改为类似于 Dialog 的 Theme.Light 版本.
How can I change Theme.Dialog to look like a Theme.Light version of Dialog.
我知道我必须覆盖 style.xml 中的 Theme.Dialog 部分,如下所示.我应该用哪些值覆盖哪些项目?
I know that I must overwrite sections of Theme.Dialog in styles.xml as below. What items should I overwrite with which values?
<style name="dialog_light" parent="@android:style/Theme.Dialog">
<item name="android:???????"></item>
<item name="android:???????"></item>
</style>
我可以将背景设为浅白色灰色,但按钮、微调器等在浅色主题上也有所不同,以便在浅色背景上看起来更好.
I could just make the background that light white grey, but the buttons, spinners etc are also different on the light theme to look better on the light background.
编辑
看起来我已经成功了.
<color name="black">#FF000000</color>
<color name="whitegrey">#FFF2F2F2</color>
<style name="dialog_light" parent="@android:style/Theme.Dialog">
<item name="@android:windowBackground">@color/whitegrey</item>
<item name="@android:textColor">@color/black</item>
</style>
看来我搞定了.
<color name="black">#FF000000</color>
<color name="whitegrey">#FFF2F2F2</color>
<style name="dialog_light" parent="@android:style/Theme.Dialog">
<item name="@android:windowBackground">@color/whitegrey</item>
<item name="@android:textColor">@color/black</item>
</style>
这篇关于将 Theme.Dialog 更改为 Android 中的 Theme.Light.Dialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
使用 GPS 获取用户的当前位置Get user#39;s current location using GPS(使用 GPS 获取用户的当前位置)
requestLocationUpdate() 抛出的 IllegalArgumentExceptionIllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 抛出的 IllegalArgumentException)
LocationManager 的 getLastKnownLocation 有多可靠,多久更How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新
如何检测位置提供者?GPS 或网络提供商How to detect Location Provider ? GPS or Network Provider(如何检测位置提供者?GPS 或网络提供商)
在应用启动期间获取当前位置Get current location during app launch(在应用启动期间获取当前位置)
locationManager.getLastKnownLocation() 返回 nulllocationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)