i am trying to change the webview height dynamically, this is my code,
WebView answerHtml = new WebView(this);
answerHtml.setId(i);
answerHtml.setOnTouchListener(AnswerListener);
answerHtml.setBackgroundColor(0);
answerHtml.setBackgroundResource(R.drawable.ans_back);
answerHtml.getSettings().setJavaScriptEnabled(true);
answerHtml.loadDataWithBaseURL(null, a.getText(), "text/html",
"utf-8", null);
ansCellLayout.setTag(OPTION_LAYOUT_TAG);
ansCellLayout.addView(answerHtml);
and this is in for loop but the height is only this big
i want it to have more height i have tried setting minimun height,scaling but not working please help.
Try this code while adding WebView to your layout.
Hoping that
ansCellLayoutisLinearLayoutand WebView will be created with 100 width and 100 height.