I use the standard Android Intent / Bundle method to transfer data into sub-activity.
The problem is that although the intent looks good before the action begins, it displays as a zero value in the sub-activity. I can not find anyone else who had this problem, so I thought that I would ask to indicate where to look / how to debug.
(Target - Android 2.1)
Fragment of parental activity:
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
Intent i = new Intent(ctx, ArticleView.class);
i.putExtra("url", articles.get(position).url.toString());
Log.d(TAG,"Starting article viewer with url " + i.getStringExtra("url"));
startActivityForResult(i,ACTIVITY_ARTICLE);
}
Children's activity fragment:
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.article_view);
if (icicle != null) {
} else {
Log.d(TAG,"Icicle is null - no URL passed in");
}
}
Ignoring the fact that icicle is null and trying to get status information from it (using getString), a hang occurs and:
03-14 22:23:03.529: WARN/ActivityManager(52): Activity HistoryRecord{44ddd238 com.t.s/.ArticlesList} being finished, but not in LRU list
Any hints were greatly appreciated.
source
share