1

I'm currently facing a problem trying to display some web pages in an Android WebView.

Note:

  • My application can already display HTML pages correctly for most of them, in various languages.

The problem:

For some arabic web pages such as http://colleges.jazanu.edu.sa/med/Pages/Default.aspx, the horizontal scrollbar won't appear in my webview (but it would be needed). The page starts aligned on the right (seems to be normal), but no way to scroll left.

Of course I have tried all the usual settings such as setHorizontalScrollBarEnabled(true), setLayoutAlgorithm(...), setInitialScale(1), and so on, but for some arabic pages (not all of them) it makes no difference: still not working.

The same web page that doesn't work in my WebView can work well in an external browser.

I have tried that on 1.5 and 2.2 Android devices, no difference.

My WebView is contained in a LinearLayout, with WRAP_CONTENT layout param for its width, but honestly I don't think the problem is related to the way the webview is added.

Did anyone have the same problem? Is this a known WebView issue while supporting "right to left" languages (in this case why doesn't it fail every time?). I have searched Google for a long time with no result.

Thanks for your help.

Benjamin Piette

Benjamin Piette
  • 3,645
  • 1
  • 27
  • 24

1 Answers1

0

try to add change the gravity property of you view

Ahmed Aswani
  • 8,271
  • 7
  • 33
  • 54
  • Yes, I tried to play with gravities, but no luck, it still can't work. Or maybe I haven't found the proper way to "play" with them ;) No solution found yet. – Benjamin Piette Apr 09 '12 at 15:55