Skip to content

Commit

Permalink
Merge pull request #111 from Trendyol/fix-timeline-view-item-width
Browse files Browse the repository at this point in the history
get timelineItem layout width from view state getItemWidth method
  • Loading branch information
sumrukarss authored Nov 16, 2022
2 parents 0ffaac9 + 44c90ba commit dedf172
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/timeline-view/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="https://raw.githubusercontent.com/Trendyol/android-ui-components/master/images/timeline-view.png" width="240"/>

timelineViewVersion = timeline-view-1.1.0 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
timelineViewVersion = timeline-view-1.1.1 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## TimelineView
TimelineView creates a timeline and shows actions over time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TimelineItemAdapter(var timelineOrientation: TimelineOrientation = HORIZON

fun bind(itemViewState: TimelineItemViewState) {
with(binding) {
root.layoutParams = root.layoutParams.apply { width = itemViewState.lineWidth.toInt() }
root.layoutParams = root.layoutParams.apply { width = itemViewState.getItemWidth().toInt() }
with(viewStartLine) {
setBackgroundColor(itemViewState.getStartLineColor())
visibility = itemViewState.getStartLineVisibility()
Expand Down

0 comments on commit dedf172

Please sign in to comment.