I have a quiz of sorts. There are a couple images at the top. What I'd like to do is when a wrong answer is given, rumble one if the images for a second or two and have it settle back into position. Just a small shake in the X and Y. Is this doable? The images are in the same layout as the rest. I don't know if that matters.
Thanks for the help
There's a demo of this in the API Demos, under Views/Animation/Shake.
You can probably use a simple View animation to alter the position as outlined at http://developer.android.com/guide/topics/graphics/view-animation.html.
Related
I have got an android app, i want to add at button click one of 10 images (R.raw.geld1-10) animated from before bottom of the activity to after its top.
I tried to get the numbers of pixels and multiply it with Math.random(), but the problem was that i pressed the button and it lagged hard without reason. It seemed that the generation and animation of this was too much for this uithread. Besides it was NOT an avd, it was a modern smartphone (snapdragon).
Please can anyone help me and send me an alternative with no overhead.
That solved it for me, thank you!
http://developer.android.com/guide/topics/graphics/prop-animation.html
Could anyone lead me in the right direction to build something like the following image? Specifically the bottom part where the contact images appear.
How could I make the table view horizontal and have an arc?
Looking for answers for both ios and android.
Thanks!
There is a great library out there for this on iOS: https://github.com/nicklockwood/iCarousel
Inverted wheel is what you want, you'll need to tweak it a little but that is easily achieved by looking at the demo project.
This should help you on the Android side:
Basically, you get some images from artwork, then you write code with some trigonometry in it.
This will get you started: android-rotaryknob-view
There is a link at the bottom with more detailed code and explanation.
I am stuck in app locker.
Pleas help me to figure out.
Here I use a background image in that there are 9 holes. I need to put images on each hold for password. I try much but each time images are not on the same places on different screens or display devices. Please give me some demo or tutorial. Thank you!
Actually I want to design like the below picture, where the background image is constant with holes, and I want to put on each hole with different pig image. But the problem is I don't know how to design layout for accurate pig position and another important thing is that if the display screen is different, does the layout design work?
I am developing an Android app and am a bit stuck on how I go about creating the layout I'm after. I said spotify-like (website not app) as I dont want the parallax effect. It's actually closer to http://www.poormet.com/.
What I have tested so far is a RelativeLayout with an ImageView and Listview (with transparent dividers) within it. This layout shows the image in the background between rows which is a step in the right direction. The issue is I'm at a loss as to how to get the images to change smoothly depending on what listrows are on screen.
Also, if I want to replicate the text over the images like poormet example mentioned above, then it seems to me I am going to have to have alternating transparent and not transparent rows.
Am I on the right track or am I approaching this problem the wrong way?
Any guidance will be greatly appreciated!!!
(also, please let me know if what I have described doesn't make sense - more than happy to clarify)
Actually, I got a little problem while building my Android App. I want to create a mini-game in my app. It will works like this:
At the begining an image appears
then the app ask the user to zoom-in the picture
then a grid will appear and seperate the picture into pixels (like the one million pixel wall for example)
the user will have to choose one "pixel" of the grid and he will win (or not) some points.
It seems quite simple but i got some issues:
How can i create this grid? (GridLayout? )
How can i put an invisible Grid (opacity=0) on a picture ? (Grid Layout Option Maybe ? )
How can i use the zoom-in option to be as smooth(natural and simple) as possible?
What should i do in order to turn the Grid opacity to 1 when "the Zoom in" effect has been done ?
I know that some several questions are likely answering to the grid problem but I need some personal advices in order to build my own game. General tips and tricks are welcomed. Explanations will be great.
Thanks in advance.
P.S.: Sorry for my English. It's not really my main language but I hope that I am still understandable.
Actually i've found The GridLayout.setalpha(alpha) Option so i know now how to build a grid and to manipulate his opacity.
I just Need now some informations about how to animate this grid with the zoom-in effect and the Zoom-out effect !