I have an activity with a button and an image and a webview. My goal is to load a page, then execute javascript on it to draw graphics using HTML5 etc.
The height of
Found a solution, which was to change the renderCoupon to this:
void renderCoupon(final int width,final int height){
mWeb.postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
final Canvas c =new Canvas(bitmap);
mWeb.draw(c);
imgView.setMinimumWidth(width);
imgView.setMinimumHeight(height);
imgView.setImageBitmap(bitmap);
imgView.setVisibility(View.VISIBLE);
}
}, 100);
}
And of course I removed the Sleep stuff in my callback. Thanks to my collegue who tipped me about this. :)