library/src/main/java/net/rdrei/android/dirchooser/DirectoryChooserFragment.java
private void returnSelectedFolder() {
        if (mSelectedDir != null) {
            debug("Returning %s as result", mSelectedDir.getAbsolutePath());
            mListener.foreach(new UnitFunction<OnFragmentInteractionListener>() {
                @Override
                public void apply(final OnFragmentInteractionListener f) {
                    f.onSelectDirectory(mSelectedDir.getAbsolutePath());
                }
            });
        } else {
            mListener.foreach(new UnitFunction<OnFragmentInteractionListener>() {
                @Override
                public void apply(final OnFragmentInteractionListener f) {
                    f.onCancelChooser();
                }
            });
        }

    }
private void returnSelectedFolder() {
        if (mSelectedDir != null) {
            debug("Returning %s as result", mSelectedDir.getAbsolutePath());
            mListener.foreach(new UnitFunction<OnFragmentInteractionListener>() {
                @Override
                public void apply(final OnFragmentInteractionListener f) {
                    f.onSelectDirectory(mSelectedDir.getAbsolutePath());
                }
            });
        } else {
            mListener.foreach(new UnitFunction<OnFragmentInteractionListener>() {
                @Override
                public void apply(final OnFragmentInteractionListener f) {
                    f.onCancelChooser();
                }
            });
        }

    }
private void returnSelectedFolder ( ) { if ( mSelectedDir != null ) { debug ( "Returning %s as result" , mSelectedDir . getAbsolutePath ( ) ) ; mListener . foreach ( new UnitFunction < OnFragmentInteractionListener > ( ) { @ Override public void apply ( final OnFragmentInteractionListener f ) { f . onSelectDirectory ( mSelectedDir . getAbsolutePath ( ) ) ; } } ) ; } else { mListener . foreach ( new UnitFunction < OnFragmentInteractionListener > ( ) { @ Override public void apply ( final OnFragmentInteractionListener f ) { f . onCancelChooser ( ) ; } } ) ; } }
Returns the selected folder as a result to the activity the fragment's attached to. The
selected folder can also be null.
Returns the selected folder as a result to the activity the fragment s attached to . The selected folder can also be null .