To add an image to a Toast, use the following:
Toast tst = Toast.makeText(this, "text", Toast.LENGTH_LONG);
ImageView view = new ImageView(this);
view.setImageResource(R.drawable.my_figure);
tst.setView(view);
tst.show();
To reposition the text location, or to center the Toast in the screen display,use setGravity before calling the show() method:
tst.setGravity(Gravity.CENTER, tst.getXOffset() / 2,
tst.getYOffset() / 2);
Toast tst = Toast.makeText(this, "text", Toast.LENGTH_LONG);
ImageView view = new ImageView(this);
view.setImageResource(R.drawable.my_figure);
tst.setView(view);
tst.show();
To reposition the text location, or to center the Toast in the screen display,use setGravity before calling the show() method:
tst.setGravity(Gravity.CENTER, tst.getXOffset() / 2,
tst.getYOffset() / 2);