Coder Social home page Coder Social logo

Comments (16)

dsah avatar dsah commented on July 20, 2024 1

overwrote renderCircle helped but circle position css is messed, its showing on the far right and line on the left.
timeline

from react-native-timeline-listview.

Hulva avatar Hulva commented on July 20, 2024

@Schwarzenegger Have you figure it out? I've got the same issue as you were...

from react-native-timeline-listview.

Hulva avatar Hulva commented on July 20, 2024

@Schwarzenegger I've fixed it by overriderenderCircle

from react-native-timeline-listview.

Schwarzenegger avatar Schwarzenegger commented on July 20, 2024

@Hulva Yes, i figured it out by overiding renderCircle like you did.

Still messing it css to place the circle in the right place on all devices.

from react-native-timeline-listview.

Hulva avatar Hulva commented on July 20, 2024

@Schwarzenegger I've only played it on android... I didn't know that it'll display different on different device. Hope you'll find a good way to deal with it. Let me know if you do.

from react-native-timeline-listview.

linhanyang avatar linhanyang commented on July 20, 2024

I also have the same problem on ios devices.

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

i have some problem with icon, someone resolved?

from react-native-timeline-listview.

thegamenicorus avatar thegamenicorus commented on July 20, 2024

Hi all.

Is it happen on emulator or real device?

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

in both, debug...

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

this problem is related to the initialListSize property, which by default is 10

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

this problem is related to _renderCicle in circleStyle => left: this.state.x - (circleSize / 2) + ((lineWidth-1) / 2),

this.state.x may be zeroed due to _renderEvent's onLayout

onLayout
Invoked on mount and layout changes with:

{nativeEvent: {layout: {x, y, width, height}}}

This event is fired immediately once the layout has been calculated, but the new layout may not be reflected on the screen at the time the event is received, especially if the layout animation is in progress.

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

any solution for this ?

from react-native-timeline-listview.

Schwarzenegger avatar Schwarzenegger commented on July 20, 2024

@danielgarciasantos like I said, i overwrote renderCircle to look like this.

 renderCircle(rowData, sectionID, rowID) {
    var circleSize = 20
    var circleColor = rowData.circleColor
    var lineWidth = 2
    var ballPadding = (Platform.OS === 'ios') ? width/1.11 : width/1.10

    return (
       <View style={{
          width: 22,
           height: 22,
           borderRadius: 50,
           backgroundColor: circleColor,
           right: ballPadding
         }} />
     )
  } 

And the component

<Timeline
   style={timelineScreenStyle.list}
   data={this.state.data}
   timeContainerStyle={{minWidth:0}}
   detailContainerStyle={timelineScreenStyle.detailContainerStyle}
   separator={false}
   innerCircle={'none'}
   lineWidth={2}
   renderDetail={this.renderDetail}
   renderCircle={this.renderCircle}
   descriptionStyle={{color:'gray'}}
   enableEmptySections={true}
   options={{
     style:{paddingTop: 5}
    }}
    circleSize={22}
             />

It worked smooth for me on Android and IOs after this.

from react-native-timeline-listview.

danielgarciasantos avatar danielgarciasantos commented on July 20, 2024

gave up component?

from react-native-timeline-listview.

naklow12 avatar naklow12 commented on July 20, 2024

Have same problem and I can't do overwrite just like you. Any other solution for this ?

from react-native-timeline-listview.

bhaskardabhi avatar bhaskardabhi commented on July 20, 2024

I am also facing issue while overriding renderCircle

from react-native-timeline-listview.

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.