开发者

Can't click AdMob ads

Okay, I have been wondering why I don't get money any more for ads, and then I realized that I cannot click my ads when I.. click them. Here is my 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" 
    开发者_JS百科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> 


If you change out the ad for a button are you able to click it? This would be a good way to determine if the problem is with the XML Formatting, or the ad code itself. I don't see anything that is sticking out in the XML that would cause it to not be clickable.

I would suggest either:

  1. Try the button suggestion

  2. Check the AdMob ad code again to verify you have everything correct.

  3. Try recompiling the application to see if there was maybe some sort of bug during that process.

-Also, did you recently make any XML changes around the date you noticed that the money stopped coming in?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜