Is the WebView getContentHeight() broken in 1.5/1.6?

by authoreyes » Thu, 22 Apr 2010 02:10:46 GMT


Sponsored Links
 All -

Urgent issue (and I see other people mentioned it with no resolution),
but how can I force getContentHeight() in the WebView to return an
accurate reading of the currently loaded content?

I have a WebView that needs to occasionally trim content (must display
on one page/no scrollbars).

I have it check the contentHeight onDraw, and it is too much, it trims
it, reloads it, and checks again.

Some times it works, but almost always not.  It always seems to report
the initial content height, as those it caches a value and won't
replace it (which looking at the WebView code, is what it seems to
do).  I can't find a way through the api though, to force it to
remeasure the html content height onDemand.

I am tearing my hair out here...Please anyone have any ideas?

--



Is the WebView getContentHeight() broken in 1.5/1.6?

by Maps.Huge.Info (Maps API Guru) » Thu, 22 Apr 2010 05:24:39 GMT


 You might try adding a bogus parameter to the end of the URL, such as
a random number or the time, like this:

url.htm?x=12345

That will most likely not bollix up the page and make the cache save
that as a unique page.

-John Coryat

"Radar Now!"

"What Zip Code?"

--


Sponsored Links


Is the WebView getContentHeight() broken in 1.5/1.6?

by authoreyes » Thu, 22 Apr 2010 05:32:57 GMT


 That is an interesting thought.....

Although I am using the loadData method with a string each
time....There is no actual url to speak of...I have tried clearing
cache/view/etc....

It's so odd...The view loads the right data, but the height reports
the original (even though the size is wildly different between loads)
for a few changes, then something causes it to re-eval, etc...

It's not consistent at all, and really annoying...if I can't depend on
this, I am not sure where to go with this current architecture....

On Apr 21, 4:24pm, "Maps.Huge.Info (Maps API Guru)"


>



Is the WebView getContentHeight() broken in 1.5/1.6?

by Maps.Huge.Info (Maps API Guru) » Thu, 22 Apr 2010 06:27:37 GMT


 You could also try switching to a method that saves the page to the
device and loads it as a URL instead of the direct method that you're
using now, that might get around the issue. Have you tried to test it
with a 2.0+ emulator? Still a problem?

-John Coryat

"Radar Now!"

"What Zip Code?"

--



Other Threads

1. Edit Bitmap Pixels in Native Code?

I've been able to edit bitmaps in the NDK with Bitmap_lockPixels(),
but that function only works on systems with 2.2 and above.

I've been trying desperately to get other solutions working for 2.1
and lower systems, but nothing has worked. I tried passing an
IntBuffer, but any attempts to edit the individual color integers
result in a crash (memory fault).

Can someone post a simple code example that can extract the ARGB
values for editing from a bitmap in the NDK?

-- 

2. managing the apps in Android market

Hi.
i'm also posting this question in the help forum but i think its a
mixed issue as it is with respect the developer.

We have a small team working on several apps that are going to be
released on android market, and one thing we are having
problems with is how to manage the publisher account. The owner of the
account (bank and credit card information) is not the developer that
is in charge of the android apps (prepare, sign, etc. for distribution
and control their status).
So this developer needs to have access to the publisher site and
upload the apps, update them, etc... but independently of the bank
data and unable to change it.

So the question is, how do you deal with this case?... or is it the
market supposed to work with only one developer with his personal
credit card managing everything?. i don't think that must be the only
possible way...

Thank you for any help and guide, i haven't found much information
about this particular problem.

-- 

3. RERUN e-lifestyle MetroTV ttg programmer GadgetHARIINIpk. 11.05 WIB

4. looking for keen java script developer

5. Wifi that works with the Nexus One

6. RERUN e-lifestyle MetroTV ttg programmer Gadget HARI INIpk. 11.05 WIB

7. Exceptions in user libraries