Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dario61081
Created December 2, 2016 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dario61081/0b56a14d7030406dc1ee38d2e41309c4 to your computer and use it in GitHub Desktop.
Save dario61081/0b56a14d7030406dc1ee38d2e41309c4 to your computer and use it in GitHub Desktop.
Custom toast procedure
private void msg(String message) {
Toast msg = new Toast(getActivity());
View v = View.inflate(getActivity(), R.layout.dlg_save, null);
TextView t = (TextView) v.findViewById(R.id.lbldlgsuccess);
t.setText(message);
msg.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL,0,0);
msg.setView(v);
msg.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment