Android 做无数据跳转时报TransactionTooLa

2019-03-06  本文已影响0人  B_f773
    /**
     * 保存退出时的当前数据
     * @param outState
     */
    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putSerializable("product_list", (Serializable) this.mAdertisementList);

    }

    /**
     * 获取退出时保存的数据
     * @param savedInstanceState
     */
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mAdertisementList = (List<WAdvertisementGetListModelRespData>) savedInstanceState.getSerializable("product_list");
    }
上一篇下一篇

猜你喜欢

热点阅读