I want to achieve particle effect when an object is found. I have relative Layout on which I have many ImageViews are Placed now when user click on the ImageViews I want some particle effect to happen ( I do not want sprite animation ). How will I achieve it ? any good reference or help ?
I had the same problem as you, and following the recommendations, I implemented it, and also open sourced it as a library.
https://github.com/plattysoft/Leonids
It is quite easy to use and also very lightweight.
You probably had this sorted out since the question is quite old, but I hope it will be useful to other people with the same problem.
You can check this question which has some good link to Patricle Effects tutorial
How to create fireworks particle graphics effect on android
Related
In this mock up, see the screen where it said "Decrease Traffic", the traffic light pops up from below.
https://dribbble.com/shots/2106573-Intro-App-Interaction
I'm wondering how to create that effect on Android, if possible, any library to do that. Thanks
you can achieve this with Android Property Animations
in your example it seems to be a scale animation from 0 to 1 in x and y direction.
you can also combine different animations to get such or other effects.
My guess is that these kind of animation are to develop with a 3rd party program, and are not done by Android itself.
This way you have a ready-to-instantiate file (.gif maybe?) that you just call when the view pager is switched.
Looking also to the other animations in the example (look # "Meet New Friends", how every circle pops by himself) I think this was the used approach in your example-link.
If you are anyway looking for something that would look like what is done there, I'd suggest you start playing around Animator objects (and its subclasses like Value/ObjectAnimator) to animate the view you want.
This can be done also via XML files, describing the animation you need.
An important role in this do-it-yourself animation is played by Interpolators , who give you the chance to further customize the animation in an easier way (take a look at OvershootInterpolator, which lets your animation go a bit after the destination value you set, just to turn back later, giving you a "blob" effect. This might give a better idea what I'm meaning)
Im experienced iOS dev but new to Android dev and asking some newbie questions here...
I have to make a app where I have a background image and I then place some other images on top of that, and also onto those images I have to place different "glow" images that flicker (opacity on/off), and I need good control on positioning all those images. Now there is not some high performance goal here, and its not many objects, its not really a game.
What is the best approach for this? Can I use ImageView's for this or will it be better to use a Surface and custom draw in a thread?
And please, what ever you suggest, can you give a link to a good tutorial on the approach (ImageView or custom draw), I need all the help I can on this project with its crazy deadline.
Thank you
Søren
In my experience:
if its mostly static you should stick to XML and stuff like ImageViews etc
if its simple animations, the predefined android classes are fine and somewhat easy to use
if you want real custom then drawing with canvas is the way to go
You can extend View and override the onDraw method or create a SurfaceView which has better performance but is not that easy to use.
(sorry i dont have any tutorial links)
Is there a standard solution or some implementation for creating animations with color filter? Specially, I would like to achieve a smooth highlighting animation using LightingColorFilter. I'll be thankful for any suggestions.
As far as I know, there is only alpha/rotate/scale/translate animation. How to implement this kind of animation easily? I am aiming Android 3.0 tablets (API 11).
Did you look at the ColorMatrix Sample in your API demos folder ? It seems that it animates a Bitmap exactly as you want.
However it's a bit more complicated to use than a ColorFilter. I found this SO question which explains how color matrix works (there may be an easier tutorial, but I didn't found anything) :
Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable's Hue
I have tried to achieve an image glow before. What i did to circumvent the problem, was to create 2 images. One (in my case a ball without glow), and another including the glow. Using the alpha animation you mentioned, I was able to get an acceptable result for my case. Perhaps you can use something similar to achieve what you want.
Creating a simple app that calculates the speed your going and displays it in a speedometer graphic. I can do all the speed calculations, gps calculations etc.. but i am not too sure about the animation. Does anyone have any good tutorials or examples on needle gauges other than the thermometer example out there?
I know, the post is quite old. But I had the same situation: there is no a good control for representing speed. I guess many people are facing this.
I've implemented SpeedometerView myself: a simple speedometer with needle and colored value ranges. Feel free to download!
https://github.com/ntoskrnl/SpeedometerView
This control was used in my app CardioMood.
The code is not optimized, but works. Enjoy!
Check here. It is my code. If you have any question please let me know.
Visit https://github.com/mucahitsidimi/GaugeView
You can implement Gauge to your project simply.
<com.sidimi.mucahit.gaugeview.GaugeView
android:id="#+id/gaugeView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
You can set width and height what ever you want to. It will calculate everything automatically.
Check the solution i found for my case.
Big thanks to the owner Evelina Vrabie...
You could probably start with something like this.
Then when transitioning between values, do an animation where the needle gradually moves to the next value X units per unit of time.
This question is also very similar to yours.
I'm trying to create a simple Pegs game. I have drawn the 15-hole board using canvas. I have been programming a while, but games are new to me and I'm stuck on what to do when it comes to handling the pegs. I want to only use the touch screen, but it seems like it is really difficult to touch the pegs and actually select them individually. I plan on just drawing everything programmatically. What is best way on handling this? Using buttons as place holders and changing the button image? Any help would be greatly appreciated.
To be very brief, you have to keep track of the things you draw on the canvas.
I wrote some tutorials for making and moving selectable shapes on the canvas. They should help a lot.
On android it might be a little different than using mousedown, but it should give you a very good starting place.
I don't know if this will help, but you might want to write your own onTouch()function. Check it out