30.3 View Attributes
Each view class has associated with it a range of attributes. These property settings are set directly on the view instances and generally define how the view object will appear or behave. Examples of attributes are the text that appears on a Button object, or the background color of a ConstraintLayout view. Each view class within the Android SDK has a pre-defined set of methods that allow the user to set and get these property values. The Button class, for example, has a setText() method which can be called from within Kotlin code to set the text displayed on the button to a specific string value. The background color of a ConstraintLayout object, on the other hand, can be set with a call to the object’s setBackgroundColor() method.