This file contains hidden or 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
| getOpacitySearchBar() { | |
| return { | |
| opacity: this.scrollY.interpolate({ | |
| inputRange: [...], | |
| outputRange: [1, 0], | |
| extrapolate: 'clamp', | |
| }) | |
| }; | |
| } |
This file contains hidden or 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
| export default class SearchBar extends Component { | |
| blurInputs() { | |
| this.inputSearch.blur(); | |
| this.inputLocation.blur(); | |
| this.props.changeInputFocus(false); | |
| } | |
| render() { | |
| const { animation, changeInputFocus, renderTabBar } = this.props; |
This file contains hidden or 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
| _onScrollEndDrag = e => { | |
| let velocity = e.nativeEvent.velocity.y; | |
| if(velocity == 0 || (isAndroid() && Math.abs(Math.round(velocity)) <= 2)) { | |
| this.props.animation.handleIntermediateState(this.scrollToOffset); | |
| } | |
| }; |
This file contains hidden or 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
| render() { | |
| return ( | |
| <SearchBarProvider currentTab={this.state.currentTab}> | |
| {(animation, { canJumpToTab }) => | |
| <View style={initialLayout}> | |
| {Platform.OS === 'android' && | |
| <StatusBar | |
| translucent={true} | |
| backgroundColor="transparent" | |
| /> |
NewerOlder