android - Cannot resolve maketext() method of Toast -


i getting error while creating toast

toast toast = toast.maketext(this, text, duration); 

i getting cannot resolve maketext() method of toast.

i getting error

java: no suitable method found maketext(idtech.esdn.shapedata,java.lang.charsequence,int) method android.widget.toast.maketext(android.content.context,int,int) not applicable (actual argument idtech.esdn.shapedata cannot converted android.content.context method invocation conversion) method android.widget.toast.maketext(android.content.context,java.lang.charsequence,int) not applicable (actual argument idtech.esdn.shapedata cannot converted android.content.context method invocation conversion)

the maketext's signature following

public static toast maketext (context context, charsequence text, int duration) 

the first paramter has context object. put this, this refers object , can different activity (a fragment instance).


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -