안드로이드 개발 질문/답변
(글 수 45,052)
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom"
>
<Button
android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="다시 하기"
android:layout_gravity="left"
/>
<Button
android:id="@+id/finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="게임 끝내기"
android:layout_gravity="right"
/>
</LinearLayout>
이렇게 했는데 버튼이그냥 둘이 왼쪽에 차례대로 붙어있네요ㅠ
'다시하기' 버튼은 맨 왼쪽으로, '게임끝내기' 버튼은 맨 오른쪽으로 배열하게 하려면 어떻게 해야 하나요?




릴레이티브 레이아웃을 쓰시면 될 것 같아요
리니어를 꼭 쓰셔야하신다면
리니어 아래에 릴레이티브 레이아웃 그리고 그 아래 버튼넣으시면 되구요