开发者

How To Update A List After Using A Style Theme

I have a list that fills up nicely after entering data from an input panel that uses a regular layout style.

But, if use a Dialog or Transparent style theme defined in the manifest for the activity, the list won't update until go back to the parent activity that called the list activity.

One: W开发者_运维技巧hy is this different than when using a standard layout?

Two: How can I update the list when finished with the dialog? Note: I've tried onResume, onRestart, onthis and onthat and oneverything else... but, it doesn't take care of it.

Thanks


Ask the list to re-render itself by calling notifyDataSetChanged on the Adapter you used to fill the List with.

If your Activity is a sub-class of ListActivity then you might need to call

getAdapter().notifyDataSetChanged();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜