material-foundation / material-remixer-android

Remixer for Android. Live adjustment of app variables.
Apache License 2.0
774 stars 54 forks source link

Using remixer with Kotlin -> annotation parameter error #155

Open felislynx-silae opened 7 years ago

felislynx-silae commented 7 years ago

If i'll add Remixer annotation in kotlin fragment/activity this error appears:

error: Trying to use Variable annotations on wrong parameter, must be of type class java.lang.Float

trevorhalvorson commented 7 years ago

Using type Float? has been working for me:

@RangeVariableMethod(minValue = 6F, maxValue = 70F)
    fun setTitleTextSize(textSize: Float?) {
        if (textSize != null) {
            title_text.textSize = textSize
        }
    }

See Mapped Types