![]() ![]() The following sections describe how you can do these things. You may, however, want to position the toast differently or even use your own layout instead of a simple text message. This example demonstrates everything you need for most toast notifications. Var toast = Toast.MakeText(context, text, duration) ToastLength duration = ToastLength.Short You can display the toast notification with Show(), as shown in the following example: Context context = Application.Context It returns a properly initialized Toast object. This method takes three parameters: the application Context, the text message, and the duration for the toast. ![]() First, instantiate a Toast object with one of the MakeText() methods.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |