Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with ScrollView instead of ListView #13

Open
maxbeech opened this issue Aug 15, 2018 · 5 comments
Open

How to use with ScrollView instead of ListView #13

maxbeech opened this issue Aug 15, 2018 · 5 comments

Comments

@maxbeech
Copy link

This is a SUPER nice library ❤️

Got it working well for ListView as in the demo, but struggling to get it working with a ScrollView instead - are there any demos around of this being done please?

This is my current code:

screen shot 2018-08-15 at 12 50 54

This is what hapenns when I run it:
(the ScrollView container gets pushed down below TouchThroughView

2018-08-15 12_56_44

Thanks for your help!

@maxbeech
Copy link
Author

Any idea please @martsie ?

Many thanks!

@jjenzz
Copy link

jjenzz commented Aug 28, 2018

@maxbeech This should work:

<View>
  <View style={{ position: "absolute", height: 200, width: Dimensions.get('window').width }}>
    <Button title="Click me" onPress={() => alert("clicked")} />
  </View>
  <TouchThroughWrapper>
    <ScrollView>
      <TouchThroughView style={{ height: 200, width: Dimensions.get('window').width }} />
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
      <Text>Content</Text>
    </ScrollView>
  </TouchThroughWrapper>
</View>

@maxbeech
Copy link
Author

maxbeech commented Sep 11, 2018

Hey @jjenzz! Thanks so much for your response, really appreciated. Have just got round to trying out your solution, though sadly still wasn't working correctly.

Am gunna just use ListView with one item for the moment (I know awful hack) and come back to this assuming it is me who is doing something wrong...

@jjenzz
Copy link

jjenzz commented Sep 14, 2018

@maxbeech Strange, I have this working in my project. Sorry I couldn't be of more help 🙈

@maxbeech
Copy link
Author

Ahh no worries @jjenzz really appreciated anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants