Skip to content

Commit

Permalink
Fixed constructors and added @JvmOverload annotation (cortinico#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico authored Oct 29, 2018
1 parent 74bf775 commit d14304f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions slidetoact/src/main/java/com/ncorti/slidetoact/SlideToActView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ import org.xmlpull.v1.XmlPullParserException
* SlideToActView is an elegant material designed slider, that enrich your app
* with a "Slide-to-unlock" like widget.
*/
class SlideToActView(context: Context,
attrs: AttributeSet?,
defStyleAttr: Int) : View(context, attrs, defStyleAttr) {

constructor(context: Context) : this(context, null, R.styleable.SlideToActViewTheme_slideToActViewStyle)
constructor(context: Context, attrs: AttributeSet) : this(context, attrs, R.styleable.SlideToActViewTheme_slideToActViewStyle)
class SlideToActView @JvmOverloads constructor (
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = R.attr.slideToActViewStyle
) : View(context, attrs, defStyleAttr) {

/* -------------------- LAYOUT BOUNDS -------------------- */

Expand Down

0 comments on commit d14304f

Please sign in to comment.