Tutorial how to zoom photo on ImageView in Android Studio 1.5.1
Tutorial step by step with free source code: how to zoom photo with scale animation on Image View in Android Studio version 1.5.1.
Create New Project with Application name: Zoom photo; Minimum SDK: API 10 – Android 2.3.3 (Gingerbread).
Add a picture from your computer in drawable folder, with name: photo.jpg.
Create an ImageView in activity_main.xml and display the image:
package com.example.toyo.zoomphoto;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Animation;import android.view.animation.AnimationUtils;import android.widget.ImageView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final ImageView zoom = (ImageView) findViewById(R.id.imageView); final Animation zoomAnimation = AnimationUtils.loadAnimation(this, R.anim.zoom); zoom.startAnimation(zoomAnimation);
}
}
Run your app and see final result: photo is zooming in and out, infinitely.
See video tutorial:
Check next tutorials to learn all about Android.
For furtherquestionsleave a message.
Hi my friend,
Can I know whether you already have the answer or not. I also building an apps which is to zoom in/out of the image. hope you can help me too. Thanks friend 🙂
hi my friend,
I am a beginner. I created an app showing a country map and I want to zoom in/out the map, can you help on that?
thanks a lot
Hi my friend,
Can I know whether you already have the answer or not. I also building an apps which is to zoom in/out of the image. hope you can help me too. Thanks friend 🙂
Congratulations! I loved the easy teaching to follow and understand!
Already thanks.
Will you please describe the attributes you have used in this, because i m a beginner in android.
Hello Sir,
I’m new android developer.
i like your tutorial and i follow you.
thank you so much…
sir, please add new tutorial in “GridGallaryView using Adapter”
i hope you will reply me.
thank you.
Plz help me stop animation on onclick listener. or just zoom once and stop