storage-chooser icon indicating copy to clipboard operation
storage-chooser copied to clipboard

getter for fragmentManager is deprecated

Open soroushLotfi opened this issue 5 years ago • 3 comments

Thanks for your beautiful storage chooser. Just wanted to say getter for fragmentManager is deprecated in API level 28. Handle it!

soroushLotfi avatar Aug 20 '18 19:08 soroushLotfi

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.

codekidX avatar Aug 23 '18 06:08 codekidX

getParentFragmentManager() .beginTransaction() .replace(R.id.nav_host_fragment, fragment, fragment.tag) .commit()

suzdalenko-dev avatar Mar 20 '20 10:03 suzdalenko-dev

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()

SouravYadav584 avatar Jul 11 '20 10:07 SouravYadav584