Cocos2d-xのWebViewにて、特定のURLのリンクをタップ時にブラウザで表示したいです。
実はiOSについては下記の記事を参考に実現できました。
そのため今回はこれのAndroid対応をしたいです。
https://qiita.com/tarappo/items/1829697bd8078bbf45d1
恐らく修正が必要な箇所は
WebViewImpl_android.cpp の、
shouldStartLoading 辺りかと思いますが、
具体的にどう修正すべきか解らなくて困っております。
宜しくお願いします。
lang
1bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { 2 auto it = s_WebViewImpls.find(viewTag); 3 if (it != s_WebViewImpls.end()) { 4 auto webView = s_WebViewImpls[viewTag]->_webView; 5 if (webView->shouldStartLoading) { 6 return webView->shouldStartLoading(webView, url); 7 } 8 } 9 return true; 10}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。