Giter Club home page Giter Club logo

androidfilechooser's People

Contributors

shamilovstas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

androidfilechooser's Issues

example code of ChooseListener

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

Back to top directory NullPointerException:

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)

Max limit of files selected

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.

Force close when the dialog is open and you press home button is onpause

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

Feature request!

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

after compile

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

Directory mode error

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.

Handling back button when adding fragment in existing FragmentManager

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

Bugs with Multiple Selection Feature

I found multiple bugs with the said feature.

  1. Selected files in the list are not highlighted, which makes it very difficult for the user to know which files have been selected.
  2. By default, the button for the selection has no text.
  3. As I wrote in the previous issue, there's no limit to how many files can be selected. Also, to add to this, there should be a counter showing the total number of files selected out of the limit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.