I was wondering if there was a way to display all text in a toast to be centered. For instance, I have a toast that has 2 lines of text in it. For purely aesthetic reasons,
It is dirty hack, but
((TextView)((LinearLayout)toast.getView()).getChildAt(0)) .setGravity(Gravity.CENTER_HORIZONTAL);