1
votes

hi i have build a rss reader for android with help of ibm tutorial .

But on list click it is not showing the descrition as of th ShowDescrition class. here the the code for call of class on click of list item. can someone suggest me any idea to get it working.

the code to call the class is public void onItemClick(AdapterView parent, View v, int position, long id) { Log.i(tag,"item clicked! [" + feed.getItem(position).getTitle() + "]");

     Intent itemintent = new Intent(this,ShowDescription.class);

     Bundle b = new Bundle();
     b.putString("title", feed.getItem(position).getTitle());

 b.putString("description", feed.getItem(position).getDescription());

    b.putString("link", feed.getItem(position).getLink());

   b.putString("pubdate", feed.getItem(position).getPubDate());

     itemintent.putExtra("android.intent.extra.INTENT", b);

     startSubActivity(itemintent,0);
 }


its shows error in startsubactivity

and ask to implement one method

the added function is

private Intent startSubActivity(Intent itemintent, int i) { // TODO Auto-generated method stub

}

showdescription is the class to be called

thanx in advance

1
what code are you talking about? - yeradis
i have just added it yeradis please have a look at the code - Avi kumar
Hi, have you checked your rss ? maybe instead of using the Description element is using a Content or something like that - yeradis

1 Answers

-1
votes

startSubActivity(); is old format don't use it, its not working anymore instead you can use

startActivity();

or

startActivityForResult();