StandaloneFileBrowser.java 641 B

1234567891011121314
  1. package com.sfb.standalonefilebrowser;
  2. import android.app.Activity;
  3. import android.content.Context;
  4. public class StandaloneFileBrowser {
  5. public static void showOpenFileDialog(final Activity activity, final String title, final boolean selectMultiple, final StandaloneFileBrowserAndroidListener listener) {
  6. StandaloneFileBrowserFragment fragment = new StandaloneFileBrowserFragment();
  7. fragment.setFileBrowserAndroidListener(listener);
  8. fragment.setMultiple(selectMultiple);
  9. fragment.setTitle(title);
  10. activity.getFragmentManager().beginTransaction().add(0, fragment).commit();
  11. }
  12. }