안드로이드 개발 질문/답변
(글 수 45,052)
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="40"
android:background="#ff00ff00">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dip"
android:text="이전"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text=""
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dip"
android:text="다음"
/>
</RelativeLayout>이런 xml코드가 있습니다.
RelativeLayout을 크게 하면 가운데로 가 있는것 같지만 작게 하면 위쪽은 붙고, 아래쪽은 넓게 나오네요 ㅠㅠ
또 다른 코드에서...
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="280">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="버튼"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>이놈은 에디트텍스트는 위로 가 있고, 버튼은 아래로 내려가 있습니다...
버튼의 텍스트가 한글이라 그런줄 알고 영문으로 바꿨더니 좀 나아지긴 했는데 눈으로 체감 할 수 있을 정도네요 ㅠㅠ
크기를 dip등으로 맞춰줘야 하는건가요? ㅠㅠ



