|
53 | 53 |
|
54 | 54 | (def status-bar-class (when-not platform/desktop? (get-react-property "StatusBar"))) |
55 | 55 |
|
56 | | -(def scroll-view (get-class "ScrollView")) |
| 56 | +(def scroll-view-class (get-class "ScrollView")) |
57 | 57 | (def web-view (get-class "WebView")) |
58 | 58 | (def keyboard-avoiding-view-class (get-class "KeyboardAvoidingView")) |
59 | 59 |
|
|
84 | 84 |
|
85 | 85 | (def touchable-highlight-class (get-class "TouchableHighlight")) |
86 | 86 | (def touchable-without-feedback-class (get-class "TouchableWithoutFeedback")) |
87 | | -(def touchable-opacity (get-class "TouchableOpacity")) |
| 87 | +(def touchable-opacity-class (get-class "TouchableOpacity")) |
88 | 88 | (def activity-indicator-class (get-class "ActivityIndicator")) |
89 | 89 |
|
90 | 90 | (defn activity-indicator [props] |
|
94 | 94 |
|
95 | 95 | (def pan-responder (lazy-get-react-property "PanResponder")) |
96 | 96 | (def animated (lazy-get-react-property "Animated")) |
97 | | -(defn animated-view [] |
| 97 | + |
| 98 | +(defn animated-view-class [] |
98 | 99 | (reagent/adapt-react-class (.-View (animated)))) |
99 | 100 |
|
| 101 | +(defn animated-view [props & content] |
| 102 | + (vec (conj content props (animated-view-class)))) |
| 103 | + |
100 | 104 | (def dimensions (lazy-get-react-property "Dimensions")) |
101 | 105 | (def keyboard (lazy-get-react-property "Keyboard")) |
102 | 106 | (def linking (lazy-get-react-property "Linking")) |
|
162 | 166 | :resizeMode "contain" |
163 | 167 | :style style}])) |
164 | 168 |
|
| 169 | +(defn touchable-opacity [props content] |
| 170 | + [(touchable-opacity-class) props content]) |
| 171 | + |
165 | 172 | (defn touchable-highlight [props content] |
166 | 173 | [(touchable-highlight-class) |
167 | 174 | (merge {:underlay-color :transparent} props) |
|
232 | 239 | [view props])] |
233 | 240 | (vec (concat view-element children)))) |
234 | 241 |
|
| 242 | +(defn scroll-view [props & children] |
| 243 | + (vec (conj children props (scroll-view-class)))) |
| 244 | + |
235 | 245 | (views/defview with-activity-indicator |
236 | 246 | [{:keys [timeout style enabled? preview]} comp] |
237 | 247 | (views/letsubs |
238 | | - [loading (reagent/atom true)] |
| 248 | + [loading (reagent/atom true)] |
239 | 249 | {:component-did-mount (fn [] |
240 | 250 | (if (or (nil? timeout) |
241 | 251 | (> 100 timeout)) |
|
0 commit comments