Android Webview Complex Table Problems solved — Frank derFrankie Neulichedl

Android Webview Complex Table Problems solved

Android Webviews are a great way to display content from a website. So most websites that have a companion app use webviews to show the comment. And most of the time everything will work just fine - but if you use advanced table layouts you might encounter a problems.

The culprit is .setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);

Normal tables don't seem to be affected by this setting, but complex tables using scope="row" or scope="col" or both. To fix this just replace the LayoutAlgorithm to normal.

Example:  mMessageContentView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.NORMAL);

Thanks to Stackoverflow: http://stackoverflow.com/questions/14624841/webview-is-not-displaying-table-properly-in-4-0-in-android