Button pop-up bounce animation like What's App - java

I'm trying to make a list of buttons bounce when a view gets visible. But I cannot get the desired result, it doesn't look similar at all.
I tried it with a bounce interpolator and an overshoot interpolator (used on a scale animation), but as said, it doesn't look similar to the desired result.
This is a gif of the desired result, it's from What's App. It's not about the circular reveal, it's only about that bouncing pop-up animation they used on the buttons (document, camera, gallery, audio, ... buttons).

Related

Making a movable and zoomable map

I am making a simple game on android. I want to make a map that would be able to zoom, so the images on it have to disappear when they left the screen. I want to put an image for background and put other images on it. The problem is that the images don't "stick" to the map, so when i zoom the background the images are still in the same place of the screen. I was looking for the solution in the internet, but i didn't find anything. I am writing in Android Studio in java.

Android: Creating an Item Fade Animation when Scrolling (Example Included)

I've seen this specific animation in certain apps where when scrolled, the first item on the window (most commonly an ImageView) gets faded out when scrolling down. Here's two screenshots that display the animated change:
This is from a fashion app named "Polyvore":
The image above displays an ImageView which gets faded out when scrolled. Animated more like.
And after scrolling a bit..
And it ultimately fades out along with the scrolling. Pardon me for I don't know what this 'View' or animation is called. I've seen this in the Google Play Music app as well. How do I implement this?
For anyone else looking for this specific effect. It's known as a Parallax effect. Check this link:
How to do the new PlayStore parallax effect

Android - Place a video at an arbitrary point on a playfield

I need help to place a video at an arbitrary point on a playfield.
I am porting a game which takes place on a playfield - background with animated sprites superimposed. It's working fine.
The activity does a
// Set full screen view
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Off that, I run a View on which all the action takes place. The playfield adjusts in size and offset, depending on screen size and orientation. All that's working fine, and I scale the sprites and their positions accordingly.
But sometimes, I need to place a borderless video on top of an existing background at various specific points in the playfield, and everything I read in stackoverflow is about the video itself and not how to position it. Can anyone help? Where should I start looking?
Ah... It appears that I wanted AbsoluteLayout, which became deprecated in 2009. There is, however, more than one way to skin a cat. I just have to work a bit harder.

android complex graphic element

Good day, I would like to ask for some advice on coding up one pretty strange graphical element.
The point is - there should be a button in the middle (green), but it should be surrounded with an animated element (blue strip around green button on a sketch).
So when user clicks the button, the blue element starts rotating, when he taps again, it stops.
any ideas on that? thanks!
Easiest way is a custom view, where you overwrite onDraw to draw exactly what you want to the canvas. Rotation can be done by keeping track of how many radians of rotation you want and using a rotation matrix on the canvas. Animation can be done by using a Handler to post a delayed message to invalidate the view.
you could make use of the Animation features of android.
make the green button as ImageButton and the blue ring as static drawable.
then create an RotateAnimation which you toggle with the button press. this animation then rotates the drawable that contains the blue ring.
here is something about the rotate animation
http://developer.android.com/reference/android/view/animation/RotateAnimation.html

Libgdx for android shows black before main screen

I am making a game in LibGDX, and I have noticed that when my game is launched a black screen is shown for a few moments before the white screen of my game is drawn.
I have set the background of my app's theme to be a different color with android:windowBackground in my app's style.xml, and the preview window shows that color. However, right before the main screen of my app loads, the screen goes black for a moment before displaying the main screen.
I've tried setting Gdx.gl.glClearColor(1,1,1,1) in the main activity and Game class of my game, but the black screen still shows for a moment before drawing the main screen.
The only way I've found to fix this is to set the android:windowDisablePreview to true, but that disables the preview window all together.
Is there any way to fix this without disabling the preview?
In addition to shifting objects creation to constructor, you also need to shift the ApplicationListener object creation in Activity class's constructor.
The black screen is probably because of the time delay between start of Activity.onCreate() call and end of ApplicationListener.show() call.Try to measure it using a timer or simply System.currentTimeMillis() so the difference would be visible.
This should improve the situation if not eliminate the problem.

Categories

Resources