Mashiane Expert Licensed User Longtime User Aug 9, 2013 #1 Hi, is it possible to have local js, css files e.g on my assets folder and then reference them inside my webview html source? If possible can you please provide some guidance? Thanks a lot
Hi, is it possible to have local js, css files e.g on my assets folder and then reference them inside my webview html source? If possible can you please provide some guidance? Thanks a lot
warwound Expert Licensed User Longtime User Aug 9, 2013 #2 Mashiane said: Hi, is it possible to have local js, css files e.g on my assets folder and then reference them inside my webview html source? If possible can you please provide some guidance? Thanks a lot Click to expand... Yes that's possible. You'd reference your local files using the syntax: "file:///android_asset/my_asset_name.abc" within your HTML code. So an IMG element might look like: PHP: Copy <img src="file:///android_asset/logo.png"> Martin. Upvote 0
Mashiane said: Hi, is it possible to have local js, css files e.g on my assets folder and then reference them inside my webview html source? If possible can you please provide some guidance? Thanks a lot Click to expand... Yes that's possible. You'd reference your local files using the syntax: "file:///android_asset/my_asset_name.abc" within your HTML code. So an IMG element might look like: PHP: Copy <img src="file:///android_asset/logo.png"> Martin.
warwound Expert Licensed User Longtime User Aug 9, 2013 #3 Just to add... You can also directly reference various (built in) android drawable resources. This is the syntax: PHP: Copy <img src="file:///android_res/drawable/ic_more.png"> That'll display the built in system drawable 'ic_more'. Martin. Upvote 0
Just to add... You can also directly reference various (built in) android drawable resources. This is the syntax: PHP: Copy <img src="file:///android_res/drawable/ic_more.png"> That'll display the built in system drawable 'ic_more'. Martin.