當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。