For which API-level do you need that function?
Since API Level 8 there is a second loadUrl
function:
public void loadUrl (String url, Map<String, String> extraHeaders)
With the extraHeaders
you should be able to send a referrer.
EDIT:
Here is a complete working example:
String url = "http://www.targetserver.tld/";
Map<String, String> extraHeaders = new HashMap<String, String>();
extraHeaders.put("Referer", "http://www.referer.tld/login.html");
WebView wv;
wv = (WebView) findViewById(R.id.webview);
wv.loadUrl(url, extraHeaders);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…