react-native-navigation的迁移库

ButtonFactory.java 595B

12345678910111213141516171819
  1. package com.reactnativenavigation.views;
  2. import android.view.Menu;
  3. import android.view.View;
  4. import com.reactnativenavigation.params.TitleBarButtonParams;
  5. class ButtonFactory {
  6. public static TitleBarButton create(Menu menu, View parent, TitleBarButtonParams params, String navigatorEventId) {
  7. switch (params.eventId) {
  8. case TitleBarSearchButton.BUTTON_ID:
  9. return new TitleBarSearchButton(menu, parent, params, navigatorEventId);
  10. default:
  11. return new TitleBarButton(menu, parent, params, navigatorEventId);
  12. }
  13. }
  14. }