android image transition - android

What is the best way in android to make animation for image transition between images?
what is the best way to re-size the image to fit the screen?
thanks to all

use viewflipper. maybe not the best but it really works if you wanna customize animation in view transition.
set the image as the background of imageview or some layout.

Related

How to create Imageview stack

I want to display image view like below where one image will be below other. I'm using Picasso to set image. But it is setting image in entire space whereas I want to set only on the top layer. How to achieve this.
Any help would be appreciated.
Use StackView.
https://developer.android.com/reference/android/widget/StackView.html
I've only used a widget application, but I probably think to be able to use it on other scene.

using animation in imageview while changing image

I have used the code here to animate changing image of an ImageView. But it converts the first image to a white screen and then fade the white screen into the final image (no matter if I use background for ImageView or not).
the same effect is appeared when using slide_out_right and slide_in_left.
Question:
How can I directly go from current Image to a new Image using a custom Animation?
I know that it is possible when using ImageSwitcher but I wanne do it in an ImageView
TransitionDrawable is not the solution because it is applicable only for fade. I wanna use translate or any custom animation.
thanks for any help
Edit:
I think I got the answere, but I am not sure if it an efficient solution:
the white screen is because I am animating the whole ImageView. when it goes out the display what appeared is the Layout background which is white.
To solve the problem, I used two ImageViews and copy the current Image to one and the new image to the another one. animation_in is applied to the imageview containing new image and animation_out to the other one.

Activity with blur image

I have main activity with background image and with some buttons,editext and textviews.
Now when I launch this activity I should have the background image with blur effect and all the controls visible.
I have done this way but result with no effect
getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
As it is already deprectaed. Can anyone suggest me the best way to do this?
You can try these implementations for one that suits you the most:
Fast Bitmap Blur For Android SDK
Advanced blurring techniques
Blur effect for Android design

Android slide ImageView from top to bottom

I'm trying to develop a game which has the track sliding down from the top to the bottom. When you start the track(which is a large image) is "out of screen" then it slides from the top and goes out at the bottom. The images might be very large, larger/taller than most screens.
I can animate the image with animations, but Android scales the image to the screen size on load, which I dont want. How can I keep the original size of the image?
I dont think using ScrollView would be good since I dont want the user to scroll the image.
This is what I would like to achieve:
As a quick fix you could try to wrap you ImageView with an AbsoluteLayout. Check an answer to the question How to create a view that is bigger than the screen?
Be aware it's deprecated and for the stable future use you have to get another solution.

Android - Zoom in/out from multiple ImageViews

Im working on a application that should be able to have diffrent ImageViews applied to a view or layout and zoom in and out from them. Similair to create a chessboard where each square represent a ImageView and then I can zoom out or in from the whole chessboard.
I want to chose a particular ImageView and then add a tween animation to it like a bounce or scaling.
Whats the best approch to do this in Android?
First of all you will need to check which image is focused. To check this you can try :
Image focusedImg = getViewById(R.id.YourMainLayout).findFocus();
Now, once you have the focused image you need to apply tween animations on it. Follow the below mentioned link to apply twwen animation :
http://chengalva.com/dnn_site/Home/tabid/41/EntryId/57/Android-Tween-Animations.aspx
Best,
Shraddha

Categories

Resources