Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toast and Progress dialog edges cut off

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>
like image 760
Mate Križanac Avatar asked Nov 01 '22 04:11

Mate Križanac


1 Answers

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");

like image 61
Oleksiy Martynov Avatar answered Nov 15 '22 05:11

Oleksiy Martynov