I am getting error while creating a Toast
Toast
Toast toast = Toast.makeText(this, text, duration);
I am getting cannot resolve ma
ma
Have you imported the toast widget?
import android.widget.Toast;
You can also call show() in the same line if you want to output it straight away:
Toast toast = Toast.makeText(context, text, duration).show();
Hope that helps.