Quantcast
Channel: How to change position of Toast in Android? - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by Abhishek for How to change position of Toast in Android?

$
0
0

setting toast at topin screen

toast.setView(view);
toast.setGravity(Gravity.BOTTOM , 0, 0); // here i am setting toast at bottom
 toast.setDuration(Toast.LENGTH_LONG);
 toast.show(); 

now at bottom

 toast.setView(view);
 toast.setGravity(Gravity.BOTTOM , 0, 0); // here i am setting toast at bottom
 toast.setDuration(Toast.LENGTH_LONG);
 toast.show();  

the same way we can set toast in left, right and also center

Click here


Viewing all articles
Browse latest Browse all 14

Trending Articles