瀏覽代碼

Add colored icon to BottomTabs screen

Guy Carmeli 6 年之前
父節點
當前提交
81c5a926d1
共有 3 個檔案被更改,包括 5 行新增4 行删除
  1. 0
    2
      playground/src/app.js
  2. 二進制
      playground/src/images/colored_tab_icon@2x.png
  3. 5
    2
      playground/src/screens/WelcomeScreen.js

+ 0
- 2
playground/src/app.js 查看文件

32
         orientation: ['portrait']
32
         orientation: ['portrait']
33
       },
33
       },
34
       bottomTab: {
34
       bottomTab: {
35
-        iconColor: '#1B4C77',
36
-        selectedIconColor: '#0f0',
37
         textColor: '#1B4C77',
35
         textColor: '#1B4C77',
38
         selectedTextColor: '#0f0',
36
         selectedTextColor: '#0f0',
39
         fontFamily: 'HelveticaNeue-Italic',
37
         fontFamily: 'HelveticaNeue-Italic',

二進制
playground/src/images/colored_tab_icon@2x.png 查看文件


+ 5
- 2
playground/src/screens/WelcomeScreen.js 查看文件

87
                         },
87
                         },
88
                         bottomTab: {
88
                         bottomTab: {
89
                           text: 'Tab 1',
89
                           text: 'Tab 1',
90
-                          icon: require('../images/one.png'),
91
-                          selectedIcon: require('../images/one.png'),
90
+                          icon: require('../images/colored_tab_icon.png'),
92
                           testID: testIDs.FIRST_TAB_BAR_BUTTON
91
                           testID: testIDs.FIRST_TAB_BAR_BUTTON
93
                         }
92
                         }
94
                       }
93
                       }
118
                   bottomTab: {
117
                   bottomTab: {
119
                     text: 'Tab 2',
118
                     text: 'Tab 2',
120
                     icon: require('../images/two.png'),
119
                     icon: require('../images/two.png'),
120
+                    iconColor: '#1B4C77',
121
+                    selectedIconColor: '#0f0',
121
                     testID: testIDs.SECOND_TAB_BAR_BUTTON
122
                     testID: testIDs.SECOND_TAB_BAR_BUTTON
122
                   }
123
                   }
123
                 }
124
                 }
138
                   bottomTab: {
139
                   bottomTab: {
139
                     text: 'Tab 3',
140
                     text: 'Tab 3',
140
                     icon: require('../images/one.png'),
141
                     icon: require('../images/one.png'),
142
+                    iconColor: '#1B4C77',
143
+                    selectedIconColor: '#0f0',
141
                     selectedIcon: require('../images/one.png')
144
                     selectedIcon: require('../images/one.png')
142
                   }
145
                   }
143
                 }
146
                 }