Comments (4)
This question is more appropriate for stackoverflow, I'll close this since it doesn't look like it's an inherent issue with react-native-scrollable-tab-view, but I'd like to place a link here that points to this question which I posted on stackoverflow, just in case if you wish to chime in. http://stackoverflow.com/questions/31066437/how-to-get-listview-section-header-to-stick
from react-native-scrollable-tab-view.
Interesting! Thanks for the report @jhprks - did you happen to put the ListView inside of a ScrollView? Can you post the code? I have no problem with having this issue on here too!
from react-native-scrollable-tab-view.
Cool! So, the ListView is in its own file called Category.js, I imported this into index.io.js file which renders ScrollableTabView/ScrollView. The following code is what I originally had earlier today.
<View style={styles.container}>
<ScrollableTabView renderTabBar={() => <FacebookTabBar />}>
<ScrollView tabTitle='Search' tabLabel="ion|ios-search" style={styles.tabView}>
<Category />
</ScrollView>
...
</ScrollableTabView>
</View>
I tried a few more things and found out that wrapping <Category>
with <View style={styles.categoryContain}>
and styling it in the following way got me closer to what I wanted.
var deviceHeight = require('Dimensions').get('window').height;
...
var styles = StyleSheet.create({
...
categoryContain: {
top: 0,
height: deviceHeight,
},
});
And here's the addition of <View style={styles.categoryContain}>
.
<View style={styles.container}>
<ScrollableTabView renderTabBar={() => <FacebookTabBar />}>
<ScrollView tabTitle='Search' tabLabel="ion|ios-search" style={styles.tabView}>
<View style={styles.categoryContain}>
<Category />
</View>
</ScrollView>
...
</ScrollableTabView>
</View>
Okay, so far with the above code, the section header properly sticks to the bottom of the tab bar - this is certainly what I wanted to see, but it only seems to work properly when I start out with pulling up the list.
But when I start out with pulling down and then pulling up the list, the section header gets hidden behind the tab bar, and it stays hidden.
from react-native-scrollable-tab-view.
Okay I think I found the solution to the problem. I added scrollEnabled={false}
prop in ScrollView. That was it.
from react-native-scrollable-tab-view.
Related Issues (20)
- \
- this.scrollView.geNode is not a function
- when a flatlist inside the tabview,the flatlist's pullDownToRefresh will not work! HOT 1
- ScrollableTabView下多个Flatlist,Android数据不刷新
- Refresh the component on every tab change HOT 1
- tabContainer but no owner was set. HOT 2
- Weird animation behavior on IOS HOT 1
- ios. version. scroll screen. show not normail but android env is ok HOT 1
- scrollView.getNode HOT 1
- ViewPropTypes will be removed from React Native HOT 2
- Tried to register two views with the same name RNCViewPager HOT 2
- TypeError: Cannot read property 'setPageWithoutAnimation' of undefined on android HOT 3
- Please publish a new npm version? HOT 4
- onChangeTab results in undefined error HOT 1
- Element ref was specified as a string (tabContainer) but no owner was set. HOT 3
- please update new version to npm,thank you very much!
- ViewPropTypes will be removed from React Native HOT 1
- tabBarUnderline not match current
- How can i get current page HOT 1
- It's so old
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-scrollable-tab-view.