-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加了一个用于测试的temp模块,在index中可以直接进入temp; 尝试使用onScroll和state刷新动画,失败; 尝试使用双层scrollView实现折叠功能,在temp中实验;
- Loading branch information
Showing
7 changed files
with
113 additions
and
23 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* Created by zi on 2016/7/29. | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
//noinspection JSUnresolvedVariable | ||
import { | ||
StyleSheet, | ||
Text, | ||
View, | ||
Image, | ||
ScrollView, | ||
RefreshControl, | ||
PanResponder, | ||
} from 'react-native'; | ||
|
||
class view extends Component{ | ||
render(){ | ||
return( | ||
<View style={{backgroundColor:"#000",flex:1}}> | ||
<View style={{backgroundColor:"#ddd",height:100}}> | ||
<Text>566666666666666</Text> | ||
</View> | ||
<ScrollView style={{backgroundColor:"#000",height:570}} | ||
onStartShouldSetResponder={()=>true} | ||
onMoveShouldSetResponder={()=>true}> | ||
<View style={{backgroundColor:"#00bfff",height:1200}}> | ||
<Text>23333333</Text> | ||
</View> | ||
</ScrollView> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
class scroll extends Component{ | ||
render(){ | ||
return( | ||
<Scrollview style={{backgroundColor:"#000",flex:1}} onSroll={this.props.fn}> | ||
<View style={{backgroundColor:"#ddd",height:100}}> | ||
<Text>566666666666666</Text> | ||
</View> | ||
<ScrollView style={{backgroundColor:"#000",height:570}} | ||
onStartShouldSetResponder={()=>true} | ||
onMoveShouldSetResponder={()=>true}> | ||
<View style={{backgroundColor:"#00bfff",height:1200}}> | ||
<Text>23333333</Text> | ||
</View> | ||
</ScrollView> | ||
</Scrollview> | ||
); | ||
} | ||
} | ||
|
||
class hot extends Component{ | ||
constructor(props){ | ||
super(props); | ||
this.state = {s:true}; | ||
} | ||
componentWillMount() { | ||
|
||
} | ||
_handle(evt){ | ||
let curY = evt.nativeEvent.contentOffset.y; | ||
if(curY == 0){ | ||
this.setState({s:false}); | ||
} | ||
} | ||
render(){ | ||
console.log(this); | ||
return( | ||
<View style={{flex:1}}> | ||
{view | ||
} | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
|
||
module.exports = hot; |