<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#000"
android:gravity="center"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:scaleType="fitXY"
android:layout_marginTop="5dp"
android:layout_marginBottom="60dp"
android:src="@drawable/lwt_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:visibility="visible"
android:id="@+id/imageView"
android:layout_centerInParent="true"/></RelativeLayout>
and in activity
final ImageView imageView = (ImageView) itemView.findViewById(R.id.imageView);
PhotoViewAttacher photoAttacher;
photoAttacher= new PhotoViewAttacher(imageView);
photoAttacher.update();
Picasso.with(ImageGallery.this).load(imageUrl).placeholder(R.drawable.lwt_placeholder)
.into(imageView);
Thats it!