I need to create a custom animated toast message. Now i need to know if that is possible. I've created a toast with a custom view but I cannot figure out how can I add custom animation to the toast.
Here is the code I have so far.
private void showToast() { LayoutInflater inflater = getLayoutInflater(); View layout = inflater.inflate(R.layout.custom_toast, (ViewGroup) findViewById(R.id.custom_toast_layout_id)); // set a message TextView text = (TextView) layout.findViewById(R.id.toast_text); text.setText("Button is clicked!"); // Toast... Toast toast = new Toast(getApplicationContext()); toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0); toast.setDuration(Toast.LENGTH_LONG); toast.setView(layout); toast.show(); } }); }