Posted By

jake89 on 07/19/13


Tagged

android


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Priestd09


custom toast


 / Published in: Java
 

How to add custom layout to TOAST

  1. LayoutInflater inflater = getLayoutInflater();
  2. View view = inflater.inflate(R.layout.cust_toast_layout,
  3. (ViewGroup) findViewById(R.id.relativeLayout1));
  4.  
  5. Toast toast = new Toast(this);
  6. toast.setView(view);
  7. toast.show();

Report this snippet  

You need to login to post a comment.