storage-chooser
storage-chooser copied to clipboard
getter for fragmentManager is deprecated
Thanks for your beautiful storage chooser. Just wanted to say getter for fragmentManager is deprecated in API level 28. Handle it!
Thanks for the heads-up ! Will have to think of a way to make use of both the fragmentManager for API 14 and below as well.
getParentFragmentManager() .beginTransaction() .replace(R.id.nav_host_fragment, fragment, fragment.tag) .commit()
I still don't get how can I use it in a fragment. Can you please tell me in a bit detail. I am using this code in my fragment: ` StorageChooser chooser = new StorageChooser.Builder() .withActivity() .withFragmentManager(getFragmentManager()) .withMemoryBar(true) .build();
chooser.show();
chooser.setOnSelectListener(new StorageChooser.OnSelectListener() { @Override public void onSelect(String path) {
}
}); ` This fragment in which I am using StorageChooser is from Navigation Drawer and getFragmentManager() is deprecated. Can you please tell me what should I write in .withActivity() and .withFragmentManager()