0
무료 애플리케이션에 AdWhirl을 사용하여 광고를 배치하고 있습니다. MapView 아래 및 ListView 위에 광고를 표시하고 싶습니다. 아무리 노력해도 광고가 바닥을 제외하고는 어디에도 게재되지 않습니다. 현재 listView는 XML에서 확장되지만 AdWhirlView는 Java 코드에서 만들어야합니다. 세로 방향으로 LinearLayout에서 addView (adWhirlView)를 호출하므로 항상 광고가 아래쪽에 표시됩니다. 어떻게 광고를 배치해야하는지 정의 할 수 있습니까? 여기 Android 레이아웃, addView를 호출하기 전에 요소의 순서를 지정하는 방법
내 XML의 :<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layout_main"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="1">
<com.google.android.maps.MapView
....
</RelativeLayout>
<ListView
android:id="@+id/listView"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="1"/>
</LinearLayout>
완벽! 결국, 안드로이드가 누락되었습니다 : layout_height = "wrap_content" –