I have an application that parses XML from an online XML file and displays it in a listview. The user can then click on an item and view the full story. This all works fine but I would like for users to be able to save certain articles so that they can read them at a later date or offline. I assume this is fairly simple but am having trouble finding anything to lead me in the right direction. Below is the activity that displays the single news article.
public class SingleActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.single_list_item);
// getting intent data
Intent in = getIntent();
// Get XML values from previous intent
String title = in.getStringExtra("name");
String date = in.getStringExtra("date");
String content = in.getStringExtra("content");
// Displaying all values on the screen
TextView lblName = (TextView) findViewById(R.id.name_label);
TextView lblDate = (TextView) findViewById(R.id.date_label);
TextView lblCont = (TextView) findViewById(R.id.content_label);
lblName.setText(title);
lblDate.setText(date);
lblCont.setText(Html.fromHtml(content));
}
}