Code example for DialogFragment

Methods: getActivity, onActivityCreated

0
        return view;
    } 
 
    @Override 
    public void onActivityCreated(Bundle arg0) {
        super.onActivityCreated(arg0);
        mCallback = (PinentryCallback) getActivity();
        NativeHelper.setup(getActivity());
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        new Thread(new Runnable() {
 
            @Override 
            public void run() { 
                // This function does major magic 
                // it blocks (hence the thread) 
                // when it returns it means gpg-agent is no longer communicating 
                // with us