0

m developing an ebook reader application.

i wanna display text in WebView [have to use WebView instead of TextView bcz TextView doesnt support justify text align]

Now how will i know how much text i shud display on 1 page , so that the WebView doesnt scroll?

WebView:getContentHeight() is not working.. i need to get the height of the html content b4 i loaddata in the WebView

Nital
  • 877
  • 3
  • 9
  • 15

1 Answers1

0

You can disable the scroll of webview using the following code.

WebView appView = (WebView) findViewById(R.id.appView); 
appView.setVerticalScrollBarEnabled(false);
appView.setHorizontalScrollBarEnabled(false);

Thanks Deepak

Sunil Kumar Sahoo
  • 49,865
  • 50
  • 172
  • 240
  • hi deepak, yr code just disables the scrollbars visibility, the view still scrolls. What i want is "How much portion of the text shud i display so that it fits the WebView size & doesnt scroll" – Nital May 31 '11 at 06:20
  • Can you refer http://stackoverflow.com/questions/2617266/how-to-adjust-text-font-size-to-fit-textview – Sunil Kumar Sahoo May 31 '11 at 07:49