Kotlin / anko

Pleasant Android application development
Apache License 2.0
15.89k stars 1.29k forks source link

Handling TextView#setMinWidth() #546

Open tateisu opened 6 years ago

tateisu commented 6 years ago

If we use android:minWidth="48dp" for Button in XML

But Anko Layout only call TextView#setMinWidth(). We have to set both of minimumWidth and minWidth for change minimum width.

tateisu commented 6 years ago

extension function for help it.

var TextView.minWidthCompat : Int
    get() = minWidth
    set(value) {
        minimumWidth = value
        minWidth = value
    }