Monday, 15 September 2014

Android toast positioning

Positioning your android toast using Xamarin C#:
      var toast = Toast.MakeText(appContext, text, ToastLength.Long);
      toast.SetGravity(GravityFlags.Center, 0, 0);
You can experiment with different gravity settings, and the following integers nudge the toast in the X or Y direction.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!