react-native-navigation的迁移库

RnnModal.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package com.reactnativenavigation.modal;
  2. public class RnnModal {
  3. //
  4. // private Layout contentView;
  5. //
  6. // public RnnModal(Context context, ModalController modalController, _Screen screen) {
  7. // super(context, R.style.Modal);
  8. // modalController.add(this);
  9. // init(context, screen);
  10. // }
  11. //
  12. // @SuppressLint("InflateParams")
  13. // private void init(final Context context, _Screen screen) {
  14. // requestWindowFeature(Window.FEATURE_NO_TITLE);
  15. // contentView = null;
  16. // setContentView((View) contentView);
  17. //
  18. //// // Set navigation colors
  19. //// if (SdkSupports.lollipop()) {
  20. //// Window window = getWindow();
  21. //// window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
  22. //// StyleHelper.setWindowStyle(window, context.getApplicationContext(), screen);
  23. //// }
  24. // setOnDismissListener(this);
  25. // }
  26. //
  27. // public void push(_Screen screen) {
  28. // contentView.push(screen);
  29. // }
  30. //
  31. // public _Screen pop() {
  32. // return contentView.pop();
  33. // }
  34. //
  35. // @Override
  36. // public void onScreenPopped(_Screen popped) {
  37. // if (contentView.getScreenCount() == 0) {
  38. // dismiss();
  39. // }
  40. // }
  41. //
  42. // @Nullable
  43. // public _Screen getCurrentScreen() {
  44. // return mScreenStack.isEmpty() ? null : mScreenStack.peek();
  45. // }
  46. //
  47. // @Override
  48. // public void onBackPressed() {
  49. // if (mScreenStack.getStackSize() == 1) {
  50. // super.onBackPressed();
  51. // } else {
  52. // pop();
  53. // }
  54. // }
  55. //
  56. // @Override
  57. // public void onDismiss(DialogInterface dialog) {
  58. // mScreenStack.removeAllReactViews();
  59. // ModalController.getInstance().remove();
  60. // // After modal is dismissed, update Toolbar with screen from parent activity or previously displayed modal
  61. // BaseReactActivity context = ContextProvider.getActivityContext();
  62. // if (context != null) {
  63. // _Screen currentScreen = context.getCurrentScreen();
  64. // StyleHelper.updateStyles(mToolBar, currentScreen);
  65. // }
  66. // }
  67. }