android:layout_centerHorizontal is only used for RelativeLayout so need to add this or please don't forget to remove this when you change the ViewGroup