I'm trying to vertically center align ImageView in RelativeLayout but unable to do so. It seems a simple thing but I'm unable to sort out the problem. Here is the xml I defined.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="63dp"
android:background="#aa00ff">
<ImageView
android:id="@+id/user_dp"
android:layout_width="43dp"
android:layout_height="43dp"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_marginRight="12dp"
android:layout_marginLeft="12dp"
android:background="#ffff00"/>
</RelativeLayout>
NOTE: This view is being used for ListView row.