views:

164

answers:

1
+2  Q: 

Change Toast Font

Currently, I'm trying to develop an app. and I don't know how to change the Toast font. .

 final OnClickListener clickListener = new OnClickListener() {

    public void onClick(View v) {
            try {
                Toast.makeText(nova.this,"Hello", 500000).show();
            }
            catch (Exception e) {
                Toast.makeText(nova.this,"Exception:" +e, 500000);
            }
        }
    };

I want to change the text "Hello" with custom font I've tried with TypeFace.

and Then, I want to set a variable at the place "TextClicked" .. I've tried with a local variable .. but it doesn't work

any help with example source code will be really great for me.

+4  A: 

From the official documentation:

Create your custom ToastView

Roflcoptr
Thanks! Got it.
mgpyone