How to pass string in bundle in onClick
method (how to pass page contentpage string in onclick
bundle)
Button button[] = new Button[z];
String pagetitle;
String pagecontent;
for (int k = 0; k < z; k++) {
button[k] = new Button(this);
addbutton.addView(button[k]);
pagetitle=null;
pagecontent=null;
for (int j = 0; j <= k; j++)
{
pagetitle=stringArrayTitle.get(j);
pagecontent=stringArrayContent.get(j);
//System.out.println("titile array list"+ y);
button[k].setText(pagetitle);
button[k].setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Bundle ba= new Bundle();
}
});
}
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}