-
use
gravitycenter inRelativeLayoutand place clickable element inRelativeLayout<Button android:id="@+id/the_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Centered Button"/> -
use
android:layout_centerInParent="true"in clickable element inside theRelativeLayout<Button android:id="@+id/the_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Centered Button" android:layout_centerInParent="true"/>
5
solved How to set a click in center of RelativeLayout after load Activity