当前位置: 首页>>代码示例>>Java>>正文


Java LinearLayoutSoftKeyboardDetect类代码示例

本文整理汇总了Java中org.apache.cordova.LinearLayoutSoftKeyboardDetect的典型用法代码示例。如果您正苦于以下问题:Java LinearLayoutSoftKeyboardDetect类的具体用法?Java LinearLayoutSoftKeyboardDetect怎么用?Java LinearLayoutSoftKeyboardDetect使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LinearLayoutSoftKeyboardDetect类属于org.apache.cordova包,在下文中一共展示了LinearLayoutSoftKeyboardDetect类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import org.apache.cordova.LinearLayoutSoftKeyboardDetect; //导入依赖的package包/类
@Override
public void run() {
  if (adSize == null) {
    result = new PluginResult(Status.ERROR, "AdSize is null. Did you use an AdSize constant?");
  } else {
    adView = new AdView(cordova.getActivity(), adSize, publisherId);
    adView.setAdListener(new BannerListener());
    LinearLayoutSoftKeyboardDetect parentView =
        (LinearLayoutSoftKeyboardDetect) webView.getParent();
    if (bannerAtTop) {
      parentView.addView(adView, 0);
    } else {
      parentView.addView(adView);
    }
    // Notify the plugin.
    result = new PluginResult(Status.OK);
  }
  synchronized (this) {
    this.notify();
  }
}
 
开发者ID:psydrake,项目名称:litecoinEasyCheck,代码行数:22,代码来源:AdMob.java

示例2: executeKillAd

import org.apache.cordova.LinearLayoutSoftKeyboardDetect; //导入依赖的package包/类
private void executeKillAd(final CallbackContext callbackContext) {
        final Runnable runnable = new Runnable() {
           		public void run() {
               		if (adView == null) {
                   		// Notify the plugin.
                   			callbackContext.error("AdView is null.  Did you call createBannerView or already destroy it?");
               		} else {
                   			LinearLayoutSoftKeyboardDetect parentView = (LinearLayoutSoftKeyboardDetect) webView
						.getParent();
	                    parentView.removeView(adView);
	                    adView.removeAllViews();
	                    adView.destroy();
	                    adView = null;
	                    callbackContext.success();
	                }
            	}
        };

       	this.cordova.getActivity().runOnUiThread(runnable);
}
 
开发者ID:rafinskipg,项目名称:BombTouch,代码行数:21,代码来源:AdMobPlugin.java

示例3: createBannerView

import org.apache.cordova.LinearLayoutSoftKeyboardDetect; //导入依赖的package包/类
private synchronized void createBannerView(final String publisherId,
		final AdSize adSize, final CallbackContext callbackContext) {
	final CordovaInterface cordova = this.cordova;

	// Create the AdView on the UI thread.
	Log.w(LOGTAG, "createBannerView");
	Runnable runnable = new Runnable() {
		public void run() {
			Log.w(LOGTAG, "run");
			Log.w(LOGTAG, String.valueOf(webView));
			// Log.w(LOGTAG, "adSize::" + adSize); calling adSize.toString() with SmartBanner == crash
			if (adSize == null) {
				callbackContext
						.error("AdSize is null. Did you use an AdSize constant?");
				return;
			} else {
				adView = new DfpAdView(cordova.getActivity(), adSize,
						publisherId);
				adView.setAdListener(new BannerListener());
				LinearLayoutSoftKeyboardDetect parentView = (LinearLayoutSoftKeyboardDetect) webView
						.getParent();
				if (positionAtTop) {
					parentView.addView(adView, 0);
				} else {
					parentView.addView(adView);
				}
				// Notify the plugin.
				callbackContext.success();
			}
		}
	};
	this.cordova.getActivity().runOnUiThread(runnable);
}
 
开发者ID:rafinskipg,项目名称:BombTouch,代码行数:34,代码来源:AdMobPlugin.java


注:本文中的org.apache.cordova.LinearLayoutSoftKeyboardDetect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。