-1

I want to view style sheets/html pages via the Android emulator. I pulled the html pages into the SD Card and was able to view them. However, I'm not sure how to pull the style sheets/javascript in to see specific styling.

How can that be done? I'm not a programmer, but can find my way around Eclipse pretty well if that is needed.

Izzy
  • 91,166
  • 73
  • 343
  • 943
  • 1
    Welcome to Android.stackexchange. Programming questions are considered off topic here and really belong over at stackoverflow. – znewman Feb 12 '13 at 20:28
  • Don't know whether to really call this a programming question -- it's not about programming, exactly, but how to "offline view HTML with external stylesheets". This also can apply to several end-user situations I can think of. – Izzy Feb 13 '13 at 00:01
  • @user28314 I just re-phrased yout question to avoid it being closed as off-topic (see the comments above and on GreenGuy's answer below). As pointed out: Development questions are off topic here according to our [FAQ] (please read!), but the real issue you are having IMHO is not. The question itself stayed the same: Please compare it to see how to avoid such trouble in the future :) – Izzy Feb 13 '13 at 12:19

2 Answers2

1

I don't know much about Eclipse. But for your goal, it all depends on how the external stylesheets are defined. If they are using full-qualified URLs (e.g. http://www.example.com/example.css), there's no way you get them working offline. If they are using a relative path (easiest: just their file name, residing in the same directory as the HTML file), you can simply copy them next/relative to your HTML files, and it should work.

Examples, assuming the HTML file is put to /sdcard/html/myfile.html:

  • <link rel="stylesheet" type="text/css" href="style.css">: simply copy style.css to /sdcard/html
  • href="../style.css">: Copy to /sdcard
  • href="foo/bar/style.css": create /sdcard/html/foo/bar and place style.css there
  • href="/style.css": Sorry, nogo without root, as you cannot write to /
Izzy
  • 91,166
  • 73
  • 343
  • 943
0

You need to open the HTML file on your browser, so that you can see the actual styling.

You can also open a browser via Eclipse.

PS This really sounds like a dev-related issue. Probably off-topic.

geffchang
  • 17,565
  • 18
  • 57
  • 73
  • See my comment above (on the question). Though the context here looks like a dev thing, the real qeustion itself is not -- I can think of many situations where this might be of interest for "normal users" as well (leaving Eclipse out, as I did in my answer). General rule: If you can re-phrase it (without changing the "real question) so it becomes on-topic, it's not off-topic :) Though the OP probably should do that... – Izzy Feb 13 '13 at 12:14