Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to start another Activity?
    primarykey
    data
    text
    <p>hi i have bulid a rss reader for with help of ibm tutorial.I have created all the classes for it and i gave the following url "http://www.mahindrasatyam.com/rss/rssfeeds/news_updates.xml". which has the rss feeds. i wanted to get description of each article on click of item in list. for that the code is</p> <pre><code> 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); } </code></pre> <p>but it was showing an error <strong>startSubActivity(itemintent,0);</strong></p> <p>and to remove error needed o implement its method which is</p> <pre><code>private void startSubActivity(Intent itemintent, int i) { // TODO Auto-generated method stub } </code></pre> <p>i want to load the description with the class Show description which is</p> <pre><code>public class ShowDescription extends Activity { public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.showdescription); String theStory = null; Intent startingIntent = getIntent(); if (startingIntent != null) { Bundle b = startingIntent.getBundleExtra("android.intent.extra.INTENT"); if (b == null) { theStory = "bad bundle?"; } else { theStory = b.getString("title") + "\n\n" + b.getString("pubdate") + "\n\n" + b.getString("description").replace('\n',' ') + "\n\nMore information:\n" + b.getString("link"); } } else { theStory = "Information Not Found."; } TextView db= (TextView) findViewById(R.id.storybox); db.setText(theStory); Button backbutton = (Button) findViewById(R.id.back); backbutton.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { finish(); } }); } } </code></pre> <p>but there is no view loaded on click of list item </p> <p>can some one help me to solve this problem</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload