不要让AdMob的广告请求的重点是什么? [英] Don't let AdMob ads request focus?

查看:228
本文介绍了不要让AdMob的广告请求的重点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个EditText上的一个布局,我也有AdMob的广告在版面的下方,当有人进入东西在的EditText的theres假设是在键盘的按钮右下角完成按钮,但之后,我加入AdMob的它有一个下一步按钮,当你preSS,它的重点是广告!有没有一种方法来禁用此?

I have a EditText in a layout, and I also have AdMob ads at the bottom of the layout, when someone enters something in the EditText theres suppose to be a "Done" button in the button right corner of the keyboard, but after I added AdMob it has a "Next" button, and when you press it, it focuses on the Ad! Is there a way to disable this?

我的XML:

<com.google.ads.AdView android:id="@+id/adView"
        android:focusable="false"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        ads:adUnitId="XXXXXXXXXXX"
        ads:adSize="BANNER"
        ads:testDevices="XXXXXXXXXXX"/>

我的Java:

My Java:

    if (showAds == true) {
    AdView adView = (AdView)this.findViewById(R.id.adView);
    adView.loadAd(new AdRequest());
                         }

注:我不知道这事情,但是我用的是ViewPager所以AD浏览报是我的main.xml布局文件和EditText上是我的ViewPager膨胀的布局

Note: I dont know if this matters, but I am using a ViewPager so the AdView is on my Main.xml layout file and the EditText is on the Layout that my ViewPager inflates.

推荐答案

如果您想保留完成按钮,在你的的EditText ,这个属性添加到它: <一href="http://developer.android.com/reference/android/widget/TextView.html#attr_android%3aimeActionLabel"相对=nofollow> 安卓imeOptions =actionDone 。这将迫使完成按钮上显示软键盘。

If you want to retain the "Done" button in your EditText, add this attribute to it: android:imeOptions="actionDone". This will force the "Done" button to appear on soft keyboards.

如果您想保留下一步按钮,而不是,并使其跳过 AD浏览报,你可以使用的这个方法跳过了 AD浏览报击球的时候下一步。

If you want to retain the "Next" button instead, and have it skip the AdView, you can use this method to skip over the AdView when hitting "Next".

这篇关于不要让AdMob的广告请求的重点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆