Created
August 2, 2013 21:25
-
-
Save choiboi/6143583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the layout you want and set the values inside that layout. | |
View toastRoot = getLayoutInflater().inflate(R.layout.activity_toast_custom_toast, null); | |
TextView tvToast = (TextView) toastRoot.findViewById(R.id.toast_textview); | |
tvToast.setText(TOAST_CUSTOM_BG_MSG); | |
// Create new Toast object and set the view to the one you want. | |
Toast toast = new Toast(getApplicationContext()); | |
toast.setView(toastRoot); | |
toast.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment