react-native-navigation的迁移库

NavigationParams.java 907B

12345678910111213141516171819202122232425262728
  1. package com.reactnativenavigation.params;
  2. import android.os.Bundle;
  3. public class NavigationParams {
  4. private static final String SCREEN_INSTANCE_ID = "screenInstanceID";
  5. private static final String NAVIGATOR_ID = "navigatorID";
  6. private static final String NAVIGATOR_EVENT_ID = "navigatorEventID";
  7. public String screenInstanceId;
  8. public String navigatorId;
  9. public String navigatorEventId;
  10. public NavigationParams(Bundle bundle) {
  11. screenInstanceId = bundle.getString(SCREEN_INSTANCE_ID);
  12. navigatorId = bundle.getString(NAVIGATOR_ID);
  13. navigatorEventId = bundle.getString(NAVIGATOR_EVENT_ID);
  14. }
  15. public Bundle toBundle() {
  16. Bundle b = new Bundle();
  17. b.putString(SCREEN_INSTANCE_ID, screenInstanceId);
  18. b.putString(NAVIGATOR_ID, navigatorId);
  19. b.putString(NAVIGATOR_EVENT_ID, navigatorEventId);
  20. return b;
  21. }
  22. }