Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to Ion? #4

Closed
RobotAmiee opened this issue Jul 21, 2014 · 2 comments
Closed

Add support to Ion? #4

RobotAmiee opened this issue Jul 21, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@RobotAmiee
Copy link

I now can't get CircularImageView to work with Ion(https://github.com/koush/ion). Can you take a look and add support to it?

@rinav
Copy link

rinav commented Oct 1, 2014

I am having a similar issue here is the stack trace...
can you give some pointers so that we can try to fix it

I am using ListView, which as this ImageView where I am trying to circle the Image

java.lang.NullPointerException
        at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:590)
        at com.pkmmte.view.CircularImageView.refreshBitmapShader(CircularImageView.java:341)
        at com.pkmmte.view.CircularImageView.invalidate(CircularImageView.java:262)
        at android.widget.ImageView.setImageDrawable(ImageView.java:424)
        at com.koushikdutta.ion.IonDrawable$IonDrawableCallback.onCompleted(IonDrawable.java:140)
        at com.koushikdutta.ion.IonDrawable$IonDrawableCallback.onCompleted(IonDrawable.java:111)
        at com.koushikdutta.ion.BitmapCallback$1.run(BitmapCallback.java:56)
        at com.koushikdutta.async.AsyncServer$RunnableWrapper.run(AsyncServer.java:53)
        at android.os.Handler.handleCallback(Handler.java:733)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5034)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:731)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
        at dalvik.system.NativeStart.main(Native Method)

Pkmmte added a commit that referenced this issue Oct 2, 2014
Provided a short example on loading web images using Ion for issue #4.

Unfortunately, I wasn't able to get a custom Transformation to work with
Ion. The only way I know of successfully loading images with Ion would
be to use the Ion.with(Context).load(url).asBitmap() API with a callback
for image handling.

Nevertheless, I'll continue searching for a proper solution to this.
@Pkmmte
Copy link
Owner

Pkmmte commented Oct 2, 2014

You should be able to make a custom Transformation for Ion just as with the Picasso sample.
Unfortunately, I wasn't able to get that to work. My solution for this would be to use the Ion.with(context).load(url).asBitmap() API with a callback to set the image.

I provided some sample code for this in the latest commit.
Meanwhile, I'll continue searching for a better solution to this and see if I find any.

@Pkmmte Pkmmte closed this as completed Oct 2, 2014
@Pkmmte Pkmmte added the question label Oct 2, 2014
@Pkmmte Pkmmte self-assigned this Oct 2, 2014
@Pkmmte Pkmmte added this to the 1.2 milestone Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants