當前位置: 首頁>>代碼示例>>Java>>正文


Java Config.init方法代碼示例

本文整理匯總了Java中org.apache.cordova.Config.init方法的典型用法代碼示例。如果您正苦於以下問題:Java Config.init方法的具體用法?Java Config.init怎麽用?Java Config.init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.cordova.Config的用法示例。


在下文中一共展示了Config.init方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreateView

import org.apache.cordova.Config; //導入方法依賴的package包/類
@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

      LayoutInflater localInflater = inflater.cloneInContext(new CordovaContext(getActivity(), this));
      View rootView = localInflater.inflate(R.layout.fragment_cordova, container, false);        
      myWebView = (CordovaWebView) rootView.findViewById(R.id.myWebView);
      myWebView.setBackgroundColor(Color.argb(1, 0, 0, 0));
      
// fixes a bug in android 3.0 - 4.0.3 that causes an issue with transparent webviews.
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB
		&& android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
	myWebView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
}
      
      
      Config.init(getActivity());
      myWebView.loadUrl(Config.getStartUrl());
      return rootView;
  }
 
開發者ID:thomasforth,項目名稱:MS4Plugin,代碼行數:20,代碼來源:CordovaFragment.java

示例2: onCreate

import org.apache.cordova.Config; //導入方法依賴的package包/類
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.main);

    //CB-7238: This has to be added now, because it got removed from somewhere else
    Config.init(this);
    
    cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
    cordovaWebView.init(this, new CordovaWebViewClient(this, cordovaWebView), new CordovaChromeClient(this, cordovaWebView),
            Config.getPluginEntries(), Config.getWhitelist(), Config.getExternalWhitelist(), Config.getPreferences());

    cordovaWebView.loadUrl("file:///android_asset/www/index.html");

}
 
開發者ID:crosswalk-project,項目名稱:crosswalk-cordova-android,代碼行數:18,代碼來源:CordovaWebViewTestActivity.java

示例3: loadConfig

import org.apache.cordova.Config; //導入方法依賴的package包/類
@SuppressWarnings("deprecation")
protected void loadConfig() {
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(getActivity());
    preferences = parser.getPreferences();
    preferences.setPreferencesBundle(getActivity().getIntent().getExtras());
    //preferences.set("webview", "io.syng.cordova.plugin.WebViewEngine");
    pluginEntries = parser.getPluginEntries();
    Config.init(getActivity());
}
 
開發者ID:status-im,項目名稱:syng-client,代碼行數:11,代碼來源:WebViewFragment.java

示例4: onCreate

import org.apache.cordova.Config; //導入方法依賴的package包/類
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
//        AWV Factory should be initialized before setting the layout  
        if (!sFactoryInit) {
           factory = AmazonWebKitFactories.getDefaultFactory();
           if (factory.isRenderProcess(this)) {
               return; // Do nothing if this is on render process
           }
          factory.initialize(this);
           
           sFactoryInit = true;
       } else {
           factory = AmazonWebKitFactories.getDefaultFactory();
       }

        setContentView(R.layout.main);

        //CB-7238: This has to be added now, because it got removed from somewhere else
        Config.init(this);
        
        cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
        factory.initializeWebView(cordovaWebView, 0xFFFFFF, false, null);
        cordovaWebView.init(this, new CordovaWebViewClient(this, cordovaWebView), new CordovaChromeClient(this, cordovaWebView),
                Config.getPluginEntries(), Config.getWhitelist(), Config.getExternalWhitelist(), Config.getPreferences());

        cordovaWebView.loadUrl("file:///android_asset/www/index.html");

    }
 
開發者ID:apache,項目名稱:cordova-amazon-fireos,代碼行數:32,代碼來源:CordovaWebViewTestActivity.java


注:本文中的org.apache.cordova.Config.init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。