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
// Called when a top button is pressed, with index corresponding to button title. | |
onPress(index) { | |
LayoutAnimation.configureNext(LayoutAnimation.Presets.spring); | |
this.setState({index: index}); | |
} |
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
// Called when a top button is pressed, with index corresponding to button title. | |
onPress(index) { | |
this.setState({index: index}); | |
} |
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
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} 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
/** | |
* @author Justin Poliachik | |
* | |
* This ImageView subclass allows a scale type of 'TopCrop' | |
* The src image will be scaled to match the view and cropped | |
* so that the top of the image remains fixed. | |
* The bottom will crop according to the view height. | |
*/ | |
public class TopCropImage extends ImageView{ |
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
/** | |
* @author Justin Poliachik | |
* | |
* This ImageView subclass allows a scale type of 'BottomCrop' | |
* The src image will be scaled to match the view and cropped | |
* so that the bottom of the image remains fixed. | |
* The top will crop according to the view height. | |
*/ | |
public class BottomCropImage extends ImageView { |
NewerOlder