Giter Site home page Giter Site logo

Comments (5)

siralam avatar siralam commented on June 27, 2024

Sorry I don't get what you mean, the list disappears when you select an image by design; and the library has nothing to do with onActivityResult. What are you trying to achieve?

from bsimagepicker.

oakware-lda avatar oakware-lda commented on June 27, 2024

Oh sorry, I probably didn't explain correctly. Please check this example:

ezgif com-video-to-gif

As you can see, I have a grid with two images and have the following BSImagePicker.OnSingleImageSelectedListener:

override fun onSingleImageSelected(uri: Uri) {
    startActivity(Intent(this, ImageActivity::class.java).putExtra("uri", uri))
    overridePendingTransition(R.anim.pull_right, R.anim.pull_right_semi)
}

So, when I choose the image I start another activity and pass the uri so I can use the image. The problem is that after this new activity, when I go back to the previous activity (the one with the grid), the grid with the two images doesn't exists anymore.

I am pretty sure that the problem is the "dismiss()" on line 396 of the BSImagePicker.java class:

adapter.setImageTileOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        if (v.getTag() != null && v.getTag() instanceof Uri && onSingleImageSelectedListener != null) {
            onSingleImageSelectedListener.onSingleImageSelected((Uri) v.getTag());
            dismiss();
         }
     }
});

I know this is the normal behaviour of the library, and probably this is not even an issue, but would be nice to not dismiss the picker after an image click. Maybe add another method to the Builder to .dismissAfterClick(false).

I hope that you understand my issue. Anyway, thank you for your hard work and for this library!

from bsimagepicker.

siralam avatar siralam commented on June 27, 2024

Understood now! That is a valid suggestion, I will add it soon :) Thanks!

from bsimagepicker.

siralam avatar siralam commented on June 27, 2024

Thanks to @ikakus this will be added to next version.

from bsimagepicker.

siralam avatar siralam commented on June 27, 2024

Implemented in 1.1.0

from bsimagepicker.

Related Issues (20)

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.