5

I tested my app on various phones and native stuff like progress dialog and Toast messages look normal, but when I started testing on the phones with Android 5.0, edges of progress dialog/Toast got cut off.

Toast

Progress Dialog example

What am I doing wrong? On every phone with OS lower than Lollipop it works fine.

My Style, as requested:

 <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>
Bobbake4
  • 24,509
  • 9
  • 59
  • 94
Mate Križanac
  • 268
  • 1
  • 7
  • 18
  • 3
    What is the theme of your app? – Skynet May 06 '15 at 12:29
  • i tried both android:Theme.Holo.Light.DarkActionBar and Theme.AppCompat.Light.DarkActionBar. Non of them worked – Mate Križanac May 06 '15 at 12:49
  • Please post the same, are you maintaining different folders for `Values`? – Skynet May 06 '15 at 12:49
  • i edited the question and added my style, i see i have different folder for Values, but syles in them are the same, except the one in folder values-v19, that one is a little bit different – Mate Križanac May 06 '15 at 12:54
  • which device are you using ? – Kushal May 06 '15 at 12:55
  • 1
    i am using Samsung Galaxy S6, but i just deleted values v19 folder and now it works ?? Whoa, thanks man, you helped a lot. If you want, write the answer below and i will accept it as correct one, something like "do not use android:fitsSystemWindows="true" in the style.xml" – Mate Križanac May 06 '15 at 12:57
  • 1
    I would suggest you go through [this](http://developer.android.com/guide/topics/ui/themes.html) once :) From the docs: `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.` – Skynet May 06 '15 at 13:00
  • going through it right away! Thanks! :) – Mate Križanac May 06 '15 at 13:03
  • You welcome matey, happy trucking :) – Skynet May 06 '15 at 13:04
  • As for future references: currently the second image is not being shown. – Edwin Lambregts May 08 '15 at 14:06

1 Answers1

2

To fix this issue remove <item name="android:fitsSystemWindows">true</item> from your themes.xml This will also fix weird offsets and text wrapping behaviour when displaying EditText.setError("error");

Oleksiy Martynov
  • 379
  • 2
  • 11