Android :: Any Way To Speed Up Drawing To Make Animation Smooth?

Aug 26, 2009

I am creating an app that show some histograms off your traveling speed in different time periods (histogram for the last minute, histogram for the last 2 minutes etc.) I would like to have an animation, and have discovered that drawing everything takes around 300-400ms. Which is to long for making my animation smooth, the animation itself is quite simple (2 lines and 2 dots). What I draw every frame right now is 20 antialised strings, size 14, in average ~5chars 8 of these strings will change every second. 1 of the string will change with the animation (this will become 5 strings if there is time).

The main part of the screen, the one showing the histogram data, consist of a lots of squares which needs to be updated every second. (450 squares). The presentation is split into 5 frames in the same view (has to be same view as arrows in one frame might point into another frame). Invalidating only a part off the screen makes almost no difference (it does becomes a bit faster, but i still execute all my drawing stuff). I have tried to add a flag whether or not the main part is dirty, but if I don't draw it, it is cleared. I might be missing something here. One possibility could be to render all the mostly static stuff to a bitmap, and then simply draw the bitmap. That would mean 10 strings only had to rendered on orientation change.

I think it would make sense since the slowest routine is the one drawing all the text. (the following is a typical timing for the drawing routines, accumulated).
V/HMMULTIBAR( 352): 0 - Drawing time: 0 ms V/HMMULTIBAR( 352): 1 - Drawing time: 53 ms V/HMMULTIBAR( 352): 2 - Drawing time: 62 ms V/HMMULTIBAR( 352): 3 - Drawing time: 85 ms V/HMMULTIBAR( 352): 4 - Drawing time: 280 ms V/HMMULTIBAR( 352): 5 - Drawing time: 303 ms
I would really appreciate comments about whether or not offscreen rendering is the way to go, or if there is a simpler way.

Android :: Any way to Speed Up Drawing to Make Animation Smooth?


Android :: Achieve Ultra Smooth OpenGL/ES Animation

Feb 1, 2010

I am drawing a pretty simple scene, with one large texture the about size of the screen (two triangles). I notice that the frame-rate is irregular: in most of cases, a frame finishes in 17 ms. However, in about 1 of 10 times, the frame finishes in 33ms.

My guess is probably some background services need to run. However, the Linux scheduler is biased towards my FG app, so the BG services are usually starved, until they can't take it anymore and they grab the CPU from my app ....

I am seeing stuttering in the animation. Is this due to the irregular frame rate? Should I delay each frame so that all frames are rendered with 33ms frame time? If so, what's the best technique of achieving this?

Is there an API that I can call to guarantee CPU resources for the render thread .... I really hope Android runs on some sort of real time kernel ...

View 7 Replies View Related

Android :: How To Speed Up Animation?

Jul 21, 2009

I have a static background image, and a foreground that needs to be animated. I tried a couple different approaches but the animation seemed choppy. One thing I did was having 2 different views, constantly calling invalidate() on the foreground view. Another was to have only 1 surfaceview, redrawing the background image and the foreground on each step of the animation.

While a surfaceview offers an optimal way to do heavy-duty animation, having to redraw the background every time kills the performance. Neither produced a smooth animation. What is the best way to perform this kind of animation - static background and animated foreground?

View 6 Replies View Related

HTC Hero :: Music Player Skippy / Laggy - Make It Smooth?

Apr 5, 2010

Not sure if anybody has this issue. I have a telus HTC hero and when I am in the music player, whether it be the stock player or not, if I let music play in the background, then lock/unlock the phone or if it sits with the screen on and then locks by itself, the music will skip or "cut out" for a half second and then continue. I don't remember youtube reviews of the phone music player showing this happening. Anybody else have this issue or does your music play smoothly regardless of locking/unlocking?

View 2 Replies View Related

Android : Want To Control Animation Speed

Jun 4, 2010

My app has a small web view that I want to animate into place once the page has finished loading. My code...

View 2 Replies View Related

General :: CRT TV Off Animation - How To Speed Up

Apr 6, 2012

I have working CRT TV off animation on my HTC magic. But it's working sloow. How to speed up this? Where in services.jar is file with animation runtime value for this animation?

View 2 Replies View Related

How To Change Speed Animation At Runtime

Mar 1, 2012

i have a list sprites in drawable folder. One xml file with:

PHP Code:

<?xml version="1.0" encoding="utf-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android" >    <item android:drawable="@drawable/fire_00000" android:duration="400" />    <item android:drawable="@drawable/fire_00001" android:duration="400" />    <item android:drawable="@drawable/fire_00002" android:duration="400" />    <item android:drawable="@drawable/fire_00003" android:duration="400" />    <item android:drawable="@drawable/fire_00004" android:duration="400" /></animation-list>

i used AnimationDrawable to run sprites on ImageView, now. i want to set duration properties by hand, if i have a seekbar to change this. How can i do that?

View 1 Replies View Related

Android :: How To Make A Smooth Image Rotation In Android?

Oct 27, 2009

I'm using a Rotate Animation to rotate an image that I'm using as a custom cyclical spinner in Android. Here's my rotate_indefinitely.xml file, which I placed in res/anim/:
<?xml version="1.0" encoding="UTF-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:from Degrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:duration="1200" />
When I apply this to my ImageView using AndroidUtils.load Animation(), it works great!

View 3 Replies View Related

HTC EVO 4G :: Custom Boot Animation / Speed Of Display

Oct 16, 2010

I have a custom boot animation on my phone that I downloaded and it works but I would like to show it down a little bit. It runs through the animation really fast. If it was a little short it would be great. If I go into the boot animation.zip there are two files. One is a file that just has a few numbers in it the other is a bunch of pictures. Does that number file determine the speed it displays those pictures?

View 1 Replies View Related

Android :: Best Way To Make Games Run At Same Speed On Any Device

Aug 19, 2010

I have a game out on Android, and it runs in a single thread. Performs the work in run() and the draws in onDraw().Pretty simple.However, on a Droid it runs much faster than on a G1.What is a best practice for ensuring that the game runs at the same speed regardless of the device?

View 2 Replies View Related

Android :: Way To Make Weather Radar Animation In Web Site?

Nov 26, 2009

Does anyone know how to make the radar animate either in a weather app or web site? For example, when I click on a radar image that normally shows rain looping, all the droid does is show where the rain is located on the map with no movement. Make sense? Thanks for any help. I already have All Animations checked in the Sound and Display Settings.

View 4 Replies View Related

Android :: Make Animation Visible Above Other Views On Layout?

Aug 13, 2009

How can i make my animation visible above other views on the layout. i tried with the zorder adjustment but it didn't work out.

View 2 Replies View Related

Android :: Alpha Animation - Staying In Last Animation Frame When Animation Is Completed

Nov 17, 2010

I'm fading out an imageview with alpha animation. I'd like the image to stay transparent after the animation. Tried with different combinations of fillAfter and fillEnabled, no luck. How can this be achieved?

View 1 Replies View Related

General :: Any Mod To Make Upload Speed Consistent?

Nov 22, 2013

I'm using Wi-Fi hotspot to connect my ps3 to mobile network but gameplay is slightly laggy. I've been told this is because of slow/inconsistent upload speeds. So is there an app/mod to make upload speed of my network faster or more consistent?

View 3 Replies View Related

Motorola Droid :: Make A Speed Dial On Phone?

Nov 8, 2009

Can you make speed dials on this phone?

View 42 Replies View Related

HTC Droid Eris :: 2.1 OTA Not Setting Speed Dials / Make It Possible?

May 25, 2010

My wife's stock 1.5 Eris got the 2.1 update the other day. Since then she cannot setup her speed dials. It goes through like it works, but there are still no speed dials in the list. I cleared cache and data from Dialer and the two People apps in the manager, but it hasn't resolved it. VZW support last night had me do a battery pull, but that also didn't help.

So other than the Factory Reset option, is there anything I can do? Are there any apps specific to Speed Dials? I'd like to avoid the reset at all costs, if possible.

View 5 Replies View Related

HTC Incredible :: Want To Make A Boot Animation

Aug 29, 2010

So last night I decided to try and change my boot animation but when I restart my phone I still have the stock verizon one. I have received the 2.2 update and not sure if that matters. And I was wondering what are the requirement to make a boot animation. I'm a huge UFC fan and would love to have a .gift of a fight or something.

View 3 Replies View Related

HTC Incredible :: How To Make Own Boot Animation?

Oct 12, 2010

Can someone help me find a guide on making my own boot animation? I found a live wallpaper zip with the .png files and I wanted to make my own boot animation to share.

View 3 Replies View Related

HTC Desire :: How To Create A Boot Animation / Make It My Own

Aug 27, 2010

I have downloaded a few boot animations but has someone got a guide on how to make my own?

View 2 Replies View Related

Motorola Droid :: How To Make Boot Animation More Personalized?

Dec 20, 2009

I really like the stock boot animation, but wanted it to be a little more personalized. I like it a lot. Made it into a gif file easier to share.

View 7 Replies View Related

General :: Boot Animation - How To Make Flashable Zip File

Oct 11, 2013

Making boot animation? I need to know how to make the flashable zip file I already have the images created

I need them optimized as well, not sure what tool is needed or how to make it? Its for the SG4.

View 2 Replies View Related

Android :: Animation.start - Or Animation.startNow - Does Not Start The Animation Immediately

Aug 30, 2010

I have a strange issue - from time to time the animation that should fade out my control (ImageButton) does not kick in immediately. I am using the fadeout animation to hide it and then in myListener on its end (onAnimationEnd) I put new resource as the image on the button.

Somewhere in my app code:

Animation a = AnimationUtils.loadAnimation(this,R.anim.fadeout); a.setAnimationListener(new myListener(location)); buttons[location].setAnimation(a); a.startNow(); // regardless if its start() or startnNow() it will work in most of the cases but not 100% reliable I actually can see in debug Log when its late, happens after few more clicks

Then in myListener.onAnimationEnd(Animation a):buttons[location].setImageResource(R.drawable.standard_button);

Seems there is a rule that the every 4th or 5th animation does not start ...

View 1 Replies View Related

Android :: Frame Animation Callback When Animation Is Complete

Jul 29, 2010

Is it possible in Android to get a callback when a Frame Animation (AnimationDrawable) has completed playing its frame sequence? I know when a Tween Animation has completed, it calls onAnimationEnd(), but is there something similar for frame by frame animations?

View 1 Replies View Related

Android :: Getting Smooth Gallery Scrolling

Sep 17, 2010

I am working on a application, in which I want to show Image gallery containing full screen images. I have put the gallery in the application successfully. But I am failing to apply some properties to the gallery as per the app design demands. I am using android.widget.Gallery library of android. The things I am failing to do are:

1) I wanna scroll the gallery images one at a time, as now its getting scrolled more than one images in one scroll.

2) And on scrolling the gallery, the images coming next from left/ right should move smothly into the screen and should stop at the screen edges. It should not scroll beyong that in one scroll.

View 2 Replies View Related

Android :: Examples Of Smooth Scrolling?

Nov 24, 2010

Probably this question is answered. If it is, could you point me in the right direction then.
I would like to add the smooth scrolling functionality into my application.
i.e. I have a huge text and I want to scroll it automatically (like in book readers)
Could anyone offer any examples of smooth scrolling?

View 1 Replies View Related

Android :: Smooth Gradient On Different Devices

Jul 26, 2010

In my app i have gradient as drawable which i am using as background and i want it to make it look as smooth as possible. After googling and trying by myself i came up with the following. On nexus one if you call only setDither(true) your gradient is still banding so you have to set PixelFormat like this Window.setFormat(PixelFormat.RGBA_8888). But on the other side G1 does not support RGBA_8888 so calling it make the gradient even uglier than before so Window.setFormat(PixelFormat.RGBA_8888) will not work well on devices that don't support it.What is the correct way smooth my gradient on all devices on which my app will run.

View 1 Replies View Related

Android :: Animate 2D Game Smooth Without OpenGL?

Sep 14, 2010

im currently playing around with a Game that architecture is basically like the example 2d Games like JetBoy / LunarLander and so on. But as things now running (and animating continuously) they have kind of "hiccups" when the GC is running. I have done all i can to allocate as much Objects in front. There is nearly nothing that is created "new" besindes some Strings that are used to set the Score and so on. (TextView doesn't take int's =( - So do you have similar Problems that the GC is "lagging" your 2s game ? any solutions ?

View 12 Replies View Related

Android :: Smooth Transition Of Images From One Position To Other

Apr 16, 2009

I am using opengl es for images to translate from one position to other. But, the transition is not going in a smoother manner they are just jumping from one position to other. How can I get smooth transition of images? Rightnow I am using glRotatef() and gltranslatef(). Do I need to add anything extra? Please do respond.

View 4 Replies View Related

Android :: How To Do Smooth Transition Between Video Segments

Oct 27, 2010

I am working on an porting an application supporting segmented video streaming to Android. For those who are not familiar with segmented streaming, it is when a complete video is divided into multiple segments. Each segment can then, for example, be encoded at different qualities to support different clients.

Anyway, my problem is that I am not able to get a smooth transition between segments. Currently, the only way I have gotten segmented streaming working, is to write the segments into independent, temporary files, and then load each file into the MediaPlayer once the previous has finished. This causes an interruption in playback between each segment, probably due to the I/O involved.

I have looked around for different solutions, among others, playlists and storing the videos directly in memory. However, none seem to work or be supported by Android. Also, I tried creating two MediaPlayer- objects and do something similar to double-buffering by preparing the next segment well ahead of the previous, but it only made the application unstable.

My question is therefore: Does anyone have any hints, tips or examples for how to do smooth transition between video segments? The segments I am working with are independent, so there is no dependency and they can be viewed as X number of independent video files.

View 6 Replies View Related

Android :: Use Webview As A ListItem And Have Smooth Scrolling?

Feb 15, 2009

I am showing a RSS feed in my application using Webview as ListItem and it works great except that it is very sluggish at times. Since I don't know the size of the content then I can't set the height of each Webview and therefore I have the following code (this is the code for a single ListItem)...

But the "wrap_content" causes the Webview to readjust size when scrolling. The scrollbar-indicator of the listview also has problems knowing the size of the complete list so it changes size when scrolling. All this causes a very "jerky" experience when scrolling.

Is there any better way of doing this?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved