activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/rl" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp" tools:context=".MainActivity" android:background="@android:color/white" > <Button android:id="@+id/btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Sample Button" android:layout_alignParentBottom="true" /> </RelativeLayout>
- Programmatically align a view to the bottom of a RelativeLayout
- How to align a view to the top of a RelativeLayout
- How to add rule programmatically to a view in a RelativeLayout
- Programmatically place a view above of another view in a RelativeLayout
- Programmatically place a view left of another view in a RelativeLayout
- How to place buttons side by side in a RelativeLayout
- How to place a view below of another view in a RelativeLayout
- How to align a view to the right of a RelativeLayout
- How to align a view to the vertical center of a RelativeLayout
- How to align a view to the horizontal center of a RelativeLayout
Komentar
Posting Komentar