안드로이드 개발 질문/답변
(글 수 45,052)
background 이미지 LCD 전체에 full로 채우는 방법
LCD 사이즈가 다르면 그 때마다 Background로 설정해 놓은 사진을 바꿔야 하는지요?
예로, 모토로이에서 이미지 view를 Background로 full로 설정했을 때 겔럭시S에서는 짤리더라구요.
우선 main.xml에서는 아래와 같이 추가하였습니다.
setContentView(new ImageView(this)) 처럼 객체로 넣으니깐 바탕전체로 늘려지는데 Linearlayout에 넣어서 main.xml을 추가하니까 짤려버리네요. 혹시 이런문제 해결하신분 없으신지요?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <AbsoluteLayout android:id="@+id/AbsoluteLayout02" android:layout_width="wrap_content" android:layout_height="fill_parent" > <ViewFlipper android:id="@+id/viewFlipper" android:layout_width="wrap_content" android:layout_height="fill_parent" > <AbsoluteLayout android:id="@+id/AbsoluteLayout01" android:layout_width="wrap_content" android:layout_height="fill_parent" > // background는 이부분 입니다. <ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:id="@+id/Img" android:src="@drawable/background" > </ImageView> </AbsoluteLayout> </ViewFlipper> </AbsoluteLayout> </LinearLayout>