Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7878805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:45:54+00:00 2026-06-03T03:45:54+00:00

I originally started out displaying a web page in the assets folder using a

  • 0

I originally started out displaying a web page in the assets folder using a WebView. However I seem to have grown beyond that as my page is not behaving as I would expect. According to the developer docs WebView should only be used for static pages that have no interactions. CSS, javascript etc. are not enabled. This makes sense with the behavior I am seeing. While my page renders nicely in the dev environment browser it looks like plain HTML on the device with no css or javascript capabilities. So if I want to display a local (assets folder) html page with css and javascript etc. enabled how would I go about doing that? I assume tutorials exist for such a simple thing but my Googling is coming up empty.

On the off chance my links as bad here is the header.

<head>
     <link href="folderA/folderB/file.css" rel="stylesheet" />

     <script src="folderA/js/file.js"></script>
</head>

Thank You again for helping this noob.
JB

Just found this. Might be on the right track?
http://developer.android.com/guide/webapps/index.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:45:56+00:00Added an answer on June 3, 2026 at 3:45 am

    According to the developer docs WebView should only be used for static pages that have no interactions

    Citation, please. I have never seen such a claim, and there are many, many applications that use WebView with “interactions”.

    CSS, javascript etc. are not enabled

    CSS is most certainly enabled — in fact, AFAIK, there is no way to disable it even if you wanted to. JavaScript is disabled by default, but a simple call to getSettings().setJavaScriptEnabled(true) on your WebView will enable it.

    So if I want to display a local (assets folder) html page with css and javascript etc. enabled how would I go about doing that?

    loadUrl("file:///android_asset/index.html") works, to load an index.html file in the root of your project’s assets/ directory.

    For example, in this sample project, I load file:///android_asset/book/0.htm (and other HTML files) into WebView widgets loaded into a ViewPager. Each HTML refers to a pair of CSS stylesheets using:

    <link href="0.css" type="text/css" rel="stylesheet"/><link href="pgepub.css" type="text/css" rel="stylesheet"/>
    

    In this sample project, I load some HTML out of assets and use some in-page JavaScript.

    Now, I have not done much with directory structures inside of assets/ and trying to access things across directories. It is conceivable that you are running into some problem related to that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a CakePHP 2 project. It originally started out in 2.0.x
I just started using the jquery swfupload plugin and I have everything working besides
I originally started this question in another thread, but that thread was sorta, kinda
I originally setup some conditions using CGRectIntersectsRect for some collision detection which worked fine.
I originally wrote my Wordpress 3.0 widget http://codex.wordpress.org/Widgets_API for editing on the widget page
I originally have an array that reads $array1 = array(a,a,b,b) I run it through
Originally started here: Django IN query as a string result - invalid literal for
I am working with an ASP.NET MVC project which was originally started from the
I am still learning BizTalk and EDI. When I originally started at my current
We have a prototype application that was originally published to an external server hosted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.