cr5315
Android Enthusiast
I have a TextView that is supposed to count how many times a user clicks on a link in a webview. I have the changing the textview set up, but I haven't done any work with the numbers before so I don't know how to set that up.
Here's the onClick code:
What I'm trying to do is set the X to how many times the user has clicked a link. I've done some searching on developer.android.com but I wasn't able to find anything that worked for me and I'm pretty sure that what I'm trying to do is quite basic, but I'm still kind of new to Android developing.
Any ideas?
Here's the onClick code:
Code:
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
final TextView mTextView = (TextView) findViewById(R.id.jesusClicks);
mTextView.setText("Clicks: X");
return true;
}
}
What I'm trying to do is set the X to how many times the user has clicked a link. I've done some searching on developer.android.com but I wasn't able to find anything that worked for me and I'm pretty sure that what I'm trying to do is quite basic, but I'm still kind of new to Android developing.
Any ideas?