I use Toast.makeText to display the results from dialogs and with a slightly strange problem: the text is displayed above the frame that should hold it, for example:
The message is biased with the frame. Please align it better. [ _________________________________________________ ]
I usually use code similar to
Toast bread = Toast.makeText(getContext(), R.string.message, Toast.LENGTH_LONG);
bread.show();
from the dialogue. I heard that a bad context can sometimes cause inflation problems, but it getOwnerActivity()returns null, so that is the way out. In any case, I would have thought that getContext () would provide the context passed at build time, which is activity anyway.
Any suggestions?
source
share