Skip to content

Commit 137adee

Browse files
committed
fix init issue
1 parent 37920e1 commit 137adee

5 files changed

Lines changed: 9 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ And then the actual library dependency to your module's `build.gradle`:
1919

2020
```groovy
2121
dependencies {
22-
compile 'com.github.transferwise:sequence-layout:1.0.4'
22+
compile 'com.github.transferwise:sequence-layout:1.0.5'
2323
}
2424
```
2525

sequencelayout/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111
defaultConfig {
1212
minSdkVersion 19
1313
targetSdkVersion 27
14-
versionCode 4
15-
versionName "1.0.4"
14+
versionCode 5
15+
versionName "1.0.5"
1616
archivesBaseName = "com.transferwise.sequencelayout-${versionName}"
1717
}
1818

sequencelayout/src/main/java/com/transferwise/sequencelayout/SequenceLayout.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import android.graphics.Rect
66
import android.support.annotation.ColorInt
77
import android.support.annotation.StyleRes
88
import android.util.AttributeSet
9-
import android.util.Log
109
import android.view.Gravity
1110
import android.view.View
1211
import android.view.ViewGroup
@@ -57,7 +56,6 @@ public class SequenceLayout(context: Context?, attrs: AttributeSet?, defStyleAtt
5756
clipToPadding = false
5857
clipChildren = false
5958

60-
onFinishInflate()
6159
start()
6260
}
6361

@@ -243,14 +241,13 @@ public class SequenceLayout(context: Context?, attrs: AttributeSet?, defStyleAtt
243241
}
244242

245243
override fun onGlobalLayout() {
246-
Log.d("testcount", stepsWrapper.childCount.toString())
247-
handler.postDelayed({
248-
if (stepsWrapper.childCount > 0) {
249-
setProgressBarHorizontalOffset()
250-
placeDots()
244+
if (stepsWrapper.childCount > 0) {
245+
setProgressBarHorizontalOffset()
246+
placeDots()
247+
post({
251248
animateToActive()
252249
viewTreeObserver.removeOnGlobalLayoutListener(this)
253-
}
254-
}, 500)
250+
})
251+
}
255252
}
256253
}

sequencelayout/src/main/java/com/transferwise/sequencelayout/SequenceStep.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public class SequenceStep(context: Context?, attrs: AttributeSet?)
6464
setupSubtitleTextAppearance(attributes)
6565
setupActive(attributes)
6666

67-
onFinishInflate()
6867
attributes.recycle()
6968
}
7069

sequencelayout/src/main/java/com/transferwise/sequencelayout/SequenceStepDot.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ internal class SequenceStepDot(context: Context?, attrs: AttributeSet?, defStyle
2626
init {
2727
View.inflate(getContext(), R.layout.sequence_dot, this)
2828
isEnabled = false
29-
onFinishInflate()
3029
}
3130

3231
internal fun setDotBackground(@ColorInt color: Int, @ColorInt progressBackgroundColor: Int) {

0 commit comments

Comments
 (0)