简体   繁体   中英

Preview HTML file in Android Studio plugin

I'm creating Android Studio plugin and I need to open (preview) html file. For now I can open HTML file using this code:

String file="c:\\test\\index.html";    
BrowserLauncher.getInstance().browse(file,WebBrowserManager.getInstance().getFirstActiveBrowser());

The problem is that this code open external webbrowser. But I would like to open this HTML file inside Android Studio (IntelliJ) IDE (open a new tab with HTML preview).

How can I do this?

Use Open In > Browser > Built-in Preview

在此处输入图像描述

It opens new tab in Android Studio

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM