GithubHelp home page GithubHelp logo

Comments (16)

Piasy avatar Piasy commented on July 1, 2024 2

Checkout v1.3.1

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

Why do we need this?

from bigimageviewer.

HR avatar HR commented on July 1, 2024

I need to override SubsamplingScaleImageView's protected void onSizeChanged(int w, int h, int oldw, int oldh) method in order to change its default device orientation behaviour (which is flawed)

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

I think we can add a setSSIV method to BigImageView, which will add the provided SSIV as its first child, then we can add a useExternalSSIV attribute(boolean), which means it should not create a SSIV itself. Waiting for your PR :)

from bigimageviewer.

HR avatar HR commented on July 1, 2024

OK but what about the AttributeSet (i.e. attr at init) required by the custom Subsampling Scale Image View to initialise since its constructor is SubsamplingScaleImageView(Context context, AttributeSet attr)?
You can not cast the BigImageView XML view into a CustomSubsamplingScaleImageView

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

Oh I got it, as BigImageView is a FrameLayout, maybe we could just declare a custom SSIV in layout xml file, then we only need useExternalSSIV attribute(maybe name it useXmlSSIV is better), please try that.

from bigimageviewer.

HR avatar HR commented on July 1, 2024

I'm not sure how that would solve the problem since I need to instantiate a CustomSubsamplingScaleImageView class not resource.

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

Declare it in layout xml file, use it as SSIV instance needed by BIV.

from bigimageviewer.

HR avatar HR commented on July 1, 2024

So use it like

CustomSSIV customSSIV = (CustomSSIV) findViewById(R.id.CustomSSIView);
BigImageView bigImageView = new BigImageView();
bigImageView.setSSIV(customSSIV);
bigImageView.showImage(Uri.parse(url));

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

No, findViewById call should happen in BIV constructor, and also we don't need an extra boolean attribute. If we find a SSIV, then use it, else we new a SSIV.

from bigimageviewer.

HR avatar HR commented on July 1, 2024

Then how would you pass your custom SSIV class to BigImageView ?

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

With my last comment, we've already done.

from bigimageviewer.

HR avatar HR commented on July 1, 2024

I'm still not sure how you would specify a custom SSIV class since what you seem to be talking about is a custom SSIV layout

Can you please provide examples to clarify things?

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

See this commit :)

from bigimageviewer.

HR avatar HR commented on July 1, 2024

Awesome! It works. Can you please merge and release ASAP?

from bigimageviewer.

Piasy avatar Piasy commented on July 1, 2024

Sure :)

from bigimageviewer.

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.