This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HEADER_MAX_HEIGHT = 200; | |
const HEADER_MIN_HEIGHT = 60; | |
const HEADER_SCROLL_DISTANCE = HEADER_MAX_HEIGHT — HEADER_MIN_HEIGHT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
constructor(props) { | |
super(props); | |
this.state = { | |
scrollY: new Animated.Value(0), | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import { | |
Animated, | |
Image, | |
ScrollView, | |
StyleSheet, | |
Text, | |
View, | |
} from 'react-native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import Relay from 'react-relay'; | |
import Storage from './utils/Storage'; | |
const TOKEN_KEY = 'TW_USER_TOKEN'; | |
let _token = Storage.getItem(TOKEN_KEY, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *splashXibViews = [[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil]; | |
UIView *splash = [splashXibViews objectAtIndex:0]; | |
splash.frame = rootView.frame; | |
rootView.loadingView = splash; | |
rootView.loadingViewFadeDelay = 0.25; | |
rootView.loadingViewFadeDuration = 0.3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddRemoveExample extends React.Component { | |
state = { | |
open: false, | |
}; | |
componentWillUpdate() { | |
LayoutAnimation.easeInEaseOut(); | |
} | |
_onPressAddView = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input | output | |
0 | 0 | |
20 | 20 | |
40 | 20 | |
60 | 20 | |
50 | 10 | |
40 | 0 | |
50 | 10 | |
20 | 0 |