I have problem in understanding context class.
why does Toast.makeText
need context class?
public static Toast makeText (Context context, CharSequence text, int duration)
I have problem in understanding context class.
why does Toast.makeText
need context class?
public static Toast makeText (Context context, CharSequence text, int duration)
A context is the current state of the application/object. The toast function must have a context to know where it has to show the toast. Check out this post for more info on the context! What is 'Context' on Android?