sahasbhop / apng-view Goto Github PK
View Code? Open in Web Editor NEWAndroid custom Drawable view that can display and animate APNG resources.
License: Apache License 2.0
Android custom Drawable view that can display and animate APNG resources.
License: Apache License 2.0
Feature request: I'm displaying an APNG with numPlays set to 1 and I'd like the APNG to keep showing the last frame instead of the first when the animation ends. Is it possible?
Thank you!
I`m so sorry to disturb you.when i use yours method to initialized Imageloader in my application,there IllegalStateException: ImageLoader must be init with configuration before using.Do you know why?
why hint "Clear cache and reload" all the time ??
if you just set the width and height of imageView with wrap_content
,then the image would not show!
Will throw:
Failed to ensure directory: /storage/extSdCard/Android/data/{your.package.name}/cache
When the picture is too big, it has OutOfMemoryError.
When i use the apng on the net, it apears normal. While i use the apng in the drawable file, it cannot work. Could you help me ? Thanks.
when i add you library to my new projicet ,my project run cast a warning like this: W/ImageLoader﹕ memoryCache() and memoryCacheSize() calls overlap each other,libEGL﹕ call to OpenGL ES API with no current context (logged once per thread),could you tell me why ? thxs sir
ApngDrawable.getFromView(iv_earn_money) 一直是null
Firstly, Thank you for providing this project, it helped me. Thank you.
Second, I hope that it can be simplified. I wasted lots of time to download a lots of jars. Are they all need for this project?
When image situated inside root assets folder ("assets://ic_loading1.png") in ImageView showing static image.
But if image inside assets/apng ("assets://apng/ic_loading.png") - all work fine
Not work url without extension : (ex. http://128.199.95.80/sites/default/files/A9041AB7916E493C6381F96B5EE29C3D)
Log
sendRequest>>
08-06 23:28:20.744 5633-6372/com.github.sahasbhop.apngview.sample I/System.out: [OkHttp] sendRequest<<
08-06 23:28:21.070 5633-5633/com.github.sahasbhop.apngview.sample D/FeatureProxyBase: FeatureProxyBase class constructor
08-06 23:28:21.070 5633-5633/com.github.sahasbhop.apngview.sample D/MultiWindow: MultiWindowProxy constructor.
08-06 23:28:21.070 5633-5633/com.github.sahasbhop.apngview.sample D/FeatureProxyBase: getService(), serviceName = multiwindow_service_v1
08-06 23:28:21.154 5633-5633/com.github.sahasbhop.apngview.sample V/SettingsInterface: from settings cache , name = sound_effects_enabled , value = 0
08-06 23:28:21.154 5633-5633/com.github.sahasbhop.apngview.sample V/ImageFragment$1: onClick # Start animation
08-06 23:28:22.176 5633-5633/com.github.sahasbhop.apngview.sample I/Choreographer: Skipped 62 frames! The application may be doing too much work on its main thread.
08-06 23:28:22.178 5633-5710/com.github.sahasbhop.apngview.sample D/Surface: Surface::setBuffersDimensions(this=0xb45a6400,w=540,h=960)
08-06 23:28:22.183 5633-5633/com.github.sahasbhop.apngview.sample W/ContextImpl: Failed to ensure directory: /storage/sdcard1/Android/data/com.github.sahasbhop.apngview.sample/cache
08-06 23:28:22.185 5633-6365/com.github.sahasbhop.apngview.sample I/System.out: open:http://128.199.95.80/sites/default/files/A9041AB7916E493C6381F96B5EE29C3D
08-06 23:28:22.186 5633-6365/com.github.sahasbhop.apngview.sample D/libc-netbsd: [getaddrinfo]: hostname=128.199.95.80; servname=(null); cache_mode=(null), netid=0; mark=0
08-06 23:28:22.186 5633-6365/com.github.sahasbhop.apngview.sample D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0
08-06 23:28:22.186 5633-6365/com.github.sahasbhop.apngview.sample I/System.out: [CDS]rx timeout:20000
08-06 23:28:22.186 5633-6365/com.github.sahasbhop.apngview.sample I/System.out: [OkHttp] sendRequest>>
08-06 23:28:22.186 5633-6365/com.github.sahasbhop.apngview.sample I/System.out: [OkHttp] sendRequest<<
08-06 23:28:22.284 5633-6365/com.github.sahasbhop.apngview.sample E/ImageLoader: /data/data/com.github.sahasbhop.apngview.sample/cache/uil-images/1515367486.0: open failed: ENOENT (No such file or directory)
java.io.FileNotFoundException: /data/data/com.github.sahasbhop.apngview.sample/cache/uil-images/1515367486.0: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.FileInputStream.(FileInputStream.java:76)
at java.io.FileInputStream.(FileInputStream.java:103)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromFile(BaseImageDownloader.java:180)
at com.github.sahasbhop.apngview.assist.ApngImageDownloader.getStreamFromFile(ApngImageDownloader.java:50)
at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:90)
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.getImageStream(BaseImageDecoder.java:98)
at com.nostra13.universalimageloader.core.decode.BaseImageDecoder.decode(BaseImageDecoder.java:74)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.decodeImage(LoadAndDisplayImageTask.java:265)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:238)
at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:482)
thx.
Hi. I tried to used the library but I cannot make it work. Could you please help me? Thanks
E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.github.sahasbhop.apngview.ApngImageLoader" on path: DexPathList[[zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/base.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/lib/arm64, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/base.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.example.castremotedisplay-KguH_SDICfOxYQuU3qdm-w==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
i meet the question on Android Q:
2020-06-22 18:37:31.412 28109-28109/xxxxx E/ImageLoader: No field mMaxWidth in class Landroid/widget/ImageView; (declaration of 'android.widget.ImageView' appears in /system/framework/framework.jar!classes3.dex)
java.lang.NoSuchFieldException: No field mMaxWidth in class Landroid/widget/ImageView; (declaration of 'android.widget.ImageView' appears in /system/framework/framework.jar!classes3.dex)
at java.lang.Class.getDeclaredField(Native Method)
at com.nostra13.universalimageloader.core.imageaware.ImageViewAware.getImageViewFieldValue(ImageViewAware.java:132)
at com.nostra13.universalimageloader.core.imageaware.ImageViewAware.getWidth(ImageViewAware.java:79)
at com.nostra13.universalimageloader.utils.ImageSizeUtils.defineTargetSizeForView(ImageSizeUtils.java:54)
at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:231)
at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:320)
at com.github.sahasbhop.apngview.ApngImageLoader.displayApng(ApngImageLoader.java:92)
and how to solve it?
java.lang.IndexOutOfBoundsException: Invalid index 25, size is 25
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.github.sahasbhop.apngview.ApngDrawable.createAnimateBitmap(ApngDrawable.java:342)
at com.github.sahasbhop.apngview.ApngDrawable.drawAnimateBitmap(ApngDrawable.java:313)
at com.github.sahasbhop.apngview.ApngDrawable.draw(ApngDrawable.java:229)
at android.widget.ImageView.onDraw(ImageView.java:1226)
at android.view.View.draw(View.java:16256)
at android.view.View.updateDisplayListIfDirty(View.java:15253)
at android.view.View.draw(View.java:16026)
他报这个错误的时候,前面还有个错误说是找不到文件
E2C5859598AAE6C0E42B857B90B6567C_025.png: open failed: ENOENT (No such file or directory)
我不知道这是什么原因,可以看一下吗
I have used Glide to load network Image, Can you support to use Glide to load network Image, instead of UIL?
This lib contains many nullpoint/Illegal exceptions.
Should be careful.
I`m so sorry to disturb you.when i use yours method to initialized Imageloader in my application,there IllegalStateException: ImageLoader must be init with configuration before using.Do you know why?
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.