안드로이드 개발 질문/답변
(글 수 45,052)
현재 linear layout으로 이미지를 배열하고 있는데요
이 이미지들이 다 붙여도 가로로 320px밖에 안되는 이미지들인데
이렇게 배치하였더니 화면 가로사이즈에 맞추어 확대되어 표시됩니다.
이클립스에서 레이아웃을 보면 제가 생각한대로 원래사이즈대로 나오는데
에뮬이나 폰에 올리면 꽉채워져서 나오더라구요.
이건 어떤 이유에서 이렇게 되는건가요?
이 이미지들이 다 붙여도 가로로 320px밖에 안되는 이미지들인데
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageButton android:id="@+id/custom_menu_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menu1" android:background="#00000000"/> <ImageButton android:id="@+id/custom_menu_2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menu2" android:background="#00000000"/> <ImageButton android:id="@+id/custom_menu_3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menu3" android:background="#00000000"/> <ImageButton android:id="@+id/custom_menu_4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menu4" android:background="#00000000"/> </LinearLayout>
이렇게 배치하였더니 화면 가로사이즈에 맞추어 확대되어 표시됩니다.
이클립스에서 레이아웃을 보면 제가 생각한대로 원래사이즈대로 나오는데
에뮬이나 폰에 올리면 꽉채워져서 나오더라구요.
이건 어떤 이유에서 이렇게 되는건가요?
위젯의 크기(폭, 넓이)를 설정하는 옵션입니다.