Skip to content Skip to sidebar Skip to footer

Why Is The Width Of Toast Shorter Than Its Content?

I wrote an activity which contains a navigation drawer (a simple fragment with a ListView inside), and a model and an adapter for the ListView. There is an ImageView and a TextView

Solution 1:

In the official documentation it says that a typical Toast looks like this:

Contextcontext= getApplicationContext();
Toasttoast= Toast.makeText(context, text, duration);

I imagine it is because depending on the class you have, the context varies because not all context instances are created equal.

More info also here:

Post a Comment for "Why Is The Width Of Toast Shorter Than Its Content?"