react-native-navigation的迁移库

StyleParams.java 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.reactnativenavigation.params;
  2. import android.os.Bundle;
  3. import android.support.annotation.ColorInt;
  4. public class StyleParams {
  5. public static class Color {
  6. @ColorInt
  7. private Integer color = null;
  8. public Color() {
  9. color = null;
  10. }
  11. public Color(Integer color) {
  12. this.color = color;
  13. }
  14. public boolean hasColor() {
  15. return color != null;
  16. }
  17. @ColorInt
  18. public int getColor() {
  19. if (!hasColor()) {
  20. throw new RuntimeException("Color undefined");
  21. }
  22. return color;
  23. }
  24. public static Color parse(Bundle bundle, String key) {
  25. return bundle.containsKey(key) ? new Color(bundle.getInt(key)) : new Color();
  26. }
  27. }
  28. public Color statusBarColor;
  29. public Color contextualMenuStatusBarColor;
  30. public Color contextualMenuButtonsColor;
  31. public Color contextualMenuBackgroundColor;
  32. public Color topBarColor;
  33. public CollapsingTopBarParams collapsingTopBarParams;
  34. public boolean topBarHidden;
  35. public boolean topBarElevationShadowEnabled;
  36. public boolean topTabsHidden;
  37. public boolean drawScreenBelowTopBar;
  38. public boolean titleBarHidden;
  39. public boolean titleBarHideOnScroll;
  40. public boolean topBarTransparent;
  41. public boolean topBarTranslucent;
  42. public Color titleBarTitleColor;
  43. public Color titleBarSubtitleColor;
  44. public Color titleBarButtonColor;
  45. public Color titleBarDisabledButtonColor;
  46. public boolean backButtonHidden;
  47. public Color topTabTextColor;
  48. public Color selectedTopTabTextColor;
  49. public int selectedTopTabIndicatorHeight;
  50. public Color selectedTopTabIndicatorColor;
  51. public Color screenBackgroundColor;
  52. public boolean drawScreenAboveBottomTabs;
  53. public Color snackbarButtonColor;
  54. public boolean bottomTabsHidden;
  55. public boolean bottomTabsHiddenOnScroll;
  56. public Color bottomTabsColor;
  57. public Color selectedBottomTabsButtonColor;
  58. public Color bottomTabsButtonColor;
  59. public boolean forceTitlesDisplay;
  60. public Color bottomTabBadgeTextColor;
  61. public Color bottomTabBadgeBackgroundColor;
  62. public Color navigationBarColor;
  63. }