Skip to content

Commit

Permalink
fix init issue
Browse files Browse the repository at this point in the history
  • Loading branch information
saschoar committed Apr 4, 2018
1 parent 37920e1 commit 137adee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ And then the actual library dependency to your module's `build.gradle`:

```groovy
dependencies {
compile 'com.github.transferwise:sequence-layout:1.0.4'
compile 'com.github.transferwise:sequence-layout:1.0.5'
}
```

Expand Down
4 changes: 2 additions & 2 deletions sequencelayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 27
versionCode 4
versionName "1.0.4"
versionCode 5
versionName "1.0.5"
archivesBaseName = "com.transferwise.sequencelayout-${versionName}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.graphics.Rect
import android.support.annotation.ColorInt
import android.support.annotation.StyleRes
import android.util.AttributeSet
import android.util.Log
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -57,7 +56,6 @@ public class SequenceLayout(context: Context?, attrs: AttributeSet?, defStyleAtt
clipToPadding = false
clipChildren = false

onFinishInflate()
start()
}

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

override fun onGlobalLayout() {
Log.d("testcount", stepsWrapper.childCount.toString())
handler.postDelayed({
if (stepsWrapper.childCount > 0) {
setProgressBarHorizontalOffset()
placeDots()
if (stepsWrapper.childCount > 0) {
setProgressBarHorizontalOffset()
placeDots()
post({
animateToActive()
viewTreeObserver.removeOnGlobalLayoutListener(this)
}
}, 500)
})
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public class SequenceStep(context: Context?, attrs: AttributeSet?)
setupSubtitleTextAppearance(attributes)
setupActive(attributes)

onFinishInflate()
attributes.recycle()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ internal class SequenceStepDot(context: Context?, attrs: AttributeSet?, defStyle
init {
View.inflate(getContext(), R.layout.sequence_dot, this)
isEnabled = false
onFinishInflate()
}

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

0 comments on commit 137adee

Please sign in to comment.