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_alignParentRight="true" /> </RelativeLayout>

- How to align a view to the bottom 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
- Align bottom of one view to the bottom of another view in a RelativeLayout
- Align top of one view to the top of another view in a RelativeLayout
- How to set an image to RelativeLayout background
- How to scale RelativeLayout background image
- How to repeat RelativeLayout background image
- How to set a bitmap to RelativeLayout background
- How to create a transparent background RelativeLayout
Komentar
Posting Komentar