怎么判断fragment跳转的来源

因为一个fragment界面有很多的跳转的来源,所以想问下怎么知道是哪里跳转过来的,或者返回按钮后,返回哪一个fragment

三个fragment。分别是A,B,C A和B都可以跳转到C,想判断C的跳转来源是A还是B。

没懂你的意思,
如果是要判断fragment的话,可以通过getactivity获取到被加载fragment的页面
再一种就是在fragment里面定义一个字段,来存储来源

public static CFragment newInstance(int Type) {
    CFragment newFragment = new CFragment();
    Bundle bundle = new Bundle();
    bundle.putInt("type",type);
    newFragment.setArguments(bundle);
    return newFragment;
}

用type去标记来源