1. Are you ready for the Galaxy S20? Here is everything we know so far!

Replacing CSS-file from web-site with local, modified copy

Discussion in 'Android Development' started by sw3ng, Sep 13, 2011.

  1. sw3ng

    sw3ng Lurker
    Thread Starter

    Right. My company runs an intranet with lots and lots of useful information that I need when visiting customers. The login page does not allow you to save credentials so what I did was create an app, with web-view, putting a modified HTML-file locally on the phone that in turn saves credentials and forwards these to the server making the login procedure so much smoother. All this is working fine (pretty much), but now it really is bugging me that the mobile optimization is pretty much nonexistant. For my local login page I have modified the CSS-file to scale well and this should also work for the rest of the page.

    My question is: Is it possible to somehow replace the websites CSS-file, with my local CSS-file? Maybe somehow finding the line
    1. <link rel="stylesheet" href="/design/layout/style.css" type="text/css" media="screen, projection, tv" />
    And make it point to my local: "file:///android_asset/style.css"

    Must state that I'm quite the novice but very stubborn... :)

    1. Download the Forums for Android™ app!



Share This Page