Is there any possibility to customize advanced webview?


#1

I would like to customize the advanced webview, such as headers, footers, etc.


#2

Can you explain further, if you mean this plugin (https://github.com/bradmartin/nativescript-advanced-webview) you can’t do a whole lot in terms of footers etc. Only what the native controls allow and neither have a footer for customizing. The headers (navbar) only supports coloring.

You could use the standard webview that is in the core and put it in a stack-layout and have a custom header at the top, then the webview, and then a custom footer at the bottom. I’ve actually done this in an app and it works really well.


#3

Hi Brad,
Thanks for your reply.

Actually, I was trying to build the advanced web view on the android platform, but it causes error.
The error was due to the conflict between support-v4 23.4.0 and support-compat 25.0.1.
How should I solve this problem?


#4

Forget about it.
I resolved the issue, by downgrading support-compat version.


#5

Still I need your help to remove the header, which including the url of page.
Looking to your reply,
Thanks


#6

Try updating your local android support lib.


#7

Could you please be more specific on what you meant?
I am not really upto how I could remove the url bar in the advanced webview.


#8

In the advanced-webview you can’t remove the url bar. The android and iOS controls don’t allow for that. My suggestion would be to use the webview component that nativescript has in its core. Position it inside a stacklayout with a custom header and footer. The core webview just displayed web content so there isn’t a url bar like the advanced-webview which uses a different approach natively.


#9

Hi Brad,
Can I add custom Header field while requesting URL ?