Common controls

Summarize the properties of the controls, many properties are common, not necessarily only the ones I classify can be used

 

TextView: 

  android:id : Define a unique identifier for the current control android:layout_width : Specify the width of the control android:layout_height : Specify the height of the control     (optional values ​​of the height and width attributes: match_parent (this is more recommended than match_parent)/wrap_content/fill_parent) android:gravity : Specify how the text is aligned     (you can use "|" to specify multiple values ​​at the same time) android:textSize : Specify the size of the text (the font size is usually in sp, and the font size will change relative to the system font size ) android:textColor : Specify the color of the text android:text : Specify the displayed content
  
  

  

  
  
  

ImageView:

  android:src : specify an image

EditText:

  android:hint : Specify a prompt text android:maxLines : Specify the maximum number of lines of EditText
  

Button:

  android:textAllCaps : disable caps conversion

ProgressBar:

  android:visibility : Visibility of the control (
    visible: visible (default)
    invisible: invisible:
    invisible, and no longer takes up any screen space) style : Specifies the shape of the progress bar (default is a rotating circle) android:max : Set the maximum value of the progress bar
  
  


 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324946639&siteId=291194637