I have been using AppMsg, which is a third party library for displaying alerts in a non intrusive way (originally conceived by Cyril Motier). The library is working out fine for regular activities, but does anyone know how to use the library for Fragments
?
https://github.com/johnkil/Android-AppMsg
As can be see, the main function makeText
needs an activity context
. How do I pass Fragment
to this method?
public static AppMsg makeText(Activity context, int resId, Style style)
{
return makeText(context, context.getResources().getText(resId), style);
}
Thanks, Torri.