michaelye / EasyDialog

A lightweight, flexible tip dialog in Android
Other
705 stars 191 forks source link

EasyDialog in fragment #12

Closed iffanmajid closed 8 years ago

iffanmajid commented 8 years ago

I cannot target EasyDialog when it called in onCreate or onViewCreated. How to use it?

michaelye commented 8 years ago

Hi,I think maybe in onCreate or onViewCreated method,the views not been inflated,so EasyDialog can NOT get the location,so,just try

view.postDelayed(new Runnable() { @Override public void run() { //show EasyDialog after 200ms } }, 200);

//or

final Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { //show EasyDialog after 200ms } }, 200);