The android.widget.RelativeLayout setGravity method is used to specify the gravity of the content within a RelativeLayout. This method takes a parameter of type int which defines the gravity of the layout’s content. The package library for this method is android.widget.
In this example, the RelativeLayout is obtained using findViewById() method and the setGravity() method is used to set the gravity to "top|left".
In summary, the android.widget.RelativeLayout setGravity method is a useful method for controlling the layout of content within a RelativeLayout. It can be used to set the gravity to various positions such as "center", "bottom|right", "top|left", among others. The package library for this method is android.widget.
Java RelativeLayout.setGravity - 19 examples found. These are the top rated real world Java examples of android.widget.RelativeLayout.setGravity extracted from open source projects. You can rate examples to help us improve the quality of examples.