I have 90 images with 480x526 dimension, ~20KB/image (i got from designer) and i need to play animation from images. First i tried AnimationDrawable but it is giving me out of memory error. After that I tired this solution:
Android: make animation from still images
It's working, but sometimes smooth sometimes lagging, (it's seems to be skip x pictures) Which is a best solution for animation? Thanks
Related
I have two fragments on the same screen. One is changing image after every 3 seconds and the other is showing a text with a horizontal animation (from left to right). The image fragment is setting the image from external memory using the method setImageURI.
The problem occurs when a new image is loaded in the view, animated text on the other fragment skips its frames and a kind of glitch appears on that fragment interface.
I have tried changing the image on a Runnable thread as well but that didnt work as well.
Can anyone suggest something better?
And also....can the problem be resolved using a device with a better RAM?
I'm using Fresco to load and display GIF and WEBP for my app.
I have a Gridlayout where I display a list of GIF and WEBP. Images are animating as intented but one thing I notice is that they are not animated at the same time. Some images wait for the other to finish animating before it starts its own animation which is not the way I expect it to be.
Does anyone experienced this before? How to fix it?
This should work out-of-the-box.
Take a look at the animation sample app, where we have 2 animations in parallel (and they animate at the same time).
I have more than 200 images, which I get from the API. I am using ViewFlipper to show slideshow. It has some fade In, Fade Out animations. It is working fine. My question is, is it good to use ViewFlipper with more than 200 images ? Won't it give memory issue ?
I also tried using SurfaceView, but I am not able to give FadeIn, FadeOut animation.
Or Is there any other way of displaying slideshow efficiently?
I am stuck showing frame animation in android. My problem is that I have to animate 36 images. The smallest image is 69 kb in size and the biggest(last frame) is 526kb. A total of 11mb. I know its insane but I need to do it. See images below. The app is already made for iphone and I have to port it to android.
Requirements:
smooth animation
no frame loss
consistent with iphone
The solutions I tried are:
AnimationDrawable by providing in xml files. Problems: the start time is almost 6 -12 seconds. Images lose frames so jaggy experience.
Change imageview bitmap inside a handler. Problems: Frame loss and Out of memory
Create a custom imageview class. Define a method showAnimation() and inside it update bitmap and invalidate() the view unitl the last frame. Problems: Not fitting my requirement. This by far gave the best result but not half as required.
I am a noob in opengl and gamedevelopment. I am unable to find any alternative to my problem. Please help.
Smallest image:
Last image:
I can visualize the effect you are aiming at.I guess doing this will require pushing in different images onto the same imageView, with incremental frame rate.|
The accuracy will depend on the number of images you have. Greater the number of images finer will be the precision.
Also you need to implement incremental frame rate. So that it gives a smoother feel.
Doing this should be possible using a simple loop to change the image resource of the imageView Controller. There must be lag between two iterations, this lag will actually be the frame rate.
I think this can give satisfactory results.
Going for openGL, however, you will not need all these images. It will just require one image of the card that will be animated and duplicated to create the final image. This however is a complex piece of task(I think) so if you are catching some dead lines, you must go for a non-openGL solution like the 1st one, I have suggested.
I have created sprite with texture size of 2048X1024 and attached to my scene.
Things are going fine but problem is that when i attach any other sprite with scene it takes time to display. Without this larger sprite things are displayed without any note able delay.
As I attache this larger sprite other attachments start getting time to display
I am working on AndEngine
Please help if any one solved this kind of problem
Thanks
I can't figure out why you would need an image of that size on your screen. The problem is that Android limits image sizes to around 1024 x 1024 so AndEngine is most likely swapping out the different images. Without seeing your code or knowing what you are trying to do, there's not much I can suggest. except to break your large image down into images smaller than 1024 x 1024. If you are doing a game and are using the image as a background I'd suggest looking into using a program called "Tiled" and loading it up in AndEndine using its TMXLoader. There is a tutorial on the AndEngine forum for this.