코틀린 7-2 relative layout

hong030·2022년 2월 2일
0

    <ImageView
        android:id="@+id/testImg"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:src="@drawable/KakaoTalk_20220114_131155020_01" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignBottom="@+id/testImg"
        android:text="button" />

여기서 만약 img와 button을 그냥 배치하면 둘이 겹쳐진다. 
img id를 통해 button의 align parent right를 하든 align bottom을 하든 등 
여러 성질을 통해 relative한 배치를 해줘야 함.
profile
자바 주력, 프론트 공부 중인 초보 개발자. / https://github.com/hongjaewonP

0개의 댓글