2012-11-18 76 views
0

我有一个广告的线性布局。此代码适用于Ad Mob。 Ad Mob横幅为中心。 Galaxy Nexus和Samsung galaxy y duos看起来不错。但它不适用于InMobi广告。在Galaxy Nexus上,横幅位于左侧,在三星Galaxy Duos上,横幅位于左侧,略小一些。Android - InMobi横幅 - 在左侧和小型?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/layoutAdView" 
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="50dp" 
     android:layout_centerHorizontal="true" 
     android:layout_alignParentBottom="true" > 
    </LinearLayout> 

</RelativeLayout> 

我的大问题是,横幅是在左边。

回答

0

我解决了左边的问题。将线性布局更改为相对布局。

1

我正面临同样的问题。

而不是由父布局,并增加你的AD浏览它,你可以在XML定义的AdView作为

<com.inmobi.androidsdk.IMAdView android:id="@+id/imAdview" android:layout_width="320dp" android:layout_height="50dp" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" adSize="15" appId="*******************************"/>

就拿它的一个实例,并加载广告。 这可能必须解决问题。