One of the components that android phones come with is the Toast. It sort of gives information to the user about something, just like in the above case. Its supposed to inform us that the wallpaper has been set. It’s really reassuring, I gotta say. Ok so, there are a few ways you can do it (its really one way actually but you’ll see):
Context context = getApplicationContext(); int duration = Toast.LENGTH_LONG; Toast toast = Toast.makeText(context,"This is a toast that will say: Wallpaper set",duration); toast.show();
Toast.makeText(getApplicationContext(), "This is a toast that will say: Wallpaper set", Toast.LENGTH_LONG).show();
So as you can see its the Toast.makeText() that builds the toast. It takes three parameters: the context, text to be displayed and the duration of display. You can still make custom toast that display images and other stuff as opposed to text alone. So watch out for this space.
click here to view the full app code.