내 응용 프로그램에 mapview가 있습니다. 상대적 레이아웃에서 294x322 크기를 설정했고 relativelayout에서 wrap_conten을 height로 사용하여 mapview를 추가했으며 와이트는지도보기에도 높이와 무게 294x322 크기의 relativelayout.but을 런타임에 포함한다고 생각했습니다. 내 mapview는 parent.one을 채 웁니다. 내가 발견했다 솔루션은 배경 이미지의 상대 레이아웃 정적 높이 너비를 줄 수 있지만 문제는 내가 hdpi 및 mdpi folder.so 여러 화면 resoulution 작동하지 않을 것이라고 puted했다 동일한 이름 가진 두 개의 이미지가 있습니다. 여기지도보기가 감싸기 내용 대신 부모를 채우기 위해 이동합니다.
난 내 XML은 다음
<!-- MapView -->
<RelativeLayout
android:id="@+id/layout_mapRestaurant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/rlBtnView"
android:layout_centerHorizontal="true"
android:paddingLeft="15dip"
android:paddingTop="15dip"
android:paddingRight="15dip"
android:paddingBottom="40dip"
android:layout_marginTop="-25dip"
android:background="@drawable/mapbg"
>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview_SearchResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:background="@drawable/bg_border"
/>
</RelativeLayout>
파일 추가 있어요 것은 내가 런타임에 보여주는있어 실제 배치되어 다음
설계로 내 그래픽 레이아웃입니다.
누구든지이 문제에서 어떻게 나오는지 알 수 있습니까 ?????
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="true"
android:apiKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
/>
: