How to set transparent toast frame in android ?

<br />Toast toast = Toast.makeText(context, "Toast text", Toast.LENGTH_SHORT);
View view = toast.getView();
view.setBackgroundResource(/*your background resid*/);

Basically you create the toast with makeText and then get the view set up by Android. Change the background for the view and then set the view back.

By using a background with a more transparent background than the default one you can get the effect you want.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s