mostafanasiri / androidfilechooser Goto Github PK
View Code? Open in Web Editor NEWA customizable file/directory chooser for Android.
A customizable file/directory chooser for Android.
I would like to use your code but I am having trouble with
new FileChooserDialog.Builder(ChooserType.FILE_CHOOSER, this)
I understand that I need to implement a class for ChooserListener in my module.
It isn't clear to me where and how in my code to do this.
Could you give a small sample file where your code is used, i.e. the part which will be in my app?
My mail is [email protected]. Thanks, Ilan
Getting this error when trying to go back when is in the top level
FATAL EXCEPTION: main Process: com.cedancp.exportwa, PID: 14659 java.lang.NullPointerException: Attempt to get length of null array at ir.sohreco.androidfilechooser.FileChooserDialog.loadItems(FileChooserDialog.java:253) at ir.sohreco.androidfilechooser.FileChooserDialog.onClick(FileChooserDialog.java:217) at android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21153) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I feel this is necessary in a file chooser, to restrict the user from choosing more files than N number of files. Something like setMaxLimit(N) would work, I think.
settitle parameter is not working as expected
I need to select and pickup the selected folder path. Is it possible with your library?
Error is this
FATAL EXCEPTION: main
Process: z.z.z, PID: 13241
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = z.z.z.MainActivity$1)
at android.os.Parcel.writeSerializable(Parcel.java:1468)
at android.os.Parcel.writeValue(Parcel.java:1416)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:686)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1330)
at android.os.Bundle.writeToParcel(Bundle.java:1079)
at android.os.Parcel.writeBundle(Parcel.java:711)
at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:144)
at android.os.Parcel.writeTypedArray(Parcel.java:1254)
at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:398)
at android.os.Parcel.writeParcelable(Parcel.java:1437)
at android.os.Parcel.writeValue(Parcel.java:1343)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:686)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1330)
at android.os.Bundle.writeToParcel(Bundle.java:1079)
at android.os.Parcel.writeBundle(Parcel.java:711)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3701)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4622)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
Caused by: java.io.NotSerializableException: z.z.z.MainActivity
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1344)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1651)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1497)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:959)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:360)
at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1384)
at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1651)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1497)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1461)
at android.os.Parcel.writeSerializable(Parcel.java:1463)
at android.os.Parcel.writeValue(Parcel.java:1416)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:686)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1330)
at android.os.Bundle.writeToParcel(Bundle.java:1079)
at android.os.Parcel.writeBundle(Parcel.java:711)
at android.support.v4.app.FragmentState.writeToParcel(Fragment.java:144)
at android.os.Parcel.writeTypedArray(Parcel.java:1254)
at android.support.v4.app.FragmentManagerState.writeToParcel(FragmentManager.java:398)
at android.os.Parcel.writeParcelable(Parcel.java:1437)
at android.os.Parcel.writeValue(Parcel.java:1343)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:686)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1330)
at android.os.Bundle.writeToParcel(Bundle.java:1079)
at android.os.Parcel.writeBundle(Parcel.java:711)
at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3701)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4622)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
11-11 23:39:33.503 13508-13508/z.z.z E/ViewRootImpl: sendUserActionEvent() mView == null
Cool library looks great & all...but what if we have a custom directory that we(the developers) want to show to our users instead like: .setDefaultDirectory(File dir);
FileChooserDialog.Builder builder =
new FileChooserDialog.Builder(FileChooserDialog.ChooserType.FILE_CHOOSER, this)
.setTitle("Select a file:")
.setFileFormats(new String[]{".png", ".jpg"})
.setFileIcon(R.drawable.ic_file)
.setDirectoryIcon(R.drawable.ic_directory)
.setPreviousDirectoryButtonIcon(R.drawable.ic_prev_dir)
.setDefaultDirectory(File dir);
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
Error:Execution failed for task ':sample:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk\build-tools\26.0.2\aapt.exe'' finished with non-zero exit value 1
If the file chooser type is set to FileChooserDialog.ChooserType.DIRECTORY_CHOOSER
, then
calling setMultipleFileSelectionEnabled(boolean)
will always throw an IllegalArgumentException, even if the program is setting it to false.
I'm using a FragmentManager and I'm opening one fragment after another. The the user choose to open a file, and I add your library inside my existing FragmentManager.
FragmentTransaction fragmentTransaction = getChildFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.fragment, fragment); fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); fragmentTransaction.commit();
I don't add it to the backstack, but when I hit back it's still present in the backstack and the previous fragments wiped from the backstack
Do you know why whould this happen? thank you
I found multiple bugs with the said feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.