assets referenced in HTML

by miketra » Mon, 02 May 2011 07:12:52 GMT

Sponsored Links
 I have an app that includes HTML files in the assets folder. I am able
to load the initial HTML page successfully under all conditions using
the following command in code:


Now, within start_page.htm, I have a bunch of links that can be
clicked, and each link references another HTML file that I have
included in the assets folder.

For some strange reason, all the links load fine on my Droid (2.2.2),
but none of the links load on a Droid X (2.2.1). The links are setup
like this on my Droid inside of start_page.htm:

<a href="page2.htm">Page 2</a>

The above works on the Droid, but not on Droid X. I then tried the

<a href="file:///android_asset/page2.htm">Page 2</a>

This also does not work on Droid X, but works fine otherwise. Does
anyone know why this may be? On the emulator running 2.2.1, it works
fine. I'm not sure what else to try, and I'm not sure what the problem
could be.




Other Threads

1. Remote View setString

    Can some one please help me understand the setString function in
public void  setString  (int viewId, String methodName, String value)

Can I pass any method name to setString ? I have a custom view in my
xml layout file. I'm passing the view id of my custom view, name of a
method in my custom view class and a string parameter for the method.
It doesn't seem to be working. Is there is a limitation on the methods
that can be passed to setString? Or is there something fundamentally
wrong in what I'm doing?


2. Spreadsheet View

I've been trying to make a layout that displays something like a mini
spreadsheet that's specialized for my app.  I would like it to have
headers for both rows and columns.  The row header can only pan left
and right.  The column header can only pan up and down.

Hard to explain in words, so I'll try a picture (must be seen in a
fixed pitch font):

Stays| ... T3 T4 T5 ...
Row 3| ... 32 31  7 ...
Row 4| ... 17 21  9 ...

If the user pushes the image up the screen, row 3 goes away and row 5
appears but the header row stays.  If the user pushes the image to the
left, column T3 goes away and column T6 appears and the header column

Having the "..." continuation hint would be nice, but is not

I would also like to be able to have more than 1 header row and column
(the ones that stay fixed). The info in the upper left quadrant of the
spreadsheet would always stay put.

It would be good to have the spreadsheet retain orientation in both
landscape and portrait to allow the user to choose if the rows or
columns would benefit from more display space.

A nice feature would be to let the user resize rows and/or columns.
This would be especially helpful for the fixed headers as display
space is at a premium.

I don't see anything that scrolls right or left nor anything that
would scroll both right/left and up/down as would be needed for the
lower right quadrant so I'm not even sure where to start.

I suspect nothing like this exists as a single view I can simple drop
into my xml, but how would I create such a thing by combining other
views?  Is there some other way through code to do his?

I'm new so simple hints are appreciated.  Thanks in advance.

- Mitch


3. Problems with the tutorials and SDK/Emulator 1.6

4. Help! I get this error message concerning the AVD

5. Cannot write SharedPreferences after update!! Help!

6. Agent/Actor programming on Android.

7. Tabview with same activity in tabs