Right now I have a webview being loaded, and then after it's loaded, I have a Runnable started with a while loop inside of it - I want to monitor the URL in the webview for changes.  However, url can't be resolved inside the Runnable:
mWebview.setWebViewClient(new WebViewClient() {
    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
        mWebview.scrollTo(681, 100);
    }
});
//BREAK 
new Thread(new Runnable() {
    public void run() {
        while(url.contains("displaylogin")) {
Is there any way to monitor an element in the UI thread with a Runnable? Or am I going about this the wrong way, and there's a better way to continuously monitor the URL for changes?