Gyanendra Mani
Gyanendra Mani

Reputation: 319

Screenshot of webview in android

I have used chartiq in my android app which draws chart.

However when I try to capture the screenshot of the webview through code it shows white screen.

This issue is on devices running v4.4.3 and above.It works perfectly fine on emulator.

Upvotes: 0

Views: 778

Answers (2)

Alexander Pletnyov
Alexander Pletnyov

Reputation: 1

In my case android:hardwareAccelerated="false" in manifest caused scroll problem in webview.

You may call webview.invalidate() before to take screenshot.

Or try this webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null)

Upvotes: 0

Gyanendra Mani
Gyanendra Mani

Reputation: 319

adding this in manifest.xml android:hardwareAccelerated="false"

Upvotes: 2

Related Questions