Gửi
Fragment fragment =newFragment();Bundle bundle =newBundle(); bundle.putInt(key, value);
fragment.setArguments(bundle);Nhận
Bundle bundle =this.getArguments();
int myInt = bundle.getInt(key, defaultValue);
Các fragment khác đều nhận đc nếu trùng key
No comments:
Post a Comment