Comment obtenir rootview du fragment?

Je suis à l'aide de cette bibliothèque à l'aide d'un emoji clavier sur mon application.
https://github.com/ankushsachdeva/emojicon

Le fichier Readme unis que le plus haut point de vue de votre activité mise en page de la hiérarchie doit être utilisé pour initialiser la popupwindow.

Mon application est mise en œuvre via des fragments.

C'est le code que j'utilise pour les tests:

public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    View view = inflater.inflate(R.layout.overview1_layout, container,
            false);

    //Give the topmost view of your activity layout hierarchy. This will be used to measure soft keyboard height
    EmojiconsPopup popup = new EmojiconsPopup(view, getActivity());

    //Will automatically set size according to the soft keyboard size        
    popup.setSizeForSoftKeyboard();

    popup.showAtBottom();


    return view;
}

Si j'exécute ce code j'obtiens le message d'erreur suivant dans logcat:

11-02 22:37:16.685: E/AndroidRuntime(30363): java.lang.RuntimeException: Unable to resume activity {com.Testing.full/com.Testing.full.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

EDIT: je suis en utilisant SherlockFragment

getActivity().getWindow().getDecorView().getRootView();

OriginalL'auteur tobias | 2014-11-02