Skip to content

Instantly share code, notes, and snippets.

@shubhamnikam
Created June 4, 2020 17:58
Show Gist options
  • Save shubhamnikam/ff0a94202a07d2855ed46447bc009ccf to your computer and use it in GitHub Desktop.
Save shubhamnikam/ff0a94202a07d2855ed46447bc009ccf to your computer and use it in GitHub Desktop.
Medium Article - zoomview- MainActivity.java
import android.os.Bundle;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//get view by id
ImageView imageView = findViewById(R.id.imageView);
//pass view to setupZoom method
ZoomView zoomView = new ZoomView();
zoomView.setupZoom(imageView);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment