마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

광고가 리스트뷰때매 화면아래에잇어요 ㅠㅠ

0 추천

AdView adView = new AdView(this);
        adView.setAdSize(AdSize.BANNER);
        adView.setAdUnitId(getResources().getString(R.string.ad_unit_id));
        LinearLayout linear = (LinearLayout)findViewById(R.id.linear_skill_attr);
        linear.addView(adView);
        adView.loadAd(new AdRequest.Builder().build());
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/linear_skill_attr"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="${packageName}.${activityClass}" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <Spinner
            android:id="@+id/spin_skill_attr1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

        <Spinner
            android:id="@+id/spin_skill_attr2"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

    </LinearLayout>

    <ListView
        android:id="@+id/list_skill_attr"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
    </ListView>

</LinearLayout>

 

리스트뷰가 레이아웃아랫부분까지 다차지해버져서 adView 가 화면 아래 바깥쪽에있어서 보이질 않네요 ㅠㅠ

 

Ad is not visible. Not refreshing ad.

라고도 Logcat에 뜨네요....

 

어떻게해야하죠...

ygh (520 포인트) 님이 2014년 7월 4일 질문

1개의 답변

0 추천
ListView Height값을 지정해주시거나 bottom margin을 주심이..
보푸라기 (140 포인트) 님이 2014년 7월 4일 답변
...