Hi friends I am getting the value from webserver .I am creating array of web view .In webview I am displaying article description,date .article id is coming from webserver. my requirment is if user touch the webview. I have to pass the article id to another activity can anybody tell how to do my code is below
for(int i=0;i<articleParsedValue.size();i++)
{
ArticleDataSet articleDataset=(ArticleDataSet)articleParsedValue.get(i);
HashMap<String, String> mapValue=new HashMap<String, String>();
WebView webviewcontent=new WebView(this);
String html ="<html><body><div><label style=\"font:bold 17.5px verdana; color:#C1002B\">"+articleDataset.getArticle_title()+"<label style=\"font:13px verdana; color:#000000\">"+"|"+"</label>"+"<label style=\"font:bold 13px verdana; color:#000000\">"+articleDataset.getArticle_type()+"</label><br><label style=\"font:13px verdana; color:#AAAAAA\">"+articleDataset.getArticle_date()+" </label> </div>";
html=html+"<div><label style=\"font:13px verdana; color:#000000\">"+articleDataset.getArticle_summary()+"</label></div></body></html>" ;
webviewcontent.getSettings().setJavaScriptEnabled(true);
webviewcontent.clearCache(true);
webviewcontent.loadData(html, "text/html", "utf-8");
webviewcontent.setOnTouchListener(new OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
Intent newIntent=new Intent(this,MyCompaniesActivity.class);
newIntent.putExtra("articleid", articleDataset.getArticle_id());
startActivity(newIntent);
return false;
}
}
) ;