本文整理匯總了Java中org.apache.cordova.ConfigXmlParser類的典型用法代碼示例。如果您正苦於以下問題:Java ConfigXmlParser類的具體用法?Java ConfigXmlParser怎麽用?Java ConfigXmlParser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ConfigXmlParser類屬於org.apache.cordova包,在下文中一共展示了ConfigXmlParser類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import org.apache.cordova.ConfigXmlParser; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupSimplePreferencesScreen();
Preference button = (Preference)findPreference("clearCache");
button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(SettingsActivity.this);
CordovaPreferences preferences = parser.getPreferences();
preferences.setPreferencesBundle(SettingsActivity.this.getIntent().getExtras());
CordovaWebView webView = new CordovaWebViewImpl(CordovaWebViewImpl.createEngine(SettingsActivity.this, preferences));
webView.clearCache();
return true;
}
});
}
示例2: onCreate
import org.apache.cordova.ConfigXmlParser; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Set up the webview
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(this);
SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());
webView.loadUrl(parser.getLaunchUrl());
}
示例3: getStartingPage
import org.apache.cordova.ConfigXmlParser; //導入依賴的package包/類
/**
* Getter for the startup page.
*
* @return startup page relative path
*/
private String getStartingPage() {
if (!TextUtils.isEmpty(startingPage)) {
return startingPage;
}
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(cordova.getActivity());
String url = parser.getLaunchUrl();
startingPage = url.replace(LOCAL_ASSETS_FOLDER, "");
return startingPage;
}
示例4: loadConfig
import org.apache.cordova.ConfigXmlParser; //導入依賴的package包/類
@SuppressWarnings("deprecation")
protected void loadConfig() {
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(this);
preferences = parser.getPreferences();
pluginEntries = parser.getPluginEntries();
}
示例5: loadConfig
import org.apache.cordova.ConfigXmlParser; //導入依賴的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());
}
示例6: getConfigLaunchUrl
import org.apache.cordova.ConfigXmlParser; //導入依賴的package包/類
private String getConfigLaunchUrl() {
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(this.cordova.getActivity());
return parser.getLaunchUrl();
}