안드로이드 개발 질문/답변
(글 수 45,052)
제가 지금 에뮬레이터를
WVGA800을 사용하고 있습니다 그리고 hw.lcd.density:240 이구염;;
제가 알아본 바로는 가로가 800 세로가 480 이니까;;
dp로 환산하면 대충 가로는 533dp 세로는 320dp인거 같은데요;;
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="320dp"
android:layout_height="533dp"
>
<ImageView
android:id="@+id/CludeImg"
android:layout_width="320dp"
android:layout_height="320dp"
android:layout_alignParentLeft="true"
/>
<RelativeLayout
android:id="@+id/TextRelative"
android:layout_height="160dp"
android:layout_width="320dp"
android:layout_alignParentLeft="true"
android:layout_marginTop="0px"
android:background="@drawable/notification_serenity"
android:layout_below="@id/CludeImg"
android:layout_marginLeft="0px"
android:layout_marginRight="0px"
>
</RelativeLayout>
<RelativeLayout
android:layout_below="@+id/TextRelative"
android:id="@+id/RelativeLayoutbar"
android:layout_width="320dp"
android:layout_height="53dp"
android:layout_alignParentLeft = "true"
android:layout_alignParentBottom = "true"
android:layout_alignParentRight = "true"
android:background="@drawable/bt_bar"
>
</RelativeLayout>
</RelativeLayout>
이렇게 xml을 설정햇는데도 불구하고;; 에뮬레이터를 실행시키면 아래 RelativeLayoutbar 부분이 짤려서 나옵니다;;
레이아웃 Griaphical Layout에서 설정은 기본에 3.7in WVGA(Nexus One),Portrait,theme,android 2.1-update1 로 설정한 상황입니다.
아시는분 답좀 부탁드립니다;;;ㅡㅡ
WVGA800을 사용하고 있습니다 그리고 hw.lcd.density:240 이구염;;
제가 알아본 바로는 가로가 800 세로가 480 이니까;;
dp로 환산하면 대충 가로는 533dp 세로는 320dp인거 같은데요;;
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="320dp"
android:layout_height="533dp"
>
<ImageView
android:id="@+id/CludeImg"
android:layout_width="320dp"
android:layout_height="320dp"
android:layout_alignParentLeft="true"
/>
<RelativeLayout
android:id="@+id/TextRelative"
android:layout_height="160dp"
android:layout_width="320dp"
android:layout_alignParentLeft="true"
android:layout_marginTop="0px"
android:background="@drawable/notification_serenity"
android:layout_below="@id/CludeImg"
android:layout_marginLeft="0px"
android:layout_marginRight="0px"
>
</RelativeLayout>
<RelativeLayout
android:layout_below="@+id/TextRelative"
android:id="@+id/RelativeLayoutbar"
android:layout_width="320dp"
android:layout_height="53dp"
android:layout_alignParentLeft = "true"
android:layout_alignParentBottom = "true"
android:layout_alignParentRight = "true"
android:background="@drawable/bt_bar"
>
</RelativeLayout>
</RelativeLayout>
이렇게 xml을 설정햇는데도 불구하고;; 에뮬레이터를 실행시키면 아래 RelativeLayoutbar 부분이 짤려서 나옵니다;;
레이아웃 Griaphical Layout에서 설정은 기본에 3.7in WVGA(Nexus One),Portrait,theme,android 2.1-update1 로 설정한 상황입니다.
아시는분 답좀 부탁드립니다;;;ㅡㅡ
2011.04.12 11:40:28
위에 notification bar가 있으니까... 앱이 차지하는 height는 800 px 가 안되죠.
notification bar가 아마 48px 였나? 할겁니다.
근데 백그라운드부터 저렇게 dp 직접 찍어서 코딩하는건 그닥 추천할 만한 코딩은 아니군요.



