I have the following code:
try {
jArray = new JSONArray(result);
JSONObject json_data = null;
String myString = null;
for (int i = 0; i < jArray.length(); i++) {
HashMap<String, String> map = new HashMap<String, String>();
json_data = jArray.getJSONObject(i);
map.put("id", String.valueOf(json_data.getString("news_id")));
map.put("title", json_data.getString("news_title"));
myString = myString + "| "
+ json_data.getString("news_title").toString();
}
String myString1 = myString.replace("null", "");
txt1 = (TextView) findViewById(R.id.twxmorq);
txt1.setSelected(true);
txt1.setText(myString1);
I am printing whole title in text view with marquee style in single line with ' ! ' partition. Now I want to apply onclick
on each title and open it in new activity with detail news in web view.
Detail news will load with this data:
"http://www.taxmann.com/TaxmannWhatsnewService/Services.aspx?service=getnewsdetails&newsid=" + id
Where id will differ for different title. Can you please tell me the logic or post some code for Implementation? I'm not able to do this.