Ioannis I Ioannis I - 2 months ago 15
Android Question

Android toast has strange shape

When using toast messages in my app it appears in a wrong shape. The code I am using is:

Toast.makeText(context, context.getResources().getString(R.string.changeLanguageConf), Toast.LENGTH_SHORT).show();


Toast wrong shape

Do you know what could be the root cause? context is an argument passed as getContext() from a different procedure.

Answer

It was due to the theme used. More specific it was due to:

<item name="android:fitsSystemWindows">true</item>

Thanks for the help