안드로이드 개발 질문/답변
(글 수 45,052)
레이아웃 관련하여 이것저것 테스트를 해보고 있습니다.
그러던중에 realtiveLayout중에서 궁금한것이 있어 질문드립니다.
"확인"버튼을 url 을 적는 editText 부분 밑으로 오게 설정을 했습니다.
그리고는 이것저것 설정을 바꿔가면서 테스트 하던중 왼쪽과 같은 그림이
나옵니다.
"확인" 버튼을 EditText 밑으로 오게 설정을 했으면 EditText 의 위치가 바뀌어도 같이 따라서 바뀌어야 하는것 아닌가요? 항상 그 자리에 붙어있네요.
아래에 소스도 첨부합니다.
그러던중에 realtiveLayout중에서 궁금한것이 있어 질문드립니다.
"확인"버튼을 url 을 적는 editText 부분 밑으로 오게 설정을 했습니다.
그리고는 이것저것 설정을 바꿔가면서 테스트 하던중 왼쪽과 같은 그림이
나옵니다.
"확인" 버튼을 EditText 밑으로 오게 설정을 했으면 EditText 의 위치가 바뀌어도 같이 따라서 바뀌어야 하는것 아닌가요? 항상 그 자리에 붙어있네요.
아래에 소스도 첨부합니다.
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5px" > <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="URL:" android:paddingTop="55px"> </TextView> <EditText android:id="@+id/entry" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/label" android:layout_alignBaseline="@id/label" android:singleLine="true"> </EditText> <Button android:id="@+id/ok" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/entry" android:layout_alignRight="@id/entry" android:text="확인"> </Button> <Button android:id="@+id/cancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/ok" android:layout_alignTop="@id/ok" android:text="취소"> </Button> </RelativeLayout>