How to stop an iteration of TextView when click in on one of the TextView?
Posted
by sgiro
on Stack Overflow
See other posts from Stack Overflow
or by sgiro
Published on 2010-04-07T13:50:35Z
Indexed on
2010/04/07
13:53 UTC
Read the original article
Hit count: 207
textview
Hello, i have one doubt. I have an iteration of TextViews, and what i want is when i click in one TextView , i want stop the iteration and open a web, who can i know what TextView as been click on? i have this code:
Iterator it = text.iterator(); while(it.hasNext()){
test = it.next();
test.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //mWebView = (WebView) findViewById(R.id.webview); mWebView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } });
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl(url);
}
});
// condition to stop the iteration when i click on TextView
}
And what i want is the condition to stop the iteration when i click on the TextView that i want see, i try using some methods that are in the TextView and don't work. Anyone can help me?
Thanks and forgive my English
© Stack Overflow or respective owner