Search in sources :

Example 1 with OnPhotoTapListener

use of com.github.chrisbanes.photoview.OnPhotoTapListener in project PhotoView by chrisbanes.

the class ImmersiveActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_immersive);
    PhotoView photoView = (PhotoView) findViewById(R.id.photo_view);
    Picasso.with(this).load("http://pbs.twimg.com/media/Bist9mvIYAAeAyQ.jpg").into(photoView);
    photoView.setOnPhotoTapListener(new OnPhotoTapListener() {

        @Override
        public void onPhotoTap(ImageView view, float x, float y) {
        //fullScreen();
        }
    });
    fullScreen();
}
Also used : PhotoView(com.github.chrisbanes.photoview.PhotoView) OnPhotoTapListener(com.github.chrisbanes.photoview.OnPhotoTapListener) ImageView(android.widget.ImageView)

Aggregations

ImageView (android.widget.ImageView)1 OnPhotoTapListener (com.github.chrisbanes.photoview.OnPhotoTapListener)1 PhotoView (com.github.chrisbanes.photoview.PhotoView)1