Articles → Android → Relative Layout In Android

Relative Layout In Android






What Is Relative Layout?





Layout_Below Attribute







Example




<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
  <Button
  android:id="@+id/button6"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_below="@id/button7"
  android:text="Button 6"/>
  <Button
  android:id="@+id/button7"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Button 7" />
</RelativeLayout>






Picture showing the output of Relative layout in android
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, October 29, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250