具有不同主题的 Android 应用程序和 Actionbar
在我的 Android 应用程序中,我需要有一个黑色的操作栏,而我的内容有一个白色背景。问题是,每当我将操作栏设置为黑色背景时,我所有的下拉旋转器和文本视图都有白色背景,并且我无法将它们与白色内容背景一起看到。如果我将操作栏设置为白色,下拉旋转器和文本视图将具有黑色背景,我可以正确地看到它们。我尝试使用 android:dropDownSpinnerStyle
从下拉微调器中自定义样式,但我没有成功。我该如何解决这个问题?
编辑: 我刚刚使用以下方法解决了有关下拉列表的问题:
<item name="android:dropDownSpinnerStyle">@style/customDropDownStyle</item>
<style name="customDropDownStyle" parent="@android:style/Widget.Holo.Light.Spinner">
</style>
但我仍然遇到有关 EditText 的问题,其中我看不到它的背景。我只是找不到应该使用的属性来解决问题。
In my Android application I need to have a black action bar and my content has a white background. The problem is that whenever I set the actionbar with a black background, all my dropdown spinners and textviews have a white background, and I can't see them together with my white content background. If I set the actionbar to white, the dropdown spinners and textviews have a black background and I can see them properly. I tryed customizing the style from the dropdown spinner with android:dropDownSpinnerStyle
But i didn't succeed. How can I solve this?
Edit:
I just solved this issue regarding the Dropdown using the following:
<item name="android:dropDownSpinnerStyle">@style/customDropDownStyle</item>
<style name="customDropDownStyle" parent="@android:style/Widget.Holo.Light.Spinner">
</style>
But I still have this issue regarding an EditText, in which I can't see it's background. I just can't find the attribute I should work with in order to solve the issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以保管箱/文本字段可见的方式保持应用程序的样式要容易得多,但仅更改操作栏的样式,如下所示:
It was much easier to keep the style of the APP in a way that the dropbox/textfields would be visible, but changing only the style of the Actionbar like that: