How to prevent a ScrollView from scrolling to a WebView after data is loaded?


You should create new class extend ScrollView, then Override requestChildFocus:

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.webkit.WebView;
import android.widget.ScrollView;

public class MyScrollView extends ScrollView {

 public MyScrollView(Context context, AttributeSet attrs, int defStyle) {
 super(context, attrs, defStyle);
 // TODO Auto-generated constructor stub

 public MyScrollView(Context context, AttributeSet attrs) {
 super(context, attrs);
 // TODO Auto-generated constructor stub

 public MyScrollView(Context context) {
 // TODO Auto-generated constructor stub

 public void requestChildFocus(View child, View focused) {
 if (focused instanceof WebView)
 super.requestChildFocus(child, focused);

How to transparent Android WebView


First of all you have to make a transparent background in html code:

String webData = StringHelper.addSlashes("<!DOCTYPE html>
<meta http-equiv=\"Content-Type\" " +
 "content=\"text/html; charset=utf-8\"> 
<div style=\"background-color: rgba(0,0,0,1.0); ">
 your webpage details...

and then:

webView = (WebView) findViewById(;
webView.loadData(webData, "text/html", "UTF-8");