What is the ButtonBarLayout and how should we use it?

后端 未结 7 1885
一向
一向 2021-02-03 19:57

When I developed, I found a new widget called android.support.v7.widget.ButtonBarLayout unexpectedly. I tried to search it on the internet, but nothing was found, e

7条回答
  •  青春惊慌失措
    2021-02-03 20:06

    Just to add to the other answers, if you guys want to check the orientation of a ButtonBarLayout you should check the orienation AFTER the value has called on measure.

    In other words (Kotlin):

    buttonBarLayout.post {
        val orientation = buttonBarLayout.orientation
        val height = buttonBarLayout.measuredHeight
    }
    

提交回复
热议问题