Thread
#compose
    c

    Carminelaface

    2 years ago
    Hi guys, I have one question, I just saw this in the androidx.ui.material package
    /**
     * Contains the default values used by [Button]
     */
    object Button {
        
        /**
         * The default inner padding used by [Button]
         */
        val DefaultInnerPadding = ...
    
        /**
         * The default disabled background color used by Contained [Button]s
         */
        @Composable
        val defaultDisabledBackgroundColor
            
        /**
         * The default disabled content color used by all types of [Button]s
         */
        @Composable
        val defaultDisabledContentColor
    }
    This is not only for the button but for many other views. I think a better naming for the object would be
    ButtonDefalutValues
    or
    ButtonDefaluts
    and remove the
    default
    suffix from all the properties.
    jim

    jim

    2 years ago
    I seem to recall us having exactly this discussion at API Council. I think we came to the decision that this object should be renamed
    ButtonConstants
    , although I think we maybe were going to keep the
    default
    prefix because there might be other constants which are not defaults which might go into such classes. Thanks for bringing this to our attention, filed: https://buganizer.corp.google.com/issues/159687878