1.在页面finish()时需要存储数据给上一个页面使用时,要先存储数据再调用

super.finish();

例子:

@Override
    public void finish() {
        if(adapter != null && adapter.getCommentIdList() != null){
            if(adapter.getCommentIdList().size() > 0){
                Intent intent = new Intent();
                intent.putExtra(TABLOID_TALK_COMMENT_LIKE_CHANGED,(Serializable)adapter.getCommentIdList());
                setResult(RESULT_OK,intent);
            }
        }
        super.finish();
    }

results matching ""

    No results matching ""