无法点击AdMob广告

时间:2011-08-09 15:12:04

标签: android android-layout admob

好吧,我一直想知道为什么我不再为广告赚钱,然后我意识到当我点击它们时我无法点击我的广告。这是我的main.xml
main.xml中

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/pattern_carbon_fiber_dark">

<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
android:id="@+id/adView"
android:layout_width="fill_parent" 
ads:adSize="BANNER"
ads:adUnitId="***************"
ads:loadAdOnCreate="true"
android:visibility="visible"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom" 
android:layout_height="wrap_content" 
android:layout_alignParentTop="false">
</com.google.ads.AdView>

<ScrollView 
  android:id="@+id/ScrollView01"
  android:layout_width="fill_parent" 
  android:layout_height="fill_parent">

  <LinearLayout 
    android:orientation="vertical" 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent" 
    android:id="@+id/LinearLayout02" 
    android:padding="4dp">

  <TextView 
    android:layout_width="wrap_content" 
    android:text="Silent Mode" 
    android:id="@+id/silent_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <ToggleButton 
    android:textOff="OFF" 
    android:layout_width="wrap_content" 
    android:textOn="ON" 
    android:id="@+id/silentbutton" 
    android:layout_height="wrap_content" 
    android:text="Silent Mode">
  </ToggleButton>

  <TextView 
    android:layout_width="wrap_content" 
    android:text="@string/vibrate" 
    android:id="@+id/vibrate_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <ToggleButton 
    android:layout_width="wrap_content" 
    android:id="@+id/vibratebutton" 
    android:layout_height="wrap_content" 
    android:text="ToggleButton">
  </ToggleButton>

  <TextView 
    android:layout_width="wrap_content" 
    android:text="Wifi " 
    android:id="@+id/wifi_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <ToggleButton 
    android:layout_width="wrap_content" 
    android:id="@+id/wifibutton" 
    android:layout_height="wrap_content" 
    android:text="ToggleButton">
  </ToggleButton>

  <TextView 
    android:layout_width="wrap_content" 
    android:text="@string/gps" 
    android:id="@+id/gps_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <Button 
    android:id="@+id/gps" 
    android:text="@string/gpsbutton" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content">
  </Button>

  <TextView 
    android:layout_width="wrap_content" 
    android:text="@string/bluetooth" 
    android:id="@+id/bluetooth_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <ToggleButton 
    android:layout_width="wrap_content" 
    android:id="@+id/bluetooth" 
    android:layout_height="wrap_content" 
    android:text="ToggleButton">
  </ToggleButton>

  <TextView 
    android:layout_width="wrap_content" 
    android:text="@string/brightness" 
    android:id="@+id/screenbrightness_textview" 
    android:layout_height="wrap_content">
  </TextView>

  <SeekBar 
    android:layout_height="wrap_content" 
    android:max="255" 
    android:layout_width="fill_parent" 
    android:id="@+id/SbBar">
  </SeekBar>

</LinearLayout>
</ScrollView>
</RelativeLayout> 

1 个答案:

答案 0 :(得分:1)

如果您更改按钮的广告,是否可以点击它?这将是确定问题是XML格式还是广告代码本身的好方法。我没有看到XML中出现任何可能导致其无法点击的内容。

我建议:

  1. 尝试按钮建议

  2. 再次检查AdMob广告代码,确认您的所有内容都正确无误。

  3. 尝试重新编译应用程序,看看在此过程中是否存在某种错误。

  4. - 此外,您最近是否在您注意到资金停止进入的日期之前进行了任何XML更改?

相关问题