Code Monkey home page Code Monkey logo

Comments (6)

naqvitalha avatar naqvitalha commented on May 24, 2024

Try giving flex:1 to the listview. Make sure the parent view is also deterministic in height/width.

from recyclerlistview.

SudoPlz avatar SudoPlz commented on May 24, 2024

@naqvitalha do we have to necessarily set a parent width and the height to the immediate parent View that contains the RecyclerListView?

Even though we do know the width of the content of the RecyclerListView we have no idea what the content height will be. (We're using RecyclerListView as a horizontal list) so setting a fixed height on the parent View hides the content.

Any ideas?

from recyclerlistview.

naqvitalha avatar naqvitalha commented on May 24, 2024

@SudoPlz All you need is some inferable way to have determine dimensions to compute layouts. An example can help me understand better. If you can build whatever you're trying to with plain ScrollView then most likely it'll be possible with RecyclerListView. RecyclerListView can monitor ScrollView size changes if you set canChangeSize prop to true.

from recyclerlistview.

SudoPlz avatar SudoPlz commented on May 24, 2024

Basically the problem is that if people use huge Accessibility font sizes, then the height of the content should change, and I have no way of knowing that upfront.

What I tried though was, I used minHeight instead of height and the error is gone now.
Not sure if that's ideal what do you think @naqvitalha ?

from recyclerlistview.

naqvitalha avatar naqvitalha commented on May 24, 2024

It does sound like the solution for now. It will cause one set of layouts to get discarded but unless you have tens of thousands of items that shouldn't be noticeable. I'll get back if I can think of something better.

from recyclerlistview.

lvstross avatar lvstross commented on May 24, 2024

My fix for this issue was to wrap my list in a View component and give that view a height and width.

      return <View style={{ width: '100%', height: this.props.dimensions.get('height') }}>
        <RecyclerListView
          keyboardShouldPersistTaps={true}
          dataProvider={data}
          layoutProvider={this.layoutProvider}
          rowRenderer={this.renderRow}
          canChangeSize={true}
        />
      </View>;

from recyclerlistview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.