use of android.widget.Toast in project BaseProject by feer921.
the class ToastUtil method showToast.
public static void showToast(int strID) {
Toast mToast = new Toast(mContext);
View v = layoutInflater.inflate(R.layout.layout_toast, null);
TextView messageInfo = (TextView) v.findViewById(R.id.toast_info);
messageInfo.setText(strID);
mToast.setView(v);
mToast.setGravity(Gravity.BOTTOM, 0, 8);
mToast.setDuration(300);
mToast.show();
}
use of android.widget.Toast in project BaseProject by feer921.
the class ToastUtil method showToast.
public static void showToast(String str) {
Toast mToast = new Toast(mContext);
View v = layoutInflater.inflate(R.layout.layout_toast, null);
// TextView messageInfo = (TextView) v.findViewById(R.id.toast_info);
// messageInfo.setText(str);
mToast.setView(v);
mToast.setGravity(Gravity.BOTTOM, 0, 8);
mToast.setDuration(300);
mToast.show();
}
use of android.widget.Toast in project xDrip by NightscoutFoundation.
the class Home method toast.
public void toast(final String msg) {
try {
Context context = getApplicationContext();
Toast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);
toast.show();
Log.d(TAG, "toast: " + msg);
} catch (Exception e) {
Log.d(TAG, "Couldn't display toast: " + msg + " / " + e.toString());
}
}
use of android.widget.Toast in project xDrip-plus by jamorham.
the class Home method toast.
public void toast(final String msg) {
try {
Context context = getApplicationContext();
Toast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);
toast.show();
Log.d(TAG, "toast: " + msg);
} catch (Exception e) {
Log.d(TAG, "Couldn't display toast: " + msg + " / " + e.toString());
}
}
use of android.widget.Toast in project android_packages_apps_Settings by omnirom.
the class WebViewUpdateServiceWrapper method showInvalidChoiceToast.
/**
* Show a toast to explain the chosen package can no longer be chosen.
*/
public void showInvalidChoiceToast(Context context) {
// The user chose a package that became invalid since the list was last updated,
// show a Toast to explain the situation.
Toast toast = Toast.makeText(context, R.string.select_webview_provider_toast_text, Toast.LENGTH_SHORT);
toast.show();
}
Aggregations