Hi Coren, I know this is a very late reply, however might still help others. You can set the margins like this.
toast.setGravity(Gravity.TOP, 50 // x-offeset, 20 // y-offest); Regards, L&L Partners On Monday, February 25, 2008 8:58:05 AM UTC, corem wrote: > > Hi, > Is there any way to position a Toast to a specific location on the > screen? > I know about gravity, but it is not enough. I've tried to set margins > but it doesn't work. > > Toast toast = Toast.makeText(MyActivity.this, "Hi", > Toast.LENGTH_SHORT); > toast.setGravity(Gravity.TOP); > toast.setMargin(50, 20); > toast.show(); > > Any help will be appreciated. > Corem. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

