mirror of
https://github.com/zhigang1992/react-native-slider.git
synced 2026-06-14 09:59:37 +08:00
Merge pull request #41 from janmarsicek/add-thumb-image
Add thumb image
This commit is contained in:
@@ -135,6 +135,14 @@ var SliderExample = React.createClass({
|
||||
thumbTouchSize={{width: 50, height: 40}}
|
||||
/>
|
||||
</SliderContainer>
|
||||
<SliderContainer caption='<Slider/> with custom style #9 and thumbImage'>
|
||||
<Slider
|
||||
minimumTrackTintColor='#13a9d6'
|
||||
thumbImage={require('./img/thumb.png')}
|
||||
thumbStyle={customStyles9.thumb}
|
||||
thumbTintColor='#0c6692'
|
||||
/>
|
||||
</SliderContainer>
|
||||
</ScrollView>
|
||||
);
|
||||
},
|
||||
@@ -281,7 +289,7 @@ var customStyles7 = StyleSheet.create({
|
||||
|
||||
var customStyles8 = StyleSheet.create({
|
||||
container: {
|
||||
height: 20,
|
||||
height: 30,
|
||||
},
|
||||
track: {
|
||||
height: 2,
|
||||
@@ -299,4 +307,15 @@ var customStyles8 = StyleSheet.create({
|
||||
}
|
||||
});
|
||||
|
||||
var customStyles9 = StyleSheet.create({
|
||||
thumb: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
shadowColor: 'black',
|
||||
shadowOffset: {width: 0, height: 1},
|
||||
shadowOpacity: 0.5,
|
||||
shadowRadius: 1,
|
||||
}
|
||||
});
|
||||
|
||||
AppRegistry.registerComponent('Example', () => SliderExample);
|
||||
|
||||
BIN
Example/img/thumb.png
Normal file
BIN
Example/img/thumb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 260 B |
BIN
Example/img/thumb@2x.png
Normal file
BIN
Example/img/thumb@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 472 B |
BIN
Example/img/thumb@3x.png
Normal file
BIN
Example/img/thumb@3x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 586 B |
Reference in New Issue
Block a user