[英]Android webview open target=“_blank” urls in popup window
我在我的android應用程序中使用webview。 我想知道是否可以將我網頁上的target =“ _ blank”網址打開到android彈出窗口中? 或任何其他方式彈出鏈接?
//LAYOUT FILE webview_content.xml
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView"
android:scrollbarAlwaysDrawVerticalTrack="false"
android:scrollbars="none" >
</WebView>
</RelativeLayout>
///CODE IN ACTIVITY
最終Dialog對話框= new Dialog(上下文);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().requestFeature(Window.FEATURE_PROGRESS);
dialog.setContentView(R.layout.webview_content);
WebView webView = (WebView) dialog
.findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("YOUR URL");
dialog.show();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.