react-native-navigation的迁移库

StyleParams.java 2.2KB

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