IllegalArgumentException workaround

bug report https://developers.facebook.com/bugs/353456904718758?browse=search_4fabb8d7a893d8119208165

implemented suggested solution  http://stackoverflow.com/questions/2745061/java-lang-illegalargumentexception-view-not-attached-to-window-manager