How to transfer some data to another Fragment?

前端 未结 10 1922
说谎
说谎 2020-11-22 11:41

How to transfer some data to another Fragment likewise it was done with extras for intents?

10条回答
  •  北海茫月
    2020-11-22 12:43

    getArguments() is returning null because "Its doesn't get anything"

    Try this code to handle this situation

    if(getArguments()!=null)
    {
    int myInt = getArguments().getInt(key, defaultValue);
    }
    

提交回复
热议问题