【发布时间】:2015-07-16 14:11:03
【问题描述】:
我在各种手机上测试了我的应用程序,进度对话框和 Toast 消息等原生内容看起来很正常,但是当我开始在装有 Android 5.0 的手机上进行测试时,进度对话框/Toast 的边缘被切断了。
我做错了什么?在每部操作系统低于 Lollipop 的手机上,它都能正常工作。
我的风格,根据要求:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- <item name="android:actionBarStyle">@style/AppTheme.ActionBarStyle</item>
</style>
<style name="AppTheme.ActionBarStyle" parent="android:Theme.Holo.Light.NoActionBar">
<item name="android:background">#1d2128</item>
<!--<item name="android:titleTextStyle">@style/AppTheme.ActionBar.TitleTextStyle</item>-->
<item name="android:icon">@drawable/top_bar_logo</item>
<!--<item name="android:indeterminateProgressStyle">@style/IndeterminateProgress</item>-->
</style>
<style name="AppTheme.MainActivity" parent="android:Theme.Holo.Light.NoActionBar">
<item name="android:clipToPadding">false</item>
</style>
【问题讨论】:
-
你的应用的主题是什么?
-
我尝试了 android:Theme.Holo.Light.DarkActionBar 和 Theme.AppCompat.Light.DarkActionBar。他们都没有工作
-
请发布相同的,您是否为
Values维护不同的文件夹? -
我正在使用三星 Galaxy S6,但我刚刚删除了 values v19 文件夹,现在它可以工作了吗??哇,谢谢大佬,帮了大忙。如果您愿意,请在下面写下答案,我会接受它作为正确答案,例如“不要在 style.xml 中使用 android:fitsSystemWindows="true"”
-
我建议你通过 this 一次 :) 来自文档:
Newer versions of Android have additional themes available to applications, and you might want to use these while running on those platforms while still being compatible with older versions. You can accomplish this through a custom theme that uses resource selection to switch between different parent themes, based on the platform version.
标签: java android android-5.0-lollipop progressdialog android-toast