your code is little bit confusing, so I give you a sample
Sample Tag class
public class MyTag
{
String code;
String image;
String web_ref;
public MyTag()
{
code=null;
image=null;
web_ref=null;
}
public MyTag(String cod,String img,String wref)
{
code=cod;
image=img;
web_ref=wref;
}
}
you want to get this values when clicked on button right ? So put this tag class object as tag on button in getView of your custom adapter
MyTag myTag=new MyTag("code","image","web_ref");
holder.button.setTag(myTag);
since you get the view clicked as argument to the your function
public void shareOnClickHandler(View v)
{
myTag=(MyTag)v.getTag();
text=myTag.code;
image2.loadUrl("http://"+myTag.image);//..... I'm not sure, thank you
webview.loadUrl(mytag.web_ref);
}
I think you get the idea, try to implement your code with this idea