开发者

how to communicate with embedded activity

In my current project I have a full screen TabActivity. Each tab content is handled by two instances of same ListActivity. Now, I put an extra int in intent to know which data should be displaye开发者_Python百科d. So in onCreate() method of my ListActivity, I check the int in extra and I build my query to obtain a SQLLiteCursor.

I would like to dynamycally give to this two instances of ListActivity the list of item that should be displayed.

I do not know what is the best way to do this. Any idea ?

Regards,


Each tab content is handled by two instances of same ListActivity.

Why not just use ListViews as the contents of the tabs? Why make your job so much harder by wrapping those ListViews each in a ListActivity, then having to work around the fact that you wrapped each in a ListActivity?

Get rid of the ListActivity classes. Put two ListViews as the contents of your tabs. Hand the Adapters to those ListViews in your TabActivity (or regular activity that is using a TabHost).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜