android:layout_centerHorizontal="true" is not working in android

view full story

http://stackoverflow.com – I am using this layout to make image and text in center.but its not working .i am simply using android:layout_centerHorizontal="true".why its not working i dont understand. can someone please help to solve this problem? <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#ffffff"> <ImageView android:id="@+id/image" android:layout_width="wrap_content" (HowTos)